Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++ question

Name: Anonymous 2013-08-28 13:28

Do I use

MyClass::MyClass (const char* description)
{
    this->description = description;
}
MyClass::MyClass (const std::string& description)
{
    this->description = description;
}


or

MyClass::MyClass (const std::string description)
{
    this->description = description;
}


?

Name: Anonymous 2013-08-28 13:57


MyClass::MyClass (const std::string &description_) :
    description(description_)
{
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List