About 12,100,000 results
Open links in new tab
  1. Returning multiple values from a C++ function - Stack Overflow

    Aug 19, 2015 · Is there a preferred way to return multiple values from a C++ function? For example, imagine a function that divides two integers and returns both the quotient and the …

  2. The static keyword and its various uses in C++ - Stack Overflow

    Mar 6, 2013 · B. 'static' keyword used for functions in terms of functions, the static keyword has a straightforward meaning. Here, it refers to linkage of the function Normally all functions …

  3. c++ - Meaning of `= delete` after function declaration - Stack …

    Aug 17, 2014 · Before the deleted function concept of C++11, one could do this by simply omitting the definition of the primary function template, but this gave obscure undefined reference …

  4. variadic functions - Variable number of arguments in C

    505 In C++11 you have two new options, as the Variadic arguments reference page in the Alternatives section states: Variadic templates can also be used to create functions that take …

  5. c++ - Return array in a function - Stack Overflow

    Aug 13, 2010 · 140 C++ functions can't return C-style arrays by value. The closest thing is to return a pointer. Furthermore, an array type in the argument list is simply converted to a pointer.

  6. Function for C++ struct - Stack Overflow

    Usually we can define a variable for a C++ struct, as in struct foo { int bar; }; Can we also define functions for a struct? How would we use those functions?

  7. How to call C++ function from C? - Stack Overflow

    I know this. Calling C function from C++: If my application was in C++ and I had to call functions from a library written in C. Then I would have used //main.cpp extern "C" void C_library_func...

  8. c++ - How to correctly use Boolean functions? - Stack Overflow

    3 When creating functions or using them always remember to start with the signature. Think what will this function need to work with, and what will it return. You need to return if something is …

  9. Why do we need virtual functions in C++? - Stack Overflow

    Mar 6, 2010 · Virtual functions avoid unnecessary typecasting problem, and some of us can debate that why do we need virtual functions when we can use derived class pointer to call the …

  10. Is it a good practice to define C++ functions inside header files?

    Using static also works because of fact that static functions are not exported from object file and in this way can't interfere with other functions with the same name during linkage. It's also OK to …