python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Paradox with default c'tor potentially throwing for a class with a std::string member
Do the C++ "Core Guidelines" prevent (or, at least, strongly discourage) a class with a std::string member from having a default constructor? I ask because of an issue I've noticed when usin...

Adrian Mole
Votes: 0
Answers: 0
What are the downsides to accessing a std::map<std::string, int> using string literals?
I have written a ResourceManager class in C++ that contains a std::map<std::string, Resource>. My current code then accesses these methods using string literals, e.g:
// ResourceManager.h
class ...
michael
Votes: 0
Answers: 1
Run time error: "/home/keith/builds/mingw/gcc........" in VS Code while working with strings
My code is running properly in other online C++ compilers but throws an unexpected error in VS Code. Please find the bug in my code.
VS Code Version - 1.74.3
CODE:
#include <iostream>
#include &...
Ultimate
Votes: 0
Answers: 1
Negating expression in if statement inside macro gives odd results
I've run into a somewhat strange issue. It makes me feel like the answer is blaringly obvious and I'm just not seeing something because the code is so simple.
I basically have a macro called "ASS...
CodeMan
Votes: 0
Answers: 2