0
What should you use ?
I guy asked me should he use "Cin-Cout" or "Scanf-Printf" Well ... Which one will be your choice : "Car" or "Plane" ?
8 Answers
+ 2
scanf() and printf() are input/output functions in C. In C++, you do this by sending stuff from cin and to cout respectively instead.
Example:
int n;
cout << "Type a number" << endl;
cin >> n;
cout << "You entered: " << n << endl;
+ 2
As I said, scanf() is a C function, not a C++ one. C++ isn't just an extension of C.
+ 1
Hum, what?
0
I mean, what the different between "Cin-Cout" and "Scanf-Printf"
0
Thanks alot
And oh ... One more question please :
Why i can't use the "Scanf" in this shell ? It works with "Cin"
0
OMG, THANKS ALOT BRO !
0
In scanf and printf statement we have to specify which type of input or output we want to use with % sign. Like scanf("%d", &x) and in printf("%d", x).
But with cin and cout programmer don't have to remember the data type of variable or functions. Because they are variable instance of istream for cin and ostream for cout. Which are declared in iostream.
For example
cin>>x;
cout<<x;
0
Car or plane?
Car : cout and cin
Plane : PRINTF and scanf
How did you think this?!
Anyway,I choose Car as my Pokemon :(



