Click here to Skip to main content
15,910,661 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDesparate for suggestions? ---- Some Toolbar Button Are Hidden Pin
7-May-01 3:49
suss7-May-01 3:49 
GeneralRe: Desparate for suggestions? ---- Some Toolbar Button Are Hidden Pin
#realJSOP7-May-01 4:13
professional#realJSOP7-May-01 4:13 
GeneralRe: Desparate for suggestions? ---- Some Toolbar Button Are Hidden Pin
7-May-01 4:36
suss7-May-01 4:36 
GeneralRe: Desparate for suggestions? ---- Some Toolbar Button Are Hidden Pin
7-May-01 6:14
suss7-May-01 6:14 
GeneralRe: Desparate for suggestions? ---- Some Toolbar Button Are Hidden Pin
7-May-01 10:37
suss7-May-01 10:37 
GeneralProblem with WriteFile and GetOverlappedResult Pin
fd97507-May-01 2:43
professionalfd97507-May-01 2:43 
General'for' statement can't work! Pin
hearties7-May-01 0:09
hearties7-May-01 0:09 
GeneralRe: 'for' statement can't work! Pin
#realJSOP7-May-01 0:46
professional#realJSOP7-May-01 0:46 
1  CString sLevel;
2  int nCount;
3
4  for (int i=0; i <= 9; i++)
5  {
6    sLevel.Format("%d=", i);
7    CStringParser p3(sBufferList.GetNext(pos), sLevel); //parse RegisterList in lines of text
8    int nCount = p3.GetCount();
9  
10   if (nCount > 0) //found more than one line of text in RegisterList
11   {
12     for (int j=2; j <= nCount; j++)
13     {
14       pos = sBufferList.AddHead(p3.GetField(j));
15       if (j>2)
16         ParseLevel(sBufferList.GetAt(pos), i);
17     }
18   }
19 }


1) You have nCount defined outside the scope of the "for" loop, as well as *inside* the scope. Is this really what you wanted?

2) You're passing a string in as a delimiter - it should actually be a single character. Onl line 6, your first delimiter is going to be a null character followed by an equal sign. I think what you wanted to do was extract a character from a string that contains several delimiters.

3) I never anticipated anyone using a NULL as a delimiter. I recommend you don't try it.

Looks like you're parsing a string that has several nested delimiters (HL7?)
GeneralRe: 'for' statement can't work! Pin
hearties7-May-01 1:11
hearties7-May-01 1:11 
GeneralRe: 'for' statement can't work! Pin
#realJSOP7-May-01 1:24
professional#realJSOP7-May-01 1:24 
GeneralRe: 'for' statement can't work! Pin
hearties7-May-01 1:40
hearties7-May-01 1:40 
GeneralRe: 'for' statement can't work! Pin
#realJSOP7-May-01 1:50
professional#realJSOP7-May-01 1:50 
GeneralRe: 'for' statement can't work! Pin
hearties7-May-01 2:16
hearties7-May-01 2:16 
GeneralRe: 'for' statement can't work! Pin
#realJSOP7-May-01 2:50
professional#realJSOP7-May-01 2:50 
GeneralRe: 'for' statement can't work! Pin
hearties9-May-01 5:55
hearties9-May-01 5:55 
GeneralRe: 'for' statement can't work! Pin
Wojciech Zaremba7-May-01 2:42
Wojciech Zaremba7-May-01 2:42 
Question[q] How to control the other program's scrollbar? Pin
linugee6-May-01 22:44
linugee6-May-01 22:44 
AnswerRe: [q] How to control the other program's scrollbar? Pin
Christian Graus6-May-01 23:49
protectorChristian Graus6-May-01 23:49 
GeneralRe: [q] How to control the other program's scrollbar? Pin
Hadi Rezaee7-May-01 2:52
Hadi Rezaee7-May-01 2:52 
GeneralRe: [q] How to control the other program's scrollbar? Pin
Christian Graus7-May-01 12:38
protectorChristian Graus7-May-01 12:38 
Generalpl help me! Struggling for days. Problem with ADOs & Binary data insertion Pin
6-May-01 21:02
suss6-May-01 21:02 
GeneralRe: pl help me! Struggling for days. Problem with ADOs & Binary data insertion Pin
l a u r e n6-May-01 21:10
l a u r e n6-May-01 21:10 
GeneralRe: pl help me! Struggling for days. Problem with ADOs & Binary data insertion Pin
6-May-01 22:59
suss6-May-01 22:59 
GeneralRe: pl help me! Struggling for days. Problem with ADOs & Binary data insertion Pin
l a u r e n7-May-01 5:40
l a u r e n7-May-01 5:40 
GeneralRe: pl help me! Struggling for days. Problem with ADOs & Binary data insertion Pin
#realJSOP7-May-01 2:55
professional#realJSOP7-May-01 2:55 

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.