It was a mathematical algorithim operation of addition, subtraction and multiplication. Thankyou for your advice, it helped me to pinpoint and correct my problem. Many thanks
If you're getting errors on cin and cout, you need to make sure that you've included the iostream headers: #include <iostream> And if you're getting errors that say that your compiler doesn't understand cin adn cout, you probably need to add this line at the top: using namespace std; Or replace all your cin and cout statements with std::cin and std::cout. The cin and cout functions are part of the std namespace, and that was a change made a half dozen years or so ago. If you're using an old textbook it probably won't mention that.
#include <iostream> main() { int n , m; cout << "Enter n and m:" << endl; cin >> n; cin >> m; cout << "n + m is" << n+m <<endl; cout << "n - m is" << n-m <<endl; cout << "n * m is" << n*m <<endl; } Code (markup): try to compile and run and let me know if you are getting any error
The problems came from the cin and cout and the main not being implemented like you guys said. Can't thank you enough
expected init-declarator before "cout"?? In function `int main() ?? expected `,' or `;' before "cout" ?? .. These errrors are realy confusing me ? anyone got any ideas? I use name space at the top and have tried the alternative for cin and cout etc. ??