+ 1

Sir can we use the \n in place of endl..pls reply

26th Jan 2018, 4:23 PM
Pratik Gahane
Pratik Gahane - avatar
3 odpowiedzi
+ 3
Yes, endl just prints a \n character and (manually) flushes the buffer (something that is usually unnecessary).
26th Jan 2018, 4:28 PM
Vlad Serbu
Vlad Serbu - avatar
+ 1
You don't notice the impact of the endl flush but it helps you debugging because everything which is printed is really on the screen. You can also #define endl '\n' when you release the code. Or in Visual Studio, you can also replace all occurences with Ctrl+F.
26th Jan 2018, 5:19 PM
Timon Paßlick
0
thanx sir for reply
26th Jan 2018, 4:32 PM
Pratik Gahane
Pratik Gahane - avatar