About 21,000,000 results
Open links in new tab
  1. What does '&' do in a C++ declaration? - Stack Overflow

    I am a C guy and I'm trying to understand some C++ code. I have the following function declaration:

  2. c++ - How do you loop through a std::map? - Stack Overflow

    I want to iterate through each element in the map<string, int> without knowing any of its string-int values or keys. What I have so far: void output(map<string, int> table) { m...

  3. When to use extern in C++ - Stack Overflow

    I'm reading "Think in C++" and it just introduced the extern declaration. For example: extern int x; extern float y; I think I understand the meaning (declaration without definition), but I wonde...

  4. c++ - Unresolved external symbol in object files - Stack Overflow

    For a template class, the member functions have to be declared in the header file. You can resolve the issue by defining the member functions inline or right after the class definition in …

  5. How to properly add include directories with CMake

    │ ├── main.cpp //the main function │ └── parser //parses the command-line input │ ├── CMakeLists.txt │ ├── parser.cpp │ └── parser.hpp └── tests //contains two unit tests using …

  6. C++ catching all exceptions - Stack Overflow

    Note that most crashes are not caused by exceptions in C++. You can catch all exceptions, but that won't prevent many crashes.

  7. What's the difference between constexpr and const?

    What's the difference between constexpr and const? When can I use only one of them? When can I use both and how should I choose one?

  8. parsing - Parse (split) a string in C++ using string delimiter ...

    see this question implement reading files and splitting strings with c++20.

  9. visual studio - C++ cannot open source file - Stack Overflow

    There is more information here on how to deal with this problem: Where does Visual Studio look for C++ header files? For me, I followed xflowXen's answer and then at "Include Directories" …

  10. c++ "Incomplete type not allowed" error accessing class reference ...

    Had some issues in my code recently surrounding what I now know of as a Circular dependency. In short there are two classes, Player and Ball, which both need to use information from the …