+ 2
Is there an alternative to cout?
in Ruby has puts and print Php also has echo and print.
5 odpowiedzi
+ 3
by changing header files we can use printf , scanf instead of this cout
+ 2
instead of iostream.h ... you can write stdio.h
which supports printf() (which is an alternative of cout) and scanf( which an alternative of cin).
The syntax is a bit different too in case of printf() and scanf().
printf("hello world"); // prints hello world
scanf("%d",&x); // %d is used for integer values and &x is the address of the variable x where the user input will get stored in form of integer
Also this is in Turbo C++. I don't know about other IDEs'
+ 1
Why would you need one? It is better to have only one way to do things. Get to know C style but never actually use it.
0
you can use scanf printf of "c" language in c++
0
thanks all