Comment by HolyBlackCat on Undefined reference to function in codeblocks...
Your code and the error needs to be attached to the question as text, not an image. (The image hosting you're used doesn't like my country, apparently.)
View ArticleAnswer by HolyBlackCat for How to replace a char within a string in VSCode...
I do some regex and i can find all instances of some-text-that-looks-like-this, i.e.(some-text-.*)\bAfter that, do CtrlShiftP -> Select All Occurences of Find Match to select all matching words.Then...
View ArticleComment by HolyBlackCat on C++ declare pure virtual template function must...
Virtual functions can't be templates.
View ArticleComment by HolyBlackCat on nlohmann::json starts using a lot of memory
Please read about minimal reproducible example and add one to your question. Maybe you're just parsing huge files?
View ArticleComment by HolyBlackCat on Cross-compile clang using own sysroot
You likely want a toolchain file, and set CMAKE_SYSROOT in it.
View ArticleComment by HolyBlackCat on Serialize Vector vs Individual Elements
If Boost can serialize the whole thing in one step, then doing that (instead of manually feeding it each element) is less verbose and therefore better. .write((char*)&recipe, sizeof(recipe))...
View ArticleComment by HolyBlackCat on Image transparency being rendered as black color
Probably need to set the blending mode using glBlendFunc().
View ArticleComment by HolyBlackCat on I am getting (error LNK2019: unresolved external...
You need to tell us what exactly you have in the project settings. If you did it correctly, you wouldn't have the error. Also please format the error message as code too, it's unreadable otherwise.
View ArticleComment by HolyBlackCat on I am getting (error LNK2019: unresolved external...
It's not enough to specify a directory with .libs in it. You have to specify individual .libs as well: stackoverflow.com/a/4446085/2752075
View ArticleComment by HolyBlackCat on Thread local static variables gives seg fault when...
Please don't remove includes from your examples. You're creating more work for anyone who'd want to run this.
View ArticleComment by HolyBlackCat on "The preLaunch Task 'build C program' terminated...
Does it work if you compile from VSCode terminal? Also when you get this error, does the VSCode terminal show anything?
View ArticleComment by HolyBlackCat on Trouble Understanding/Fixing function overloading...
Only the first compilation error really matters. Subsequent errors (and intellisense errors) don't really matter. Fix error: ‘token’ does not name a type first. Did you have token declared? Or perhaps...
View ArticleComment by HolyBlackCat on Pass array of unknown size to function
You don't need an intermediate span, you can pass data directly to my_function.
View ArticleAnswer by HolyBlackCat for What is the purpose of the %n and %t specifiers in...
I think this is because strftime() is often used with a runtime format string (since unlike printf it's possible to implement it in a way that doesn't break on invalid format strings).E.g. the clock...
View ArticleComment by HolyBlackCat on Serialize Vector vs Individual Elements
If Boost can serialize the whole thing in one step, then doing that (instead of manually feeding it each element) is less verbose and therefore better. .write((char*)&recipe, sizeof(recipe))...
View ArticleComment by HolyBlackCat on How can I reference a library I downloaded in...
...but instead of specifying the full path, you'll just use -lcrypopp.
View ArticleComment by HolyBlackCat on Constrained template function never gets called
In particular, it would help if it's a single snippet we can copypaste directly (no missing headers, no multiple files).
View ArticleComment by HolyBlackCat on Cannot view contents of std::vector in VSCode C++...
I see the vector contents correctly, using MSYS2 MinGW and GDB. I guess your version of MinGW doesn't have GDB pretty-printers?
View ArticleComment by HolyBlackCat on Can I specialize class template on constness of...
"as there is no guarantee that memory layout for T and const T is the same" Your link doesn't say that, I believe? It says that vector<T> and vector<const T> can be different, which isn't...
View Article