| | |
how to convert variable string into cons char
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Dec 2008
Posts: 21
Reputation:
Solved Threads: 0
One thing I noticed was that you did
To answer, your question, yeah just use
string str = a + "x" + b+ ".txt" It should be string str = "a" + "x" + "b" + ".txt" because if you just put a and b without quotes, the compiler will think that you are using the variables a and b.To answer, your question, yeah just use
str.c_str() like niek_e said. ![]() |
Similar Threads
- Convert string variable into form object (VB.NET)
- Convert string variable into form object in VB6 (Visual Basic 4 / 5 / 6)
- convert longlong to string (C)
- How to convert very long string to a double??? (C++)
- convert int to string (C)
- How to convert string to const char* in C (C++)
Other Threads in the C++ Forum
- Previous Thread: displaying the results
- Next Thread: Create GUI
| Thread Tools | Search this Thread |
api array based binary c++ c/c++ calculator char char* class classes code coding compile console conversion count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory multiple news number numbertoword output parameter pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock wordfrequency wxwidgets






