what is wrong with this???

This is a discussion on what is wrong with this??? within the C++ Programming forums, part of the General Programming Boards category; okay, let's get to the point
Code:
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
class Matrix {
public:
...

Variable definitions should be before anythign else. This way a reader doesn't have to scan your entire code looking for the type of the first variable they encounter.

it is customary to use this->Row for class specific variables, so they reader knows you mean teh class specific version and not some possible global version, particularly given that you havent yet defined row.

Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

You should add a return *this; to anon's example. This is why anon suggests that you should not even implement operator= here: unnecessary code means an unnecessary increase in the probability of bugs in the program.

Variable definitions should be before anythign else. This way a reader doesn't have to scan your entire code looking for the type of the first variable they encounter.

it is customary to use this->Row for class specific variables, so they reader knows you mean teh class specific version and not some possible global version, particularly given that you havent yet defined row.

Opinions. In fact, consistently using this->name for member access from the class is highly uncustomary - you might do it, but in my experience you're in a small minority. As for defining members at the top of the class, I disagree. I start my classes with the interface - declarations of public member functions - and members are usually not part of that. But since I put my member definitions out of line, the code remains clean, and you see the definitions of the variables before reading the code that uses them.