Hello. I have a pretty simple question.
Is it possible to cin >> an integer? like this:
#include <iostream.h>
int main()
{
int input[5];
cin >> input;
cout << input;
return(0);
}
I ask because I don't have my VC++ up and running yet.
Printable View
Hello. I have a pretty simple question.
Is it possible to cin >> an integer? like this:
#include <iostream.h>
int main()
{
int input[5];
cin >> input;
cout << input;
return(0);
}
I ask because I don't have my VC++ up and running yet.
not really.You are declaring an array but you dont need one. this is the amended code...
Code:#include <iostream.h>
int main()
{
int input;
cin >> input;
cout << input;
return(0);
}
I think no because u must put the element to input the number.