Click here to Skip to main content
16,008,750 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: 2 dlg resources.....but single CDialog based class Pin
Jagadeesh VN16-Sep-03 20:06
Jagadeesh VN16-Sep-03 20:06 
GeneralExtracting a Chinese Character from a CString Pin
wow999916-Sep-03 17:15
wow999916-Sep-03 17:15 
GeneralRe: Extracting a Chinese Character from a CString Pin
Michael Dunn16-Sep-03 17:49
sitebuilderMichael Dunn16-Sep-03 17:49 
GeneralRe: Extracting a Chinese Character from a CString Pin
wow999916-Sep-03 19:00
wow999916-Sep-03 19:00 
GeneralRe: Extracting a Chinese Character from a CString Pin
Michael Dunn16-Sep-03 19:31
sitebuilderMichael Dunn16-Sep-03 19:31 
Generalpattern recognition in string inputted by user Pin
Anz16-Sep-03 10:33
Anz16-Sep-03 10:33 
GeneralRe: pattern recognition in string inputted by user Pin
Michael Dunn16-Sep-03 17:52
sitebuilderMichael Dunn16-Sep-03 17:52 
GeneralRe: pattern recognition in string inputted by user Pin
DougW4816-Sep-03 19:09
DougW4816-Sep-03 19:09 
This looked like a fun little project to create, so I took about 15 minutes of my time to write this. I'm not going to post the code (which was 29 lines from start to finish, including the #include statements.) I'm not sure if my approach is what you are looking for, but I set aside 5 variables (I made an array to hold these) of type unsigned short. Then I just wrote a for loop which looked at each character of the input string and added it to each variable (you have to reset one of the variables back to zero each pass through the loop, just use the mod operator.) At the end of my for loop I looked at my variable that I'm going to reset the next time through my loop (it should contain 5 characters by now) and if the bit pattern in this variable is the same as the bit pattern you are looking for, then it outputs the place in the string where this pattern came from. That's it!

Give this a try for a while and if it's killing you then post a reply to my message and I'll post you the code (I don't mind helping people with homework.) I wanted you to try it first since I gave you some ideas on how to approach this. Hopefully I wasn't too vague but I don't want to give away the entire solution right away! Poke tongue | ;-P

Good luck!

Douglas A. Wright
dawrigh3@kent.edu
QuestionSerial Port Functions? Pin
Steven M Hunt16-Sep-03 9:24
Steven M Hunt16-Sep-03 9:24 
AnswerRe: Serial Port Functions? Pin
Jagadeesh VN16-Sep-03 21:19
Jagadeesh VN16-Sep-03 21:19 
QuestionHow to fix compiler warning ? Pin
Artem Moroz16-Sep-03 9:23
Artem Moroz16-Sep-03 9:23 
AnswerRe: How to fix compiler warning ? Pin
Terry O'Nolley16-Sep-03 11:44
Terry O'Nolley16-Sep-03 11:44 
AnswerRe: How to fix compiler warning ? Pin
Phil Hamer16-Sep-03 16:13
Phil Hamer16-Sep-03 16:13 
GeneralRe: How to fix compiler warning ? Pin
David Crow17-Sep-03 3:16
David Crow17-Sep-03 3:16 
GeneralRe: How to fix compiler warning ? Pin
Phil Hamer17-Sep-03 11:37
Phil Hamer17-Sep-03 11:37 
AnswerRe: How to fix compiler warning ? Pin
Artem Moroz16-Sep-03 19:59
Artem Moroz16-Sep-03 19:59 
GeneralRe: How to fix compiler warning ? Pin
David Crow17-Sep-03 2:50
David Crow17-Sep-03 2:50 
GeneralRe: How to fix compiler warning ? Pin
Steve S17-Sep-03 6:04
Steve S17-Sep-03 6:04 
GeneralCMemoryState Pin
ComboController16-Sep-03 9:13
ComboController16-Sep-03 9:13 
GeneralRe: CMemoryState Pin
David Crow16-Sep-03 9:22
David Crow16-Sep-03 9:22 
GeneralRe: CMemoryState Pin
ComboController17-Sep-03 4:32
ComboController17-Sep-03 4:32 
GeneralRe: CMemoryState Pin
Steve S17-Sep-03 6:06
Steve S17-Sep-03 6:06 
GeneralRe: CMemoryState Pin
ComboController17-Sep-03 7:35
ComboController17-Sep-03 7:35 
Generallinking to ws2_32.lib Pin
ns16-Sep-03 8:46
ns16-Sep-03 8:46 
GeneralRe: linking to ws2_32.lib Pin
David Crow16-Sep-03 9:15
David Crow16-Sep-03 9:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.