Printf() vs cout

printf() vs cout
whats your opinion on it

Attached: Download.jpg (1280x720, 71K)

Console.WriteLine()

w

echo

print!

fprintf

logger.LogVerbose()

If you want a console output sink, then by all means but that's no excuse for lacking proper logging.

they both suck ass
formatted output should be handled with variadic macros

cout is niggerlicious

write(2)

thats what i was thinking

print()
console.log()

There is no cout in C

Kind of a pain in the ass to format the cout output.

Not C vs C++ again!... GTFO!

(format t)

System.out.println();

printf() is a 1970s way of programming. The whole %s, %d, etc ordeal is laughable considering all variable types in C are known at compile time. Ought to be printf("%1 %2 %3", var1, var2, var3);
cout handles this gracefully.

putStrLn

There is nothing wrong with the 1970's way of programming.

I can print an array of chars as an array of uint_64_t and blow my stack.

Don't do that, then

printf is easier to reason about

Why not, the standard lets me and the community encourages broken code and UB.

That breaks down as soon as you want some extra specifiers like numeric precision, scientific notation, space/zero pad, left/right alignment, etc.
Then you need to know the data types in the format string.

People who write C for actual programs (and are competent) don't promote either. (See: kernel development)

Every zoomer technology in a nutshell: marginally easier for hello-world case, significantly harder or straight up impossible for any real world scenario.

gcc has had warnings for printf since ages.

They do, reinterpret cast (casting pointers) is UB. Still doesn't matter because compilers won't whine.
ostream has all such specifiers built in or you could fetch member variables yourself if you really really need something different from the overloaded operator

echo

>warnings should be fatal errors by default
>>>/rust/

printf() is idiomatic, cout is math symbolism.

fmt.Println()

import std.stdio;
writeln()

you're not still using C are you user?

Checkout fmt library, it's part of upcoming c++20

based an redpilled

probably something in libicu/boost since everything c++ comes with is flawed in some way

Rust has warnings you retarded wannabe hacker.

D's writeln is better than both.

Printf. Better and less verbose formatting.

Quick! What are the right format specifiers for printing
>size_t
>unsigned short
>long double
If you have to look it up, you fail the test.
If it takes you more than 10 seconds to answer this, you fail the test.

System.out.println()

console.log()

The stream formatters in C++ are a mess. Some of them are sticky, so you need to set and unset them, which is a nightmare when your formatting changes multiple times in a single output. And they are global to boot, so hello race conditions.

Hello Sir, needful to best is useing the DURGASOFT JAVA. Firstly is use the global SYSTEM class, with the OUT JAVA stream. Needfully calling func. doing PRINTLINE.
System. out. pritln( ) ; //

Attached: durgaking.jpg (450x399, 140K)