Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
char* to string conversion
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Thomas J. Gritzan, post: 2543403"] Your are mixing C and C++ here. Don't use pointers and arrays, if you don't need to. Use strings and vectors, they are much easier to use once you know them. You can't assign and compare arrays of chars: char text[100] = "Some text"; char text2[100] = "some other text"; if (text == text2) { ... } // does not work text = text2; // does not work Use this: string text = "text"; string text2 = "other"; const string movex_query = "C:\\DWG_DATA\\DOCUMENTS_movex.dat"; replace char* with string. ifstream inf(movex_query.text()); vector<string> namn; and so on... Read about vector and string. string has some usefull member functions. Thomas [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
char* to string conversion
Top