• home

Tutorials

  • C++ Language: Learn this versatile and powerful programming language. Includes detailed explanations of pointers, functions, classes and templates, among others...
  • Reference

    Description of the most important classes, functions and objects of the Standard Language Library, with descriptive fully-functional short programs as examples.
    Browse the C++ Reference

    Articles

    User-contributed articles, organized into different categories.
    You can contribute your own articles!
    Browse Articles

    Latest forum activity:

    by jNc
    How to return array of doubles? (1,2)   [Beginners]
     
    #include <iostream> using namespace std; double *f(); int main() { double *ptrToDouble = f(); cout << ptrToDouble[0] << endl; cout...
    [20 replies] Last: > The reasons given for it are just arm waving to support a preference... (by JLBorges)
    by jNc
    How to delete dynamically allocated object if Out of Scope   [Beginners]
     
    Assume, Object 1 function 1 calls Object 2 function which return value, value is dynamically allocated var, then Object 1 function 2 use variable returned abov...
    [8 replies] Last: > if something was allocated in a dynamic library, it should be destr... (by JLBorges)
    by frek
    Raw and smart pointers   [Beginners]
     
    int* foo(int n) { return new int(n * 2); } int main() { std::cout << *foo(12); } [/code] Here we've a raw pointer that should be [code]delete[/code]d befor...
    [6 replies] Last: [quote=mbozzi]The compiler could evaluate new int and g() before const... (by Ganado)
    AssertNonvoid function   [Beginners]
     
    Hi folks. I am working with spi drivers example in C language. in this path: https://github.com/Xilinx/embeddedsw/blob/master/XilinxProcessorIPLib/drivers/s...
    [1 reply] : its a debugging function to tell you the file and line number where th... (by jonnin)
    by Geckoo
    Leave Handle after CIN   [Beginners]
     
    My question is so stupid that it's a shame to post it here :) I have a console application which launches after requesting another process. In the console the ...
    [1 reply] : Finally I found a solution according to my previous attempt using : Se... (by Geckoo)
    How much attention do pay to coding style? (1,2)   [Lounge]
     
    I would like to hear from you how much attention do you pay to the following: 1. Coding style - ex. naming convention, symbol casing and similar subjective ...
    [29 replies] Last: the frequency and volatility are the key. if you run one every 5 min... (by jonnin)
    Is it possible to delay base class ctor call in member initializer list?   [Beginners]
     
    #include <iostream> struct Sample { int x = 0; Sample() {} Sample(int value1) : x(value1) {} }; struct DSample : public Sample { int y = -1...
    [3 replies] Last: [quote=Peter87]This might be necessary if you need to do calculations ... (by ElusiveTau)
    Multithreading in a dll   [General C++ Programming]
     
    I wanted to make two functions running in the background at the same time inside dll My dll #include <Windows.h> #include <iostream> DWORD WINAPI MainT...
    [6 replies] Last: You have made a great effort for my sake, thank your (by Hawlong)
    by jNc
    how to pass some data to string   [Beginners]
     
    Assume, I need to pass some data to buffer for future copy to terminal or so on. How can I proceed? I know only stupid way with WinAPI (VK_CONTROL) Looking ...
    [5 replies] Last: [quote=George P]The WinAPI virtual key codes are #defines, they are re... (by Peter87)
    Span Vs Vector   [Beginners]
     
    I occasionally tune into "C++ Weekly" on Youtube, and this is today's video: https://www.youtube.com/watch?v=zCzD9uSDI8c "C++ Weekly - Ep 361 - Is A Better `ma...
    [9 replies] Last: A generated html version of the current working draft: http://eel.is/c... (by JLBorges)