Hi all, i'm new here and new to programming. Searched forums but for some reason still can't find the solution to this errors I'm getting:
error: invalid operands of types ‘std::ostream’ and ‘const char [39]’ to binary ‘operator<<’
Heres the code:
#include <iostream>
using namespace std;
int main()
{
int input, inches, feet, yards, x;
x=5280;
cout << "Enter a number in inches:";
cin << input;
Vlad: here is the error message:
a.cpp: In function ‘int main()’:
a.cpp:53:10: error: invalid operands of types ‘std::ostream’ and ‘const char [26]’ to binary ‘operator<<’
a.cpp:65:11: error: invalid operands of types ‘std::ostream’ and ‘const char [13]’ to binary ‘operator<<’
a.cpp:66:10: error: invalid operands of types ‘std::ostream’ and ‘const char [10]’ to binary ‘operator<<’
a.cpp:66:47: error: invalid operands of types ‘std::ostream’ and ‘const char [8]’ to binary ‘operator<<’
a.cpp:67:24: error: invalid operands of types ‘std::ostream’ and ‘const char [6]’ to binary ‘operator<<’
a.cpp:68:25: error: invalid operands of types ‘std::ostream’ and ‘const char [8]’ to binary ‘operator<<’
a.cpp:76:10: error: invalid operands of types ‘std::ostream’ and ‘const char [39]’ to binary ‘operator<<’
btw i changed inches = yards/432 to inches = input;