Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualBitMaster

Posted 09 April 2013 - 01:47 AM

Since your Array class does not implement proper copy semantics you should explicitly delete the copy constructor and assignment operator (in C++11) or set them private (before C++11) to prevent an accidental copy (which never works with that class).

Considering how far your Array class is behind std::vector (both regarding features and correctness in other aspects) I would also strongly suggest that you either make implementing a proper array class the whole point of the learning experience (not as simple as it sounds) or using std::vector.

On a more personal note, if I ever catch you "using namespace std;" at the top of a header I'm forced to use or work with, I will hunt you down.

#1BitMaster

Posted 09 April 2013 - 01:47 AM

Since your Array class does not implement proper copy semantics you should explicitly delete the copy constructor and assignment operator (in C++11) or set them private (before C++11) to prevent an accidental copy (which never works with that class).

Considering how far your Array class is behind std::vector (both regarding features and correctness in other aspects) I would also strongly suggest that you either make implementing a proper array class the whole point of the learning experience (not as simple as it sounds) or using std::vector.

On a more personal note, if I ever catch you "using namespace std;" at the top of a header I'm forced to used or work with, I will hunt you down.

PARTNERS