Click here to Skip to main content
15,917,565 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
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 
I would use just the ' ' (space) character as the delimiter. This would result in the following:

//string 1
CStringParser("0= RegisterName A2 D2", ' ', '\"');
GetField(1) - "0="
GetField(2) - "RegisterName"
GetField(3) - "A2"
GetField(4) - "D2"

//string 2
CStringParser("1= /"Control Set/"", ' ', '\"');
GetField(1) = "1="
GetField(2) = ""Control Set""
GetField(2, TRUE) = "Control Set" // strip the quotes from the string

//string 3
CStringParser("2= Byte Control %c5", ' ', '\"');
GetField(1) - "2="
GetField(2) - "Byte"
GetField(3) - "Control"
GetField(4) - "&c5"

If you wanted to, it would be a simple matter (with the latest version of CStringParser) to modify the sub-strings (removing the '=' or leading spaces) by creating your own derived CStringParser class and handling the special cases as they arise without the need to change the underlying base class.


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 
GeneralRe: pl help me! Struggling for days. Problem with ADOs & Binary data insertion Pin
l a u r e n7-May-01 5:36
l a u r e n7-May-01 5:36 
GeneralRe: pl help me! Struggling for days. Problem with ADOs & Binary data insertion Pin
#realJSOP7-May-01 6:02
professional#realJSOP7-May-01 6:02 
GeneralRe: pl help me! Struggling for days. Problem with ADOs & Binary data insertion Pin
Ajit Jadhav7-May-01 7:10
Ajit Jadhav7-May-01 7:10 
GeneralRe: pl help me! Struggling for days. Problem with ADOs & Binary data insertion Pin
Ajit Jadhav7-May-01 7:26
Ajit Jadhav7-May-01 7:26 
GeneralRe: pl help me! Struggling for days. Problem with ADOs & Binary data insertion Pin
7-May-01 19:15
suss7-May-01 19:15 
GeneralTrimming spaces in a BSTR value Pin
yamini6-May-01 19:34
yamini6-May-01 19:34 

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.