Click here to Skip to main content
15,918,404 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralWhy download html page fail sometimes? I use CHtmlview(vc 6.0) Pin
5200131429-Oct-03 18:58
5200131429-Oct-03 18:58 
GeneralObject-Oriented Classes HELP Pin
bwestend29-Oct-03 17:38
bwestend29-Oct-03 17:38 
GeneralPLEASE HELP ME!!!!!!!!!!!!!!!!!!!!!!!! Pin
bwestend29-Oct-03 17:39
bwestend29-Oct-03 17:39 
GeneralRe: Object-Oriented Classes HELP Pin
Michael Dunn29-Oct-03 19:08
sitebuilderMichael Dunn29-Oct-03 19:08 
GeneralRe: Object-Oriented Classes HELP Pin
bwestend29-Oct-03 19:41
bwestend29-Oct-03 19:41 
GeneralRe: Object-Oriented Classes HELP Pin
Terry O'Nolley29-Oct-03 19:56
Terry O'Nolley29-Oct-03 19:56 
GeneralRe: Object-Oriented Classes HELP Pin
Steve S29-Oct-03 22:34
Steve S29-Oct-03 22:34 
GeneralRe: Object-Oriented Classes HELP Pin
Atlantys30-Oct-03 8:48
Atlantys30-Oct-03 8:48 
GeneralRe: Object-Oriented Classes HELP Pin
Alexander M.,30-Oct-03 2:47
Alexander M.,30-Oct-03 2:47 
GeneralRe: Object-Oriented Classes HELP Pin
Terry O'Nolley29-Oct-03 19:59
Terry O'Nolley29-Oct-03 19:59 
Generalset thumbnail view for Cfiledialog Pin
vancouver77729-Oct-03 16:30
vancouver77729-Oct-03 16:30 
QuestionHow can a CAB get parameter from html ? Pin
suninwater29-Oct-03 16:21
suninwater29-Oct-03 16:21 
GeneralRe: Class Constructor Help Pin
Andrew Walker29-Oct-03 16:49
Andrew Walker29-Oct-03 16:49 
GeneralChanging CListBox sort at runtime Pin
Daniel132429-Oct-03 15:39
Daniel132429-Oct-03 15:39 
GeneralRe: Changing CListBox sort at runtime Pin
vcplusplus29-Oct-03 15:45
vcplusplus29-Oct-03 15:45 
GeneralRe: Changing CListBox sort at runtime Pin
Daniel132429-Oct-03 16:02
Daniel132429-Oct-03 16:02 
GeneralRe: Changing CListBox sort at runtime Pin
vcplusplus29-Oct-03 16:11
vcplusplus29-Oct-03 16:11 
Generalarray of Strings Pin
convert_sg29-Oct-03 15:14
convert_sg29-Oct-03 15:14 
GeneralRe: array of Strings Pin
Navin29-Oct-03 15:30
Navin29-Oct-03 15:30 
GeneralRe: array of Strings Pin
convert_sg29-Oct-03 15:48
convert_sg29-Oct-03 15:48 
GeneralRe: array of Strings Pin
vcplusplus29-Oct-03 15:39
vcplusplus29-Oct-03 15:39 
GeneralRe: array of Strings Pin
Christian Graus29-Oct-03 15:48
protectorChristian Graus29-Oct-03 15:48 
GeneralChange font size for CComboBox and CEdit Pin
srev29-Oct-03 14:14
srev29-Oct-03 14:14 
GeneralRe: Change font size for CComboBox and CEdit Pin
Yonatan26-Nov-03 2:04
Yonatan26-Nov-03 2:04 
Generalsimple console input question Pin
rajdawg29-Oct-03 14:09
rajdawg29-Oct-03 14:09 
Given these requirements for a console application:
Enter a series of integers seperated by whitespace. The first integer represents the quantity of integers to follow.
Ex. 3 5 18 21
or. 5 17 -46 3 198 2

I have been attempting the following to read the integers and store them in a vector:
scanf("%d", &cnt);
for(int i = 1; i <= cnt + 1; i++)
{
scanf("%d", &n);
aInts.push_back(n);
}

This works fine, unless someone enters fewer integers than the initial integer indicates. (ex. 3 19 5)
How can I test to see if the end of the input stream has been reached?

I have attempted the same type of logic using cin, to no avail.

Thank you in advance for your help.

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.