Click here to Skip to main content
15,908,264 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to check a directory is existed or not Pin
Hamid_RT18-Sep-07 3:12
Hamid_RT18-Sep-07 3:12 
AnswerRe: How to check a directory is existed or not Pin
David Crow18-Sep-07 4:11
David Crow18-Sep-07 4:11 
QuestionString of integers Pin
Herboren17-Sep-07 16:24
Herboren17-Sep-07 16:24 
AnswerRe: String of integers Pin
fefe.wyx17-Sep-07 16:45
fefe.wyx17-Sep-07 16:45 
GeneralRe: String of integers Pin
Herboren17-Sep-07 18:47
Herboren17-Sep-07 18:47 
GeneralRe: String of integers Pin
nbugalia17-Sep-07 19:15
nbugalia17-Sep-07 19:15 
AnswerRe: String of integers Pin
Russell'17-Sep-07 23:24
Russell'17-Sep-07 23:24 
AnswerRe: String of integers Pin
David Crow18-Sep-07 4:17
David Crow18-Sep-07 4:17 
Herboren wrote:
Im trying to create a simple program the reads a string of integers
...
int aArray[4];


These two seem to contradict each other. You either meant to say, "Im trying to create a simple program the reads an array of integers," or you need to declare:

Herboren wrote:
for ( n=0; n<0; n++ )


This loop will not do what you expect, unless you expect it to execute 0 times.

string aArray[4];
In any case, consider:

int aArray[4];
cin >> aArray[0];
cin >> aArray[1];
cin >> aArray[2];
cin >> aArray[3];
or
for (int n = 0; n < 3; n++) // the 3 should not be hard-coded
    cin >> aArray[n];
Notice the benefits of the latter example?


"A good athlete is the result of a good and worthy opponent." - David Crow

"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne


GeneralRe: String of integers [modified] Pin
Herboren18-Sep-07 4:43
Herboren18-Sep-07 4:43 
GeneralRe: String of integers Pin
David Crow18-Sep-07 5:32
David Crow18-Sep-07 5:32 
GeneralRe: String of integers Pin
Herboren18-Sep-07 6:13
Herboren18-Sep-07 6:13 
QuestionRe: String of integers Pin
David Crow18-Sep-07 6:51
David Crow18-Sep-07 6:51 
AnswerRe: String of integers [modified] Pin
Herboren18-Sep-07 9:04
Herboren18-Sep-07 9:04 
GeneralRe: String of integers Pin
David Crow18-Sep-07 10:36
David Crow18-Sep-07 10:36 
GeneralRe: String of integers Pin
Herboren18-Sep-07 10:58
Herboren18-Sep-07 10:58 
QuestionRe: String of integers Pin
David Crow18-Sep-07 11:06
David Crow18-Sep-07 11:06 
AnswerRe: String of integers [modified] Pin
Herboren18-Sep-07 11:17
Herboren18-Sep-07 11:17 
GeneralRe: String of integers Pin
David Crow19-Sep-07 7:58
David Crow19-Sep-07 7:58 
Questioncode for opening,closing and saving an image file Pin
itsgood12317-Sep-07 14:23
itsgood12317-Sep-07 14:23 
AnswerRe: code for opening,closing and saving an image file Pin
Sarath C17-Sep-07 15:49
Sarath C17-Sep-07 15:49 
QuestionRe: code for opening,closing and saving an image file Pin
Mark Salsbery17-Sep-07 18:22
Mark Salsbery17-Sep-07 18:22 
AnswerRe: code for opening,closing and saving an image file Pin
Hamid_RT18-Sep-07 3:15
Hamid_RT18-Sep-07 3:15 
QuestionHow to switch the views by CButton cointrol on CFormview view in MDI Pin
llkkxx17-Sep-07 13:07
llkkxx17-Sep-07 13:07 
AnswerRe: How to switch the views by CButton cointrol on CFormview view in MDI Pin
Vaclav_17-Sep-07 16:10
Vaclav_17-Sep-07 16:10 
QuestionRe: How to switch the views by CButton cointrol on CFormview view in MDI Pin
Nelek17-Sep-07 20:14
protectorNelek17-Sep-07 20:14 

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.