Click here to Skip to main content
15,914,500 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Question about strings Pin
18-Sep-01 23:09
suss18-Sep-01 23:09 
GeneralRe: Question about strings Pin
Steen Krogsgaard18-Sep-01 23:23
Steen Krogsgaard18-Sep-01 23:23 
GeneralRe: Question about strings Pin
18-Sep-01 23:29
suss18-Sep-01 23:29 
GeneralRe: Question about strings Pin
18-Sep-01 23:31
suss18-Sep-01 23:31 
Generalwave files Pin
18-Sep-01 21:36
suss18-Sep-01 21:36 
GeneralDisabled images on buttons Pin
PJ Arends18-Sep-01 21:32
professionalPJ Arends18-Sep-01 21:32 
GeneralRe: Disabled images on buttons Pin
18-Sep-01 22:10
suss18-Sep-01 22:10 
QuestionMake an array of words from a sentence? Pin
Tryhard18-Sep-01 20:47
Tryhard18-Sep-01 20:47 
Hi,

First off I am new to VC++, so this is probably real basic stuff but I keep getting an error.

What I have so far :

// now all items are in list, so step through list to print them.
list<string>::iterator itr;
for (itr = parsed_items.begin(); itr != parsed_items.end(); ++itr ) {
int count = 0;

string dmp = *itr;

cstr = dmp.c_str(); // convert string to CString

plb->AddString( cstr ); // print to List Box

LPCTSTR word = cstr;

// How do I add the variable word into an array each time the loop goes round
// I want to end being able to access all the words in a sentence i.e.
// word[0]
// word[1]
// word[2]
// etc...

count++;
}



The comments in my code explain what I am trying to achieve.

Any help will be greatly appreciated, as I have been working on this and looking at various examples for two days now and am about to pull my hair out.

Thanks in advance Smile | :)
Tryhard Smile | :)


Confused | :confused: Confused | :confused:

Tryhard Smile | :)
AnswerRe: Make an array of words from a sentence? Pin
Christian Graus18-Sep-01 22:30
protectorChristian Graus18-Sep-01 22:30 
GeneralWin32 edit box problems Pin
Christian Graus18-Sep-01 20:26
protectorChristian Graus18-Sep-01 20:26 
GeneralRe: Win32 edit box problems Pin
18-Sep-01 22:19
suss18-Sep-01 22:19 
GeneralRe: Win32 edit box problems Pin
Christian Graus18-Sep-01 22:25
protectorChristian Graus18-Sep-01 22:25 
GeneralRe: Win32 edit box problems Pin
Paul A. Howes19-Sep-01 3:05
Paul A. Howes19-Sep-01 3:05 
QuestionHow can I programmatically insert an OLE objects (or image) into RTF control??? Pin
Youknowme18-Sep-01 18:22
Youknowme18-Sep-01 18:22 
GeneralThread and ActiveX component Pin
Farah Mansor18-Sep-01 18:13
Farah Mansor18-Sep-01 18:13 
GeneralRe: Thread and ActiveX component Pin
Ghazi H. Wadi19-Sep-01 14:01
Ghazi H. Wadi19-Sep-01 14:01 
GeneralRe: Thread and ActiveX component Pin
Farah Mansor19-Sep-01 15:32
Farah Mansor19-Sep-01 15:32 
GeneralRe: Thread and ActiveX component Pin
Ghazi H. Wadi19-Sep-01 16:52
Ghazi H. Wadi19-Sep-01 16:52 
GeneralRe: Thread and ActiveX component Pin
Farah Mansor19-Sep-01 21:04
Farah Mansor19-Sep-01 21:04 
GeneralRe: Thread and ActiveX component Pin
Ghazi H. Wadi20-Sep-01 12:46
Ghazi H. Wadi20-Sep-01 12:46 
GeneralRe: Thread and ActiveX component Pin
Farah Mansor20-Sep-01 15:58
Farah Mansor20-Sep-01 15:58 
GeneralRe: Thread and ActiveX component Pin
Ghazi H. Wadi21-Sep-01 16:09
Ghazi H. Wadi21-Sep-01 16:09 
GeneralRe: Thread and ActiveX component Pin
24-Sep-01 19:47
suss24-Sep-01 19:47 
Generalconsecutive sums Pin
minikg18-Sep-01 15:38
minikg18-Sep-01 15:38 
GeneralRe: consecutive sums Pin
Christian Graus18-Sep-01 16:02
protectorChristian Graus18-Sep-01 16:02 

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.