Recent content by Passerby

  1. P

    C/C++ Why aren't insert, erase, and find working in my script?

    These lines have the same effect. There is no need to "assign a value" to used_str. It is default-constructed.
  2. P

    Make_shared pointer is giving me issues

    Your code neither refers to data members of c1 nor invokes virtual functions, so the implicit and uninitialized this pointer is unused. Therefore the incorrect code happened to work.
  3. P

    Make_shared pointer is giving me issues

    Whether the program compiles does not decide whether it is fully correct. The advice you received that the raw pointer was uninitialized was correct. If you compiled with -Wall, the compiler would warn you about this. As for the compile-time error, this is invalid syntax for calling a function...
Back
Top