Click here to Skip to main content
15,895,557 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Swapping detection in Windows Pin
David Crow20-Dec-07 5:45
David Crow20-Dec-07 5:45 
GeneralAppWizard Template variables Pin
Anorexic Tribble19-Dec-07 22:28
Anorexic Tribble19-Dec-07 22:28 
QuestionString Manipulation Routine Pin
Programm3r19-Dec-07 22:22
Programm3r19-Dec-07 22:22 
GeneralRe: String Manipulation Routine Pin
CPallini19-Dec-07 22:40
mveCPallini19-Dec-07 22:40 
QuestionRe: String Manipulation Routine Pin
Programm3r19-Dec-07 22:45
Programm3r19-Dec-07 22:45 
GeneralRe: String Manipulation Routine Pin
CPallini19-Dec-07 22:57
mveCPallini19-Dec-07 22:57 
GeneralRe: String Manipulation Routine Pin
Programm3r20-Dec-07 0:02
Programm3r20-Dec-07 0:02 
GeneralRe: String Manipulation Routine Pin
Matthew Faithfull19-Dec-07 22:44
Matthew Faithfull19-Dec-07 22:44 
There are I think 2 approaches to this. You can either use a regular expression engine (something I know next to nothing about but there are CP articles if you search) or you can code it yourself. A loop from 0 to the length of the string would be your basic algorithm, pick out the numbers either one digit at a time or as a group and replace them either in place or by generating a new modified string by partially copying the old one. The C Runtime has lots of useful functions like _isdigit and strcat which could help you and stl strings have useful things like functions to reverse strings as well. It important to decide if you're only working in ASCII here or only in UNICODE or if you want it to work for both.
This function seems very specific as well so you might want to break it down into more usefully generic things like bool find_digit_sequence_in_string( TCHAR* aString, int& iBegin, int& iEnd ) Smile | :)
Nothing is exactly what it seems but everything with seems can be unpicked.

GeneralRe: String Manipulation Routine Pin
Programm3r19-Dec-07 22:51
Programm3r19-Dec-07 22:51 
AnswerRe: String Manipulation Routine Pin
Matthew Faithfull19-Dec-07 23:27
Matthew Faithfull19-Dec-07 23:27 
GeneralRe: String Manipulation Routine Pin
Programm3r20-Dec-07 0:11
Programm3r20-Dec-07 0:11 
GeneralRe: String Manipulation Routine Pin
jhwurmbach19-Dec-07 23:57
jhwurmbach19-Dec-07 23:57 
GeneralRe: String Manipulation Routine Pin
Programm3r20-Dec-07 0:10
Programm3r20-Dec-07 0:10 
QuestionHow to start Application as windows Service? Pin
manish.patel19-Dec-07 21:17
manish.patel19-Dec-07 21:17 
GeneralRe: How to start Application as windows Service? Pin
jhwurmbach19-Dec-07 21:46
jhwurmbach19-Dec-07 21:46 
QuestionHow to Show a picture in SDI Application Pin
santhoshv8419-Dec-07 21:03
santhoshv8419-Dec-07 21:03 
AnswerRe: How to Show a picture in SDI Application Pin
CPallini19-Dec-07 21:59
mveCPallini19-Dec-07 21:59 
AnswerRe: How to Show a picture in SDI Application Pin
Hamid_RT20-Dec-07 0:47
Hamid_RT20-Dec-07 0:47 
Questionneed help with c programming link list structure to write to a binary file Pin
neodeaths19-Dec-07 20:27
neodeaths19-Dec-07 20:27 
GeneralRe: need help with c programming link list structure to write to a binary file Pin
chandu00419-Dec-07 21:21
chandu00419-Dec-07 21:21 
GeneralRe: need help with c programming link list structure to write to a binary file Pin
CPallini19-Dec-07 21:37
mveCPallini19-Dec-07 21:37 
GeneralRe: need help with c programming link list structure to write to a binary file Pin
Cedric Moonen19-Dec-07 21:58
Cedric Moonen19-Dec-07 21:58 
GeneralRe: need help with c programming link list structure to write to a binary file Pin
CPallini19-Dec-07 22:03
mveCPallini19-Dec-07 22:03 
GeneralRe: need help with c programming link list structure to write to a binary file Pin
Christian Graus19-Dec-07 22:11
protectorChristian Graus19-Dec-07 22:11 
GeneralDetection of database Pin
tom groezer19-Dec-07 20:24
tom groezer19-Dec-07 20:24 

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.