neuromancer neuromancer - 3 years ago 179
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


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