Click here to Skip to main content
15,891,033 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to parse a file and store few strings in an array Pin
Richard MacCutchan9-Feb-12 2:58
mveRichard MacCutchan9-Feb-12 2:58 
GeneralRe: How to parse a file and store few strings in an array Pin
Faez Shingeri9-Feb-12 17:55
Faez Shingeri9-Feb-12 17:55 
GeneralRe: How to parse a file and store few strings in an array Pin
Richard MacCutchan9-Feb-12 22:04
mveRichard MacCutchan9-Feb-12 22:04 
GeneralRe: How to parse a file and store few strings in an array Pin
CPallini9-Feb-12 23:11
mveCPallini9-Feb-12 23:11 
GeneralRe: How to parse a file and store few strings in an array Pin
Richard MacCutchan10-Feb-12 0:42
mveRichard MacCutchan10-Feb-12 0:42 
GeneralRe: How to parse a file and store few strings in an array Pin
CPallini10-Feb-12 0:48
mveCPallini10-Feb-12 0:48 
GeneralRe: How to parse a file and store few strings in an array Pin
Richard MacCutchan10-Feb-12 0:57
mveRichard MacCutchan10-Feb-12 0:57 
GeneralRe: How to parse a file and store few strings in an array Pin
Faez Shingeri10-Feb-12 1:26
Faez Shingeri10-Feb-12 1:26 
That code was a beauty again .... Big Grin | :-D

Actually... the final file after strtok() looks like the one below... Hmmm | :|
Token: DCLGEN
Token: LIBRARY
Token: ACTION
Token: LANGUAGE
Token: NAMES
Token: QUOTE
Token: COLSUFFIX
Token: IS
Token: EXEC
Token: POLICY_NO
Token: REG_NO
Token: EFFECTIVE_DATE
Token: EXPIRY_DATE
Token: CAN_EFF_DATE
Token: CAN_PRO_DATE
Token: RETURN_PREMIUM
Token: CAN_PROCESSED
Token: END-EXEC
Token: COBOL
Token: DCLCANCL
Token: POLICY_NO
Token: CN-POLICY-NO   //I need this string too in diff array name  tableRow[6][10]
Token: REG_NO
Token: CN-REG-NO	//I need this string too in diff array name  tableRow[6][10]
Token: EFFECTIVE_DATE
Token: CN-EFFECTIVE-DATE  //I need this string too in diff array name  tableRow[6][10]
Token: EXPIRY_DATE
Token: CN-EXPIRY-DATE	//I need this string too in diff array name  tableRow[6][10]
Token: CAN_EFF_DATE
Token: CN-CAN-EFF-DATE	//I need this string too in diff array name  tableRow[6][10]
Token: CAN_PRO_DATE
Token: CN-CAN-PRO-DATE  //I need this string too in diff array name  tableRow[6][10]
Token: RETURN_PREMIUM
Token: CN-RETURN-PREMIUM //I need this string too in diff array name  tableRow[6][10]
Token: CAN_PROCESSED
Token: CN-CAN-PROCESSED //I need this string too in diff array name  tableRow[6][10]
Token: THE 


Your code cleverly extracted the strings within EXEC and END-EXEC which I stored in
char tableCol[6][10]

But now I am finding it really difficult to store the strings which are immediatedly followed by the "tabCol" string from the file... Frown | :(
ie CN-POLICY-NO, CN-REG-NO, CN-EFFECTIVE-DATE, CN-EXPIRY-DATE, CN-CAN-EFF-DATE, CN-CAN-PRO-DATE, CN-RETURN-PREMIUM & CN-CAN-PROCESSED which are to be stored in
char tableRow[6][10]



Apologies ...Frown | :(

Thanks a ton,
Faez
GeneralRe: How to parse a file and store few strings in an array Pin
Richard MacCutchan10-Feb-12 6:26
mveRichard MacCutchan10-Feb-12 6:26 
GeneralRe: How to parse a file and store few strings in an array Pin
Faez Shingeri11-Feb-12 6:39
Faez Shingeri11-Feb-12 6:39 
GeneralRe: How to parse a file and store few strings in an array Pin
Richard MacCutchan11-Feb-12 7:11
mveRichard MacCutchan11-Feb-12 7:11 
GeneralRe: How to parse a file and store few strings in an array Pin
Faez Shingeri12-Feb-12 19:19
Faez Shingeri12-Feb-12 19:19 
GeneralRe: How to parse a file and store few strings in an array Pin
Richard MacCutchan12-Feb-12 21:39
mveRichard MacCutchan12-Feb-12 21:39 
GeneralRe: How to parse a file and store few strings in an array Pin
David Crow10-Feb-12 7:14
David Crow10-Feb-12 7:14 
QuestionDirectshow Pin
venkatesh528677-Feb-12 21:22
venkatesh528677-Feb-12 21:22 
AnswerRe: Directshow Pin
Richard MacCutchan7-Feb-12 22:31
mveRichard MacCutchan7-Feb-12 22:31 
QuestionAdd text to listbox using sendmessage, i'm baffled, c++ win32 Pin
jkirkerx7-Feb-12 10:03
professionaljkirkerx7-Feb-12 10:03 
AnswerRe: Add text to listbox using sendmessage, i'm baffled, c++ win32 Pin
Wes Aday7-Feb-12 10:58
professionalWes Aday7-Feb-12 10:58 
GeneralNo it's not a typo Pin
jkirkerx7-Feb-12 11:31
professionaljkirkerx7-Feb-12 11:31 
GeneralRe: No it's not a typo Pin
Wes Aday7-Feb-12 11:55
professionalWes Aday7-Feb-12 11:55 
GeneralRe: No it's not a typo Pin
jkirkerx7-Feb-12 12:12
professionaljkirkerx7-Feb-12 12:12 
QuestionRe: Add text to listbox using sendmessage, i'm baffled, c++ win32 Pin
David Crow8-Feb-12 4:19
David Crow8-Feb-12 4:19 
AnswerRe: Add text to listbox using sendmessage, i'm baffled, c++ win32 Pin
jkirkerx8-Feb-12 6:17
professionaljkirkerx8-Feb-12 6:17 
AnswerNow it works, strange or I get it now Pin
jkirkerx8-Feb-12 7:22
professionaljkirkerx8-Feb-12 7:22 
AnswerRe: Now it works, strange or I get it now Pin
David Crow8-Feb-12 8:07
David Crow8-Feb-12 8:07 

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.