| | |
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 beginner binary bitmap c++ c/c++ calculator char char* class code coding compile compiler console conversion count database delete deploy desktop developer dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int java lib linkedlist linker list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference rpg sorting string strings temperature template test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






