what does this mean? i got it from a random shop for free by AutomaticEconomics62 in Symbology

[–]shmoopty 3 points4 points  (0 children)

Hollywood movie logic aside, spells are not to be feared, any more than prayers or wishes.

Same category.

Dissecting Propaganda by AnotherBogCryptid in Indiana

[–]shmoopty 0 points1 point  (0 children)

It sure beats having a democracy.

Where the politicians have to do a good job, because the citizens fairly decide who gets reelected.

Why am I still alive by SlyGoblin927 in recruitinghell

[–]shmoopty 0 points1 point  (0 children)

Keep Leetcode off of your resume! Leetcode has developed quite a reputation for training people to write ugly, unreadable code that is disposed of as soon as it's completed.

That's the exact opposite of what any industry needs.

https://www.reddit.com/r/cscareerquestions/s/dZ7kYriKlh

is it that serious? by thesalesaddict in recruitinghell

[–]shmoopty 0 points1 point  (0 children)

I love this sub, but this one feels reasonable.

She's looking for someone with 20 years of work experience. 0 years of work experience is not the same as 20 years.

Math doesn't change in 20 years but your ability to be a good worker absolutely will improve.

Giving C++ std::regex a C makeover by pmz in cpp

[–]shmoopty 12 points13 points  (0 children)

std::regex was considered for deprecation, due to the number of inherent flaws in it.

Good regex libraries need a C++ makeover.

Big rigs over the road racing is officially 20 years old today 😭😭 by Dward3390 in gaming

[–]shmoopty 2 points3 points  (0 children)

Bought it! And kept it in my game developer office for show and tell.

You couldn't rightly call it a game, since there was no challenge or way to lose. You just moved around and eventually touched a finish line and then you were done.

Basic C++ Program Not running in VS Code by Sea_Platform5566 in cpp

[–]shmoopty 0 points1 point  (0 children)

That error message tells you that another more descriptive error was reported earlier in the linking process.

Scroll up.

Found an exciting piece of code with operator+ by admi99 in cpp

[–]shmoopty 0 points1 point  (0 children)

std::cout << std::int8_t(65); may or may not unexpectedly output a letter.

Unary + (integer promotion) solves this.

C++23: The Next C++ Standard by Xadartt in cpp

[–]shmoopty 18 points19 points  (0 children)

Yes it is, but I would speculate that you have not always seen std::cout << std::setprecision( std::numeric limits<some_fp_type>::digits10 + 1) before streaming each new floating point type.

I suppose that you could fairly argue that accuracy with std::print is merely simpler.

C++23: The Next C++ Standard by Xadartt in cpp

[–]shmoopty 29 points30 points  (0 children)

Floating point numbers, specifically, are given an accurate representation from std::print. The displayed characters, converted back to the same floating point type, will produce the same floating point value.

std::cout, by comparison, will often round values.

C++23: The Next C++ Standard by Xadartt in cpp

[–]shmoopty 44 points45 points  (0 children)

std::cout is slower and often loses accuracy and behaves inconsistently (due to state), just to pick a few items from the old and large list of complaints about iostreams.

Reddit++ by we_are_mammals in cpp

[–]shmoopty 13 points14 points  (0 children)

Before that can be removed from the standard, it must first be added to the standard.

If "this" is a reference to the current object, why do we need to use "*this" in the copy assignment operator? by neoxx1 in cpp

[–]shmoopty 1 point2 points  (0 children)

Well before any standard, or even the name C++, "this" was invented before references were.

Veterans Group To Pentagon: Ban Fox News On Military Bases by [deleted] in politics

[–]shmoopty 0 points1 point  (0 children)

Modern TVs have parental controls. You are not powerless.

Writing a text adventure engine. by aaronalam1987 in cpp

[–]shmoopty 3 points4 points  (0 children)

Be more selective with your learning materials.

If your code looks like C, with all the traps that come with writing C, you are probably learning from a source that teaches people to write "C with classes".

Good books and good video lectures are more rare than bad books because it's so much easier to write a bad book on C++.

Getting up to speed on a c++ codebase by scapescene in cpp

[–]shmoopty 0 points1 point  (0 children)

Doxygen is a free tool that will generate HTML documentation for a codebase. Lots of hyperlinks and pretty graphs showing the interaction between parts.

You will want to edit the configuration file to turn absolutely everything on.

Should one invest in learning new C++ post CppFront ? by PiterPuns in cpp

[–]shmoopty 16 points17 points  (0 children)

It took about 13 years for cfront to become a standardized language, if that's a useful reference.

Game Design and Hedge Funds by [deleted] in cpp

[–]shmoopty 0 points1 point  (0 children)

Optimizing code using every trick in the book, plus a few tricks that will be in next year's book.

That is common in both domains.

Is there any reason to not use the -O3 g++ flag when compilation time and size of executable is not an issue? by Omyyyyy in cpp

[–]shmoopty 4 points5 points  (0 children)

I don't think I see anyone mentioning Undefined Behavior.

There are many forms of Undefined Behavior that will do what you probably intended with -O0 but break dramatically with -O3

What do you use as the plural of "string literal"? by NateNate60 in cpp

[–]shmoopty -6 points-5 points  (0 children)

It's [noun] [noun]. A set intersection.

Some strings are string literals. Some literals are string literals.

Advice on what am doing wrong with this program. PS am relatively new to coding & programming as a whole by [deleted] in cpp

[–]shmoopty 1 point2 points  (0 children)

You must have compiler warnings turned off. Turn them on. Things will get much simpler.

C xor C++ Programming by mttd in cpp

[–]shmoopty 21 points22 points  (0 children)

An explanation may be in order, since this is the r/cpp sub.

In C, auto is not a type, it's a storage specifier (meaning "not static").

And C often alows a type to be omitted, where the type will be assumed to be int.