• 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:

    C++ Questions (1,2,3,4)   [Beginners]
     
    1) Why does "&myChar " act differently in 2 different contexts? [code] char* pointer = &myChar[0]; //ALSO WORKS!!! [/code] Above, it actually return th...
    [66 replies] Last: Peter, I did understand that the code is EXACT duplicates from the ass... (by SubZeroWins)
    Guidelines are not rules   [Lounge]
     
    See: https://arne-mertz.de/2024/03/core-guidelines-are-not-rules/
    [no replies]
    by Zaap
    vector push_back passing size from 0 to overflow   [General C++ Programming]
     
    Hi, please see the following code and the associated prints. I also add the Argument class below. Basically, it crashes the second time it goes in the loop b...
    [3 replies] Last: Bumping this to just give some insight that might be generally helpful... (by Ganado)
    The object itself (this) is it a leak if its constructor throws?   [General C++ Programming]
     
    if the ctor throws, then the object this has already received the memory (some new or alloc has been executed)... so, does the object this leak? the only possi...
    [7 replies] Last: Excellent comments! Thank you again!! (by JUANDENT)
    Visual studio keep aligning assignment operator   [Beginners]
     
    Hi, I want to turn off this type of formatting someLongVariable = false; shortVar = true; [/code] I prefer this [code] someLongV...
    [no replies]
    Convert MATLAB function to C++   [General C++ Programming]
     
    I have a function from a textbook: https://people.maths.ox.ac.uk/trefethen/spectral.html Basically it calculates the Chebyshev differentiation matrix and I hav...
    [14 replies] Last: @mbozzi I think the problem is that duyk is too small to hold the en... (by JamieAl)
    by Zaap
    Threading: changing processor count does not change performances   [General C++ Programming]
     
    Hi, I've been doing some multi-threading in my program. This program essentially iterates over a dataset and for each line computes some stuff. My multi-t...
    [8 replies] Last: [quote=Zaap]I think using a for_each in my code will create an excessi... (by TheIdeasMan)
    by Mif
    C programming / Program is Crushing when in release   [Beginners]
     
    I got this Unhandled exception when I try to run my program in release mod. I don't know what am I doing wrong, and I can't find where I'm exceeded the array bo...
    [12 replies] Last: Also here sortAndFindMax(propValue, 5);[/code] I'm sorting the array ... (by Mif)
    Why is my fft function not working as expected?   [General C++ Programming]
     
    Trying to take the fft of 2D array along one direction (x for example and not y) so it's a 1D FFT of 2D array. I have done this successfully before using Eigen ...
    [9 replies] Last: it makes no difference whether you store your matrix row or column maj... (by jonnin)
    C++ Safety in Context   [Lounge]
     
    See: https://herbsutter.com/2024/03/11/safety-in-context/
    [2 replies] Last: @seeplus Thanks for you post, great to see some fight back for the BS ... (by TheIdeasMan)