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++ code file extension? What is the difference between .cc and …

    95 .cpp is the recommended extension for C++ as far as I know. Some people even recommend using .hpp for C++ headers, just to differentiate from C. Although the compiler doesn't care …

  3. Setting an int to Infinity in C++ - Stack Overflow

    I have an int a that needs to be equal to "infinity". This means that if int b = anyValue; a>b is always true. Is there any feature of C++ that could make this possible?

  4. How can I convert int to string in C++? - Stack Overflow

    itoa will be faster than the stream equivalent. There are also ways of re-using the string buffer with the itoa method (avoiding heap allocations if you are frequently generating strings. e.g. for …

  5. How do I fix the error "was not declared in this scope"?

    This is similar to how one would write a prototype for functions in a header file and then define the functions in a .cpp file. A function prototype is a function without a body and lets the compiler …

  6. What does the "::" mean in C++? - Stack Overflow

    Sep 9, 2023 · What does this symbol mean? AirlineTicket::AirlineTicket ()@PaulR Not everyone who arrives upon this question is looking to learn C++. I, for example, just happened to be …

  7. What is the purpose of using #ifdef and #if in C++?

    The meaning of #ifdef is that the code inside the block will be included in the compilation only if the mentioned preprocessor macro is defined. Similarly, #if means that the block will be …

  8. How do I create a GUI for a windows application using C++?

    I am deciding on how to develop a GUI for a small c++/win32 api project (working Visual Studio C++ 2008). The project will only need a few components to start off the main process so it will …

  9. c++ - How to append a char to a std::string? - Stack Overflow

    Supplementary answer, because apparently this answer with many upvotes is suggesting to use push_back('c') while another is suggesting not to. Since both answers were a bit old, let's have …

  10. What does the C++ standard say about the size of int, long?

    I'm looking for detailed information regarding the size of basic C++ types. I know that it depends on the architecture (16 bits, 32 bits, 64 bits) and the compiler. But are there any standards for ...