>printf
Printf
> std::cout
fmt.Println
it just works
Exactly
println!("{} {}", 12, 1.3);
print "some shit"
It's print("some shit") now, if you meant Python.
Logger::instance()->log(Logger::LogType::MESSAGE, "kill me");
> int main ()
too real
Shame on you, filthy normie.
Printf is probably on the best output function in any programming language. But I guess flag characters are too much for python fags like you, isn't it?
I meant python 2 dumbass
any language like this?
C++, but only if you're really stupid.
aight, thanks
vs '{:02x}'.format(chr)
Formatted printing is a perfect match for metaprogramming and compile-time evaluations. Compiler statically knows a lot about variables and it could be helpful for types that differ across platforms (e.g. different pointer sizes), but in C it isn't. And the way to do it correctly is ugly as fuck.
On the top C fucks you up with trigraphs.
Mah nigga.
>I meant python 2 dumbass
You are the one using legacy python.. Whos the real dumbass here.
putStrLn "Fuck you all"
>his format strings aren't checked at compile time against the provided arguments
Rust wins again.
Console.WriteLine("Microsoft is da best");
>writeln
based gopher poster
>write
>System.out.println();
you could do that in C++, the standard library is just shit.
How are you supposed to do printf in c++ when your only option is cout?
#include
>System.out.println
>python3
>import nothing
print("%s", "hello world")
print("{}", "hello world"
print("hello", "world")
so many choices
echo
println!
Why did they decide to use an overloaded operator for the print function? Always found that retarded. Just makes it verbose.
>printf_s
#include
fmt::print("Hello, {}!", "world");
:^)
Because it shows the direction of the stream or something.
It's pretty much universally agreed now that it's an example of needless and bad operator overloading.