Click here to Skip to main content
15,888,286 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: add int to date Pin
CPallini17-Dec-07 0:48
mveCPallini17-Dec-07 0:48 
GeneralRe: add int to date Pin
Maximilien17-Dec-07 0:59
Maximilien17-Dec-07 0:59 
GeneralRe: add int to date Pin
Try17-Dec-07 1:09
Try17-Dec-07 1:09 
GeneralHttp Parser Library Pin
ktm TechMan17-Dec-07 0:15
ktm TechMan17-Dec-07 0:15 
GeneralCount words in a string Pin
CodingLover16-Dec-07 23:33
CodingLover16-Dec-07 23:33 
GeneralRe: Count words in a string Pin
Nelek16-Dec-07 23:58
protectorNelek16-Dec-07 23:58 
GeneralRe: Count words in a string Pin
CodingLover17-Dec-07 0:12
CodingLover17-Dec-07 0:12 
AnswerRe: Count words in a string Pin
CPallini16-Dec-07 23:58
mveCPallini16-Dec-07 23:58 
What about:
int count=0;
int len = strlen(pBuffer);
int i =0;
for ( ; ; )
{
  while (pBuffer[i]==' ' || pBuffer[i] == '\t' || pBuffer[i] == '\n' && i < len)
  {
    i++;
  }
  if (i ==len ) break;
  count++;
  while (!( pBuffer[i]==' ' || pBuffer[i] == '\t' || pBuffer[i] == '\n') && i < len)
  {
    i++;
  } 
  if (i == len) break;
}

It is odd, but has a chance to work
Smile | :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.


GeneralRe: Count words in a string Pin
CodingLover17-Dec-07 0:35
CodingLover17-Dec-07 0:35 
GeneralRe: Count words in a string Pin
CPallini17-Dec-07 0:43
mveCPallini17-Dec-07 0:43 
GeneralRe: Count words in a string Pin
CodingLover17-Dec-07 0:59
CodingLover17-Dec-07 0:59 
GeneralRe: Count words in a string Pin
CPallini17-Dec-07 1:01
mveCPallini17-Dec-07 1:01 
GeneralRe: Count words in a string Pin
CodingLover17-Dec-07 1:07
CodingLover17-Dec-07 1:07 
GeneralRe: Count words in a string Pin
CPallini17-Dec-07 2:11
mveCPallini17-Dec-07 2:11 
GeneralRe: Count words in a string Pin
CodingLover17-Dec-07 16:28
CodingLover17-Dec-07 16:28 
GeneralRe: Count words in a string Pin
toxcct17-Dec-07 1:28
toxcct17-Dec-07 1:28 
GeneralRe: Count words in a string Pin
CodingLover17-Dec-07 16:33
CodingLover17-Dec-07 16:33 
GeneralRe: Count words in a string Pin
krmed17-Dec-07 1:58
krmed17-Dec-07 1:58 
GeneralChanging the color of GridLInes Pin
Vikas_12316-Dec-07 22:55
Vikas_12316-Dec-07 22:55 
Questionhot to resolve such redefined type errors? Pin
kcynic16-Dec-07 22:25
kcynic16-Dec-07 22:25 
AnswerRe: hot to resolve such redefined type errors? Pin
Nelek16-Dec-07 22:45
protectorNelek16-Dec-07 22:45 
GeneralRe: hot to resolve such redefined type errors? Pin
toxcct16-Dec-07 23:00
toxcct16-Dec-07 23:00 
AnswerRe: hot to resolve such redefined type errors? Pin
Naveen16-Dec-07 23:14
Naveen16-Dec-07 23:14 
GeneralRe: hot to resolve such redefined type errors? Pin
toxcct17-Dec-07 0:15
toxcct17-Dec-07 0:15 
GeneralRe: hot to resolve such redefined type errors? Pin
Naveen17-Dec-07 0:24
Naveen17-Dec-07 0: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.