| Haroonrulz (9) | |
|
Dear Gurus/Experts in C++, I am new to C++.My Question is very basic.I need CString to be stored in Vector, as I am new even after several attempts I dont know how to do it.Kindly help me.My code is as below: void Editcontrol(CString prop1,CString prop2,CString prop3) { Vector <string> v; // I need to store CString in Vector, even after many tries I could not able to do it } int main() { Editcontrol("Haroon","Rizwan","Noor"); } | |
|
|
|
| vlad from moscow (3662) | |
|
Try one more the following std::vector<CString> v; v.push_back( ("Haroon" ); v.push_back( ( "Rizwan" ); v.push_back( ( "Noor" ); Or if the compiler supports new features of the C++ then std::vector<CString> v = { "Haroon", "Rizwan", "Noor" }; | |
|
Last edited on
|
|
| Haroonrulz (9) | |
| Thanks a lot Mr.Vlad | |
|
|
|