I am writing a C++ code for a class that has to convert yards and feet to inches and add up all the values to get the total number of inches. When I try to run the code in Visual Studio I get an error that says "error C4430: missing type specifier - int assumed"
#include <iostream>
usingnamespace std;
main()
{
int yards;
int feet;
int inches;
int answer;
cout << "Enter the number of yards: ";
cin >> yards;
cout << "Enter the number of feet: ";
cin >> feet;
cout << "Enter the number of inches: ";
cin >> inches;
answer = ((yards * 36) + (feet * 12) + (inches));
cout << "The total number of inches is " << answer << endl;
return 0;
}