neuromancer neuromancer - 1 year ago 112
C++ Question

How to assign a string value to a string variable in C++

Shouldn't this work?

string s;
s = "some string";

Answer Source

Yes!

It's default constructing a string, then assigning it from a const char*.

(Why did you post this question?... did you at least try it?)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download