language: C++ 4.7.2 (gcc-4.7.2)
date: 224 days 13 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
Person& operator=(const Person& other)
{
    char* newname = NULL;
    try {
        newname = new char[strlen(other.name)+1];
        strcpy(other.name, name);
        std::swap(name, newname);
        delete [] newname;
        return *this;
    } catch(...) {
        delete [] newname;
        throw;
    }
prog.cpp:1: error: expected constructor, destructor, or type conversion before ‘&’ token