• 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 zzzhhh
    Where is const mandated in the Standard when binding an lvalue reference to an rvalue?   [Beginners]
     
    I'm reading the part of the Standard about initializing an lvalue reference from an rvalue (https://eel.is/c++draft/dcl.init.ref#5.3 ). I know a reference to co...
    [1 reply] : I don't think I've ever actually read the standard in over 30 years of... (by seeplus)
    by zapshe
    AI is something special (1,2)   [Lounge]
     
    I feel like AI is getting overlooked by many. I feel like I have a real professional in any field I want to learn about just waiting for me to ask things. Yes,...
    [24 replies] Last: Let's write a function that takes an input and an output and gives a ... (by zapshe)
    by zzzhhh
    Should the subscript "opt" be dropped in the definition of "array of N T" in the standard?   [Beginners]
     
    This is the definitive syntax of "array of N T" in C++ Standard https://eel.is/c++draft/dcl.array#1 : D1 [ constant-expression_opt ] ... [/quote] I think t...
    [2 replies] Last: Thank you! (by zzzhhh)
    stack and heap   [Beginners]
     
    Hi, I have some programming concepts question: Why is stack (in context of stack and heap) considered LIFO (last in first out)? The last time i checke...
    [8 replies] Last: I guess that you are talking about "program stack"[/quote] Yes. But n... (by kigar64551)
    Short films worth watching   [Lounge]
     
    I don’t particularly like horror, but this one was great! The Curse of Dracular[/b] https://youtu.be/kjd6jETfd5c?si=Oa9pabr4-kvrHC6v (Contains a claymatio...
    [8 replies] Last: LOL, yeah, it was Melissa driving, I wasn’t in the car, but she saw an... (by Duthomhas)
    by zzzhhh
    Which item stipulates that A() is a prvalue?   [Beginners]
     
    class A { ... }; A(); [/code] This webpage lists all possible forms of prvalue expressions: https://en.cppreference.com/w/cpp/language/val...
    [2 replies] Last: I believe that A() is a function-style cast expression and is covered ... (by mbozzi)
    How to compare int class template value?   [Beginners]
     
    I'm aware I should use std::string but this is question is about using template specialization a specific way. I'm learning about template specialization and ...
    [2 replies] Last: 2. That's a good point. Only up to MAX_CSTR_SIZE-1 bytes will be copie... (by ElusiveTau)
    Template errors creating a map<int,std::thread> using map::emplace   [Beginners]
     
    I created a class to try out std::lock_guard. The first function, UnsafeExample[/code] compiles and runs fine. The second example, [code]SafeExample[/code] d...
    [2 replies] Last: Thanks Peter. That was it. 1. std::ref(coutMutex) was necessary, for ... (by ElusiveTau)
    How to initialize base class member with subclass member?   [Beginners]
     
    I'm working with code where CustomThreadApi[/code] is not modifiable. CustomThreadApi has a ctor that takes a [code]const char*[/code]. I would like to assign ...
    [2 replies] Last: baseClassBuff is unnecessary. I can just reuse MyThreadClass.Name[/co... (by ElusiveTau)
    Removing double quotes from Cstring   [Beginners]
     
    Hi, sorry its late... I am trying to do a few things with strings. - I need to remove double quotes from a users input - Then the string needs to be divide i...
    [8 replies] Last: You only get double quotes if some component of the filename path has ... (by Duthomhas)