Click here to Skip to main content
15,921,716 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Access struct in DLL Pin
adamf8129-Sep-03 0:16
adamf8129-Sep-03 0:16 
GeneralRe: Access struct in DLL Pin
Joaquín M López Muñoz29-Sep-03 0:22
Joaquín M López Muñoz29-Sep-03 0:22 
GeneralVirtual List Controls Pin
Jeremy Pullicino28-Sep-03 23:48
Jeremy Pullicino28-Sep-03 23:48 
GeneralRe: Virtual List Controls Pin
KarstenK29-Sep-03 0:32
mveKarstenK29-Sep-03 0:32 
GeneralMFC Pin
Member 21732628-Sep-03 23:31
Member 21732628-Sep-03 23:31 
GeneralRe: MFC Pin
Michael Dunn29-Sep-03 0:55
sitebuilderMichael Dunn29-Sep-03 0:55 
GeneralRe: MFC Pin
Member 21732629-Sep-03 15:49
Member 21732629-Sep-03 15:49 
Generalwho can tell me how to save the DC... Pin
Grrrr28-Sep-03 22:58
Grrrr28-Sep-03 22:58 
GeneralRe: who can tell me how to save the DC... Pin
KarstenK29-Sep-03 0:30
mveKarstenK29-Sep-03 0:30 
GeneralRe: who can tell me how to save the DC... Pin
Grrrr29-Sep-03 2:06
Grrrr29-Sep-03 2:06 
GeneralRe: who can tell me how to save the DC... Pin
KarstenK29-Sep-03 2:32
mveKarstenK29-Sep-03 2:32 
GeneralRe: who can tell me how to save the DC... Pin
Grrrr29-Sep-03 14:01
Grrrr29-Sep-03 14:01 
GeneralAbout a time event Pin
FlyingDancer28-Sep-03 22:13
FlyingDancer28-Sep-03 22:13 
GeneralRe: About a time event Pin
jhwurmbach28-Sep-03 22:26
jhwurmbach28-Sep-03 22:26 
GeneralRe: About a time event Pin
FlyingDancer28-Sep-03 22:37
FlyingDancer28-Sep-03 22:37 
GeneralRe: About a time event Pin
jhwurmbach28-Sep-03 22:43
jhwurmbach28-Sep-03 22:43 
GeneralRe: About a time event Pin
FlyingDancer28-Sep-03 23:04
FlyingDancer28-Sep-03 23:04 
GeneralRe: About a time event Pin
Fredrik Skog28-Sep-03 23:46
Fredrik Skog28-Sep-03 23:46 
GeneralRe: About a time event Pin
FlyingDancer29-Sep-03 0:33
FlyingDancer29-Sep-03 0:33 
Generaldirect draw and multimon problem Pin
gwenael28-Sep-03 22:07
gwenael28-Sep-03 22:07 
Generalgraphics query Pin
coda_x28-Sep-03 21:54
coda_x28-Sep-03 21:54 
QuestionAccelerator keys in modeless Dialog? Pin
Brian van der Beek28-Sep-03 21:53
Brian van der Beek28-Sep-03 21:53 
AnswerRe: Accelerator keys in modeless Dialog? Pin
Phil J Pearson29-Sep-03 2:50
Phil J Pearson29-Sep-03 2:50 
GeneralRe: Accelerator keys in modeless Dialog? Pin
Brian van der Beek29-Sep-03 2:59
Brian van der Beek29-Sep-03 2:59 
General"string" problem. Pin
WREY28-Sep-03 21:39
WREY28-Sep-03 21:39 
I feel my computer is playing a cat and mouse game with me, and I am the one losing. Here's why!

I can enter a bunch of strings and it can read one and ignore the rest, (meaning, it'll only give me the first one that it read), or it can read ALL, but give me NOTHING (meaning, it'll hang in the loop)!! Here's the code.
string str;
vector<string> vStr;
do
{
   cin>> str;
   vStr.push_back(str);
   cout<<"\n Size: " <<vStr.size();  //will show the vector growing
} while(str.end()!="\r");
======================
vector<string>::iterator iterB = vStr.begin(), iterE = vStr.end();
for(; iterB!=iterE; ++iterB)
    cout<< *iterB <<" ";
======================
cout<<"\n" <<endl;
The condition shown in the 'while' statement, will show the vector growing as strings are entered, but WILL NOT exit the 'do/while' loop.

However, if I were to change the condition in the 'while' statement to:
while(str.end()=="\r");
It'll exit the loop, but will ONLY give me the first string it read.

Ideally, I would like for it to read all the strings entered, and report all that it accumulated in the vector.

Thanks for any help.

Confused | :confused:

William

Fortes in fide et opere!

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.