+ 1

Can we get the output of any string without using cout and print f

please reply as fast as you can

8th Jan 2017, 6:55 AM
priyanshu
priyanshu - avatar
6 Réponses
+ 3
int main() { clog <<"Hello"; cerr <<" world"; return 0; }
8th Jan 2017, 7:02 AM
ASNM
ASNM - avatar
+ 1
Nah. For C++, console-based output is done via std::cout. Why wouldn't you want to use them?
8th Jan 2017, 7:00 AM
Cohen Creber
Cohen Creber - avatar
12th Aug 2017, 7:39 PM
Germain F
Germain F - avatar
0
makaji what is clog and cerr here refer to
8th Jan 2017, 7:03 AM
priyanshu
priyanshu - avatar
0
you can use std::cerr and std::clog. They write to stderr instead of stdout, but from the user's perspective
8th Jan 2017, 7:10 AM
ASNM
ASNM - avatar
0
cerr: std unbuffered error stream clog: std buffered error stream try writing some codes with them. you'll know their use
11th Aug 2017, 3:15 PM
Germain F
Germain F - avatar