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

Comment by HolyBlackCat on How can I lock a rigidbody's rotation on all axis?...

Please don't add solved to the title. Press the checkmark next to your answer when the cooldown lets you.

View Article


Comment by HolyBlackCat on Declare unique identifiers in for loop

It's destroyed at the end of each iteration anyway, so it doesn't matter if it's unique or not. In general, it's impossible to generate variable names at runtime.

View Article

Comment by HolyBlackCat on The program does not start. Why?

Your link doesn't work. Whatever was in it, you should add it directly to the question text. Please explain what exactly you do (what compiler, how do you compile the code, how do you run the result).

View Article

Comment by HolyBlackCat on Using both C99 and C++11 in Code::Blocks 16.01

Just ignore the CB's checkboxes, and manually type in the flags. There's an "other flags" textbox somewhere in project settings.

View Article

Comment by HolyBlackCat on reinterpret_cast always check even branch omitted...

A fake template isn't the solution. It's only guaranteed to work if the error you want to silence depends on the template parameter. E.g. you could template this function, making MaaHwnd a template...

View Article


Comment by HolyBlackCat on Are class members with a member initializer...

If the constructor initializes a variable in the member init list, then the in-class initializer is ignored.

View Article

Comment by HolyBlackCat on Check c++ version in windows

"available with all compilers that implement those standards" Not in MSVC though, at least not by default.

View Article

Comment by HolyBlackCat on VS code installation issue

"shown error occurred" Which one?

View Article


Comment by HolyBlackCat on slow movement when trying to increase player x or...

Please add a minimal reproducible example.

View Article


Comment by HolyBlackCat on Is it possible to create a perfect pass-through...

"Is it possible to differentiate between prvalues and xvalues in function parameters" Not directly. You could pass decltype of the argument as a template parameter (using a macro to avoid typing the...

View Article

Comment by HolyBlackCat on c++ standard libraries linking

-static linker flag should work. But it's a better idea to distribute the dlls next to your executable, so the user can update them if needed. Also there are some libraries (not the standard ones) that...

View Article

Comment by HolyBlackCat on Why private data members of a const object are not...

They meant "compile-time constant".

View Article

Comment by HolyBlackCat on Why private data members of a const object are not...

If std::vector is a better solution, why not show that in the answer instead?

View Article


Comment by HolyBlackCat on How can I statically link standard library to my...

With -static-libgcc -static-libstdc++ you still link dynamically against libwinpthread, on MinGW distributions that use it (e.g. MSYS2). Just use -static to statically link everything.

View Article

Answer by HolyBlackCat for Is a std:.span::iterator considered an iterator...

This is UB.The point of this rule is that the vector might reallocate the buffer and/or move the elements around before dereferencing your iterator.This is equally problematic for vector iterators,...

View Article


Comment by HolyBlackCat on Why is std::vector slower than new[] in this case?

Please provide a complete code (don't remove the headers, make sure we can compile it as is), and say what compiler and compiler flags you're using.

View Article

Comment by HolyBlackCat on Better Way to Output This Numbers and Asterisks...

Post this to codereview.stackexchange.com

View Article


Comment by HolyBlackCat on How to make unique data type for string literal?

Does this answer your question? stackoverflow.com/a/68024633/2752075

View Article

Comment by HolyBlackCat on How do I initialize OpenGL before GLFW?

I don't think it's possible. You could create an invisible window and use it to render. There are also software GL implementations not requiring a window (Mesa had somethinig).

View Article

Comment by HolyBlackCat on Is there a function can modify map's value and...

Is there any reason to do this instead of .insert_or_assign() as suggested in comments?

View Article
Browsing all 946 articles
Browse latest View live




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