Hi, I had a look at the article and the link in that article, however I don't understand how can
system("pause");
create compiling errors. I've used it before and I didn't have to include any extra files that the article mentioned. Also, I have no idea what to replace
system("pause");
with. Maybe by
getch();
? Also, you mentioned I need a loop. I thought that the
1 2 3 4 5 6 7 8
|
if(n>0){
if(stop == "abort"){
}
else{
}
}
|
is the actual loop. Thuogh, when I used the code you gave me
1 2 3 4
|
for(int i = n; i > 0; n--)
{
...
}
|
I got this error log:
prog.cpp: In function ‘int main()’:
prog.cpp:18: error: expected `)' before ‘;’ token
prog.cpp:18: warning: unused variable ‘i’
prog.cpp:18: warning: statement has no effect
prog.cpp:18: error: expected `;' before ‘)’ token
prog.cpp:38: error: expected `}' at end of input
I gave you this error log because of ideone.com, hwich is an online C++ compiler. However, I noticed that sometimes it shows errors that are different to the ones
on my compiler- Dev C++.