Simple C++: Printing with std::print

  Рет қаралды 930

Nick

Nick

Күн бұрын

In this video we look at the basics of printing with std::print!
Compiler Explorer Link: godbolt.org/z/...
cppreference Link: en.cppreferenc...
For code samples: github.com/coff...
For live content: / coffeebeforearch

Пікірлер: 6
@ohwow2074
@ohwow2074 5 ай бұрын
Nice that you started with C++23
@theintjengineer
@theintjengineer 5 ай бұрын
Yaaay. New C++ stuff❤
@udomtipparach4894
@udomtipparach4894 3 ай бұрын
I used VS code on windows 10, but it doesn't work. how can I run C++23 on VS code windows 10?
@enkidughom2508
@enkidughom2508 5 ай бұрын
Hey Nick! Do you do 1-on-1 mentoring? I am a deep learning engineer by trade. I have a CS and applied math degree and want to switch to doing deeplearning compiler and performance engineering.
@anon_y_mousse
@anon_y_mousse 5 ай бұрын
This will sound kind of weird, but I'm disappointed with the committee for adding yet another method for printing things, yet still not adding f-strings. Positional arguments are error prone and it's better for correctness to use std::cout even if it looks like garbage. However, if they had added f-strings, and admittedly that'd take a LOT of effort from compiler authors to implement, they could get a nice clean syntax that eliminates the positional argument problems. Probably not interesting, but I found when implementing them for my own language, that as I was doing so from scratch it was actually not particularly difficult to fit them in. Basically, I just have my compiler load const sections and run them at compile time and where types are not fully formed at compile time I split the string at those points and generate a call for the appropriate conversion function at run time. So in the worst case it works like std::cout, and in the best case it works like std::fputs() with a string literal. Of course, I fully admit that because I was doing things from scratch it was significantly easier to implement as I designed around this as one of my goals, but for preexisting compilers, especially those that use parser/lexer generators, it's not going to be as easy.
@nicolascosta1349
@nicolascosta1349 9 күн бұрын
*"If (Score > 85) { std::print("pass"); } else { std::print("failed");}"* Ahh Test😮
Simple C++: The Main Function
5:57
Nick
Рет қаралды 783
Software Development with C++: Debugging with GDB
15:02
Nick
Рет қаралды 1,9 М.
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
C++ Super Optimization: 1000X Faster
15:33
Dave's Garage
Рет қаралды 339 М.
one year of studying (it was a mistake)
12:51
Jeffrey Codes
Рет қаралды 344 М.
Arenas, strings and Scuffed Templates in C
12:28
VoxelRifts
Рет қаралды 108 М.
Beneath C++: Understanding Assembly
8:22
Nick
Рет қаралды 1,6 М.
How the C++ Compiler Works
17:55
The Cherno
Рет қаралды 844 М.
how NASA writes space-proof code
6:03
Low Level
Рет қаралды 2,4 МЛН
Writing Code That Runs FAST on a GPU
15:32
Low Level
Рет қаралды 585 М.
Linus Torvalds: Speaks on Hype and the Future of AI
9:02
SavvyNik
Рет қаралды 354 М.
Software Development with C++: CMake Libraries
13:03
Nick
Рет қаралды 2 М.
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН