+ 2

Is there an alternative to cout?

in Ruby has puts and print Php also has echo and print.

15th Jun 2016, 10:52 AM
Boris Atanasov
Boris Atanasov - avatar
5 odpowiedzi
+ 3
by changing header files we can use printf , scanf instead of this cout
18th Jun 2016, 9:54 AM
Purnima Jaiswal
Purnima Jaiswal - avatar
+ 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'
15th Jun 2016, 12:03 PM
Satan 666
Satan 666 - avatar
+ 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.
16th Jun 2016, 8:12 PM
VPA
VPA - avatar
0
you can use scanf printf of "c" language in c++
15th Jun 2016, 11:35 AM
Md. Mamun Hossain
Md. Mamun Hossain - avatar
0
thanks all
3rd Jul 2016, 5:38 AM
Boris Atanasov
Boris Atanasov - avatar