Click here to Skip to main content
16,004,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: need help !!!! Very Urgent !! Pin
V.14-Apr-05 23:11
professionalV.14-Apr-05 23:11 
GeneralCString or string Pin
ng kok chuan14-Apr-05 14:31
ng kok chuan14-Apr-05 14:31 
GeneralRe: CString or string Pin
Christian Graus14-Apr-05 14:34
protectorChristian Graus14-Apr-05 14:34 
GeneralRe: CString or string Pin
Rama Krishna Vavilala14-Apr-05 16:19
Rama Krishna Vavilala14-Apr-05 16:19 
GeneralRe: CString or string Pin
22491715-Apr-05 0:16
22491715-Apr-05 0:16 
Generalchanging a part of a string Pin
Green Fuze14-Apr-05 13:55
Green Fuze14-Apr-05 13:55 
GeneralRe: changing a part of a string Pin
Christian Graus14-Apr-05 14:35
protectorChristian Graus14-Apr-05 14:35 
GeneralRe: changing a part of a string Pin
ng kok chuan14-Apr-05 14:44
ng kok chuan14-Apr-05 14:44 
you should tokenize the string with a delimiter of your choice, then append the tokens back into your string.

// code for tokenizing, taken from http://oopweb.com/CPP/Documents/CPPHOWTO/Volume/C++Programming-HOWTO-7.html[^]
void Tokenize(const string& str,
vector<string>& tokens,
const string& delimiters = " ")
{
// Skip delimiters at beginning.
string::size_type lastPos = str.find_first_not_of(delimiters, 0);
// Find first "non-delimiter".
string::size_type pos = str.find_first_of(delimiters, lastPos);

while (string::npos != pos || string::npos != lastPos)
{
// Found a token, add it to the vector.
tokens.push_back(str.substr(lastPos, pos - lastPos));
// Skip delimiters. Note the "not_of"
lastPos = str.find_first_not_of(delimiters, pos);
// Find next "non-delimiter"
pos = str.find_first_of(delimiters, lastPos);
}
}
GeneralRe: changing a part of a string Pin
Green Fuze14-Apr-05 15:27
Green Fuze14-Apr-05 15:27 
GeneralRe: changing a part of a string Pin
namaskaaram14-Apr-05 18:19
namaskaaram14-Apr-05 18:19 
GeneralRe: changing a part of a string Pin
Green Fuze14-Apr-05 23:48
Green Fuze14-Apr-05 23:48 
GeneralRe: changing a part of a string Pin
ThatsAlok14-Apr-05 19:34
ThatsAlok14-Apr-05 19:34 
GeneralRe: changing a part of a string Pin
Green Fuze14-Apr-05 23:44
Green Fuze14-Apr-05 23:44 
GeneralRe: changing a part of a string Pin
ThatsAlok15-Apr-05 18:07
ThatsAlok15-Apr-05 18:07 
GeneralRe: changing a part of a string Pin
ng kok chuan17-Apr-05 15:46
ng kok chuan17-Apr-05 15:46 
GeneralRe: changing a part of a string Pin
ThatsAlok20-Apr-05 19:55
ThatsAlok20-Apr-05 19:55 
GeneralThreads Pin
ww303114-Apr-05 12:02
ww303114-Apr-05 12:02 
GeneralRe: Threads Pin
Graham Bradshaw14-Apr-05 12:22
Graham Bradshaw14-Apr-05 12:22 
GeneralRe: Threads Pin
Joel Holdsworth14-Apr-05 12:33
Joel Holdsworth14-Apr-05 12:33 
GeneralRe: Threads Pin
ww303114-Apr-05 13:03
ww303114-Apr-05 13:03 
GeneralRe: Threads Pin
22491714-Apr-05 18:02
22491714-Apr-05 18:02 
GeneralRe: Threads Pin
22491714-Apr-05 18:00
22491714-Apr-05 18:00 
GeneralRe: Threads Pin
Joel Holdsworth14-Apr-05 23:21
Joel Holdsworth14-Apr-05 23:21 
GeneralRe: Threads Pin
22491714-Apr-05 23:29
22491714-Apr-05 23:29 
GeneralRe: Threads Pin
David Crow15-Apr-05 3:57
David Crow15-Apr-05 3:57 

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.