neuromancer neuromancer - 6 months ago 70
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