expected primary expansion before ')' token.
Ok i cant figure out whats wrong with my code, im just making this for a little practice. Im only 14 and ive been doing c++ for ummm 2 days now i think it is. :D The problem is always get stuck with a weird error, it varies from the different lil aps i write, usually it says that a { isnt there when it is so i have to delete it, try to compile, then reinsert it, compile and then it will run even though its the same as before. Unfortunatly this isnt working with this problem. Heres my code *no where near completed*
Code:
#include <iostream>
using namespace std;
int main()
{
int X;
cout<<"This program is designed to work as a times table. Please enter a number from 1-9 and all of the expressions up to *9 will be displayed for that number.\n";
cout<<endl;
cout<<"Please enter the number you would like the times table for.: ";
cin>> X;
cin.ignore();
if ( X == 1) {
for ( X = 1; X < 9; X** ) {
cout<< X <<endl;
}
}
cin.get();
}
i get the error
expected primary expansion before ')' token.
for this line
for ( X = 1; X < 9; X** ) {
the thing is there IS a primary expansion token on the line RIGHT ABOvE IT!
if ( X == 1) { <---- there it is lol.
so idk wth is wrong with it, maybe i dont have my {} in the right places or something. any help would be nice since i kind of want this to work because it would be good extra credit for my computerclass.
O and also will the X** times X by 2,3,4,5, etc.? or is that screwed up as well?