Quantcast
Channel: User HolyBlackCat - Stack Overflow
Browsing all 1287 articles
Browse latest View live
↧

Comment by HolyBlackCat on Invalid use of incomplete type with forward...

This is illegal if you later provide a different definition of CTest.

View Article


Comment by HolyBlackCat on How to install a cpp library

What is your OS and compiler? What library are you installing?

View Article


Comment by HolyBlackCat on C++ compiles but doesn't run (VSCode only )

You don't need -lstdc++fs in modern GCC. Also try compiling and running directly from MSYS2 terminal.

View Article

Comment by HolyBlackCat on Why SDL defines main macro?

@DominicGrenier You don't need any of that (patching SDL). When MinGW says "undefined reference to WinMain", it will happily accept eitherWinMainormain.

View Article

Comment by HolyBlackCat on Downgrading MSYS2 to a specific Mingw / gcc version

@PauloCarvalho I was going to suggest submitting a bug, but you already did that. :) If you have time, I'd recommend trying to reduce this error to a minimal example that doesn't depend on VTK (or...

View Article


Comment by HolyBlackCat on How would I implement these moves?

You need to sit and think about it. You're stuck for a specific reason, figure out what is it (what exactly you have difficulty with?). We can't help you because we have no idea what game you're trying...

View Article

Comment by HolyBlackCat on OOP Fundamentals: What are the 4 Essential...

Why exactly four? Is this a homework/exam question?

View Article

Comment by HolyBlackCat on Import C single header library in C++

Report it as a bug to the library developers. Keeping C libraries compatible with C++ is usually desired.

View Article


Comment by HolyBlackCat on C++ virtual function not overriding

n = name; h = health; a = attack; this looks backwards. You would've noticed this if you used your debugger.

View Article


Comment by HolyBlackCat on sdl initialization failed: no available video device

Did you build SDL2 yourself or install from the package manager? Self-built versions will sometimes do this if you fail to install the required dependencies before building them (the list of packages...

View Article

Comment by HolyBlackCat on Weird behaviour with std::vector in c++

Modifying a container while iterating over it with a ranged-for loop results in UB. Anyway, it seems you want std::map rather than std::vector (but debugging the issue with vector probably has learning...

View Article

Comment by HolyBlackCat on Does gcc compiled executable LSB imply "Least...

@cpprust There are two different things here: bit order in bytes (on hardware level), and the order of bitfields (as chosen by GCC). The former can't exist in the first place, because there is...

View Article

Comment by HolyBlackCat on ASAN does not detect buffer overflow

You don't need the placement-new, this reproduces on a plain array: godbolt.org/z/Y5Pc3TKvT (on both Clang and GCC). Interestingly, I can also repro on non-thread-local array (but only on GCC, Clang...

View Article


Comment by HolyBlackCat on Access address of derived class data member in...

Under common sense this is a false positive. I'd silence it with a pragma and move on.

View Article

Comment by HolyBlackCat on Clang fails to instantiate `operator!=()` from...

Unsure if auto is supposed to work or not, but the fact that it starts working when you change fun() to the second snippet is definitely a bug.

View Article


Comment by HolyBlackCat on How to guarantee the existence of a...

Compilers don't optimize away function calls with side effects. If it's get_tzdb_list that initializes the database, then (void)std::chrono::get_tzdb_list(); is enough.

View Article

Comment by HolyBlackCat on libraries for creating TUI

Or pdcurses.... (I think the best variant of *curses* on Windows, might be good elsewhere too)

View Article


Comment by HolyBlackCat on Getting "undefined reference" errors to Qt symbols...

I think some linkers (LLD?) don't have this limitation. Otherwise not sure why it worked for you before. I don't really want to write an answer, this is likely a duplicate.

View Article

Comment by HolyBlackCat on Can't install C compiler

Is this a fresh msys2 installation? Did you disable your antivirus software?

View Article

Comment by HolyBlackCat on Ai 3D enemies using visual scripting

You need to be more specific. What programming language and/or game engine, what have you tried, what specific issue you have with your implementation... And this should probably be posted on...

View Article
Browsing all 1287 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>