please help, retarded intellisense VS c++

int main() {
int a1,a2,a3,b1,b2,b3;
cout << "Cross Product Calculator\n"
<< "Enter 3D vector a:\n"
<< "a1: ";
cin a1;
cout << "a2: ";
cin a2;
cout << "a3: ";
cin a3;
cout << "Enter 3D vector b:\n"
<< "b1: ";
cin b1;
cout << "b2: ";
cin b2;
cout << "b3: ";
cin b3;
int d1 = determinant(a2,a3,b2,b3);
int d2 = determinant(a1,a3,b1,b3);
int d3 = determinant(a1,a2,b1,b2);
cout << "\nThe Cross Product is:\n" << cProd(d1,d2,d3) << std::endl;
}

I tried this on two compilers, Visual c++ 2010, and g++, both said that the a1,a2,a3,b1,b2,b3 need a ";" BEFORE the variable. Why is that?
That's because you are using cin incorrectly and confusing the compiler.
can you give an example on how i should use it?
cin >> a1;

cin >> a2;

The syntax for a cin is this:
 
cin >> variable-name


EXAMPLE:

1
2
3
4
int i = 0;

cout << "What's the new value for the variable i?" << endl;
cin >> i;


What happened in your original post is that you forgot to put the stream operators. Those are very important when you do both cin and cout statements.

ah gotcha, it's been a while forgot the operator thanks
Hey, no problem. Glad to help =]
Topic archived. No new replies allowed.