Search:

Type: Posts; User: laserlight

Search: Search took 0.26 seconds.

  1. You can use std::swap to implement your swap...

    You can use std::swap to implement your swap member function.

    Your one parameter/default constructor probably should be declared explicit. Also, since you initialise size, there is no need to...
  2. That is, it is not a copy assignment operator. It...

    That is, it is not a copy assignment operator. It is an assignment operator that allows assignment of integers to the object, with an unusual return type and missing return statement.


    If that...
  3. If you intended to declare a copy assignment...

    If you intended to declare a copy assignment operator (and you probably did), then you are doing it wrong. It should be declared as:

    A& operator=(const A& right)
    and remember to return *this.
    ...
Results 1 to 3 of 3