Easy task... no idea how to

I need help with a really simple file :S
i used to program on visual basic and it was really easy but
I'm having some trouble getting to know c++ so i had this assignment
in which I had 4 variables and I'm supposed to give the program an equation
and it will display the value of each of the variables. I thought I had it right but it keeps telling me there's something wrong with syntax can anyone help me I know it's quite simple but it's really hard for someone with just 3 classes :S

#include <iostream>
#include <string>
using namespace std;
int main()
{
int a=4, b=5, c=1, formula; // designs value for each variable
char m= '0';


cout<<"Formula="<<; // asks for the formula
cin>>formula<<;

if (formula==0)
{
cout<< "Ingrese una formula"<<endl; // if the formula is = 0 display this
}
else
{
cout<< "a=" << a <<endl; //Displays the value
cout<< "b=" << b <<endl;
cout<< "c=" << c <<endl;
cout<< "m=" << m <<endl;
}

return 0;


}
cin>>formula<<;
Theres your problem, remove the extra '<<' at the end
pff... syntax... noob problems thanks
Last edited on
Topic archived. No new replies allowed.