Click here to Skip to main content
15,899,313 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: C++ Function objects - how to use them? Pin
John R. Shaw8-May-03 17:15
John R. Shaw8-May-03 17:15 
AnswerRe: C++ Function objects - how to use them? Pin
kuhx198011-May-03 4:16
kuhx198011-May-03 4:16 
GeneralMenu sharing in MDI application with 2 document templates Pin
Jayanta Basu8-May-03 2:27
Jayanta Basu8-May-03 2:27 
Questionwriting data to a text file????????? Pin
xxhimanshu8-May-03 1:43
xxhimanshu8-May-03 1:43 
AnswerRe: writing data to a text file????????? Pin
Nitron8-May-03 1:55
Nitron8-May-03 1:55 
QuestionCan someone help, im new to C++ Pin
mawmany2k8-May-03 1:30
mawmany2k8-May-03 1:30 
AnswerRe: Can someone help, im new to C++ Pin
Stephane Rodriguez.8-May-03 1:33
Stephane Rodriguez.8-May-03 1:33 
AnswerRe: Can someone help, im new to C++ Pin
Hari Krishnan (Noida)8-May-03 2:17
Hari Krishnan (Noida)8-May-03 2:17 
Hi,
Try with following code snippet.

----------------------------------------------------------
Smile | :) CString strSentence = "a do cat from hello thomas d";
int iLongest = 0; //Initialize with minimum value.
int iShortest = 1024; //Initialize with Big Value
int nIndex;

//Backup. If you dont want you can remove
CString strHelper(strSentence);

while(!strHelper.IsEmpty())
{
if(-1 == (nIndex = strHelper.Find(' ', 0)))
{
nIndex = strHelper.GetLength(); //Last word
strHelper.Empty();
}
if(nIndex < iShortest)
iShortest = nIndex;
if(nIndex > iLongest)
iLongest = nIndex;

strHelper.Delete(0, nIndex+1); //Remove including space.
}
----------------------------------------------------------
GeneralMemory Leak Pin
saravanaram8-May-03 1:09
saravanaram8-May-03 1:09 
GeneralRe: Memory Leak Pin
Stephane Rodriguez.8-May-03 1:31
Stephane Rodriguez.8-May-03 1:31 
GeneralRe: Memory Leak Pin
Hari Krishnan (Noida)8-May-03 2:47
Hari Krishnan (Noida)8-May-03 2:47 
GeneralRe: Memory Leak Pin
David Crow8-May-03 3:14
David Crow8-May-03 3:14 
GeneralRe: Memory Leak Pin
Hari Krishnan (Noida)8-May-03 4:13
Hari Krishnan (Noida)8-May-03 4:13 
GeneralRe: Memory Leak Pin
David Crow8-May-03 4:26
David Crow8-May-03 4:26 
GeneralPassing around params VC++6.0 VC# Pin
NHM8-May-03 0:50
NHM8-May-03 0:50 
GeneralRe: Passing around params VC++6.0 VC# Pin
Stephane Rodriguez.8-May-03 1:01
Stephane Rodriguez.8-May-03 1:01 
GeneralRe: Passing around params VC++6.0 VC# Pin
NHM8-May-03 1:19
NHM8-May-03 1:19 
GeneralRe: Passing around params VC++6.0 VC# Pin
Stephane Rodriguez.8-May-03 1:29
Stephane Rodriguez.8-May-03 1:29 
GeneralRe: Passing around params VC++6.0 VC# Pin
NHM8-May-03 3:18
NHM8-May-03 3:18 
GeneralRe: Passing around params VC++6.0 VC# Pin
Stephane Rodriguez.8-May-03 3:29
Stephane Rodriguez.8-May-03 3:29 
GeneralRe: Passing around params VC++6.0 VC# Pin
NHM8-May-03 3:45
NHM8-May-03 3:45 
GeneralRe: Passing around params VC++6.0 VC# Pin
Stephane Rodriguez.8-May-03 3:51
Stephane Rodriguez.8-May-03 3:51 
GeneralWS_CLIPSIBLINGS......... Pin
Neha8-May-03 0:15
Neha8-May-03 0:15 
GeneralRe: WS_CLIPSIBLINGS......... Pin
jhaga8-May-03 2:59
professionaljhaga8-May-03 2:59 
GeneralCFile Pin
macmac387-May-03 23:19
macmac387-May-03 23:19 

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.