#Basic Newby C++ error (cin)
25 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
#include <iostream>
int main(){
int x;
std::cout << "type a number: ";
cin << x;
std::cout << "Your number is; " << x;
}
thats my code
Reference to overloaded function could not be resolved; did you mean to call it?
thats my error highlight the "c" in "cin"
Hi
hello
Change your cin << x to cin >> x
Ye
the error is still the same
yes?
#include <iostream>
int main(){
int x;
std::cout << "type a number: ";
std::cin >> x;
std::cout << "Your number is: " << x;
}
Oh wait
Try that
it works!