Trying to figure out some of these errors..Probably going to show how dumb I am again,but this is a simple for loop example and I was just adding system("pause")......and
using namespace std;
cout << "Enter Number: "; cin >> a;
cout << "Enter the power: "; cin >> b;
s = 1;
for (i=1; i <=b; i++)
s = s*a;
cout << s << endl;
Compiler: Default compiler
g++.exe "C:\Dev-Cpp\Projects\ProjectCppFiles\SimpleForLoop.cpp" -o
"C:\Dev-Cpp\Projects\ProjectCppFiles\SimpleForLoop.exe" -g3 -O0 -ansi -g3
-I"C:\Dev-Cpp\include\c++" -I"C:\Dev-Cpp\include\c++\mingw32" -I"C:\Dev-Cpp\include\c++\backward"
C:/Dev-Cpp/Projects/ProjectCppFiles/SimpleForLoop.cpp: In function `int
C:/Dev-Cpp/Projects/ProjectCppFiles/SimpleForLoop.cpp:15: parse error before `
I get this alot...what's the parse error before on the last line ??
BTW...in trying to learn these errors why :
Warning on int main ()
syntax error before >> ......etc, etc.
Anyplace I can get a list of these or is it just an experience thing??
I'm new to c++ and have been using VB....Visual Studio lets you debug before you compile which gives you a shot at figuring out your problems, but it seems here you just have to know the errors cause you can't debug until you can compile...( or am I missing something...there isn't a way to debug before you compile in Dev is there??)
Appreciate any input.......Thanks! Teeyester