| | |
to clear a string
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
i want to clear a string after the prog. has done it`s work.
i tried it by using a for loop and assigning a blank, but it didn`t work.
the problem is that if i run the program again then the earlier value is displayed again .
i`m using Turbo c++.
i tried it by using a for loop and assigning a blank, but it didn`t work.
the problem is that if i run the program again then the earlier value is displayed again .
i`m using Turbo c++.
"Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something."
No you can't. You can only 'delete' or 'free' dynamically allocated memory. Plus the above statement won't compile. Go figure.
And please see the date of the previous post before posting in a thread. This thread is 3 years old.
And please see the date of the previous post before posting in a thread. This thread is 3 years old.
Last edited by ~s.o.s~; Jul 7th, 2007 at 3:49 pm.
I don't accept change; I don't deserve to live.
![]() |
Similar Threads
- string .clear() (C++)
- How to clear a string (C++)
- using stringstream for tokenizing a string (C++)
- String to disk with fstream (C++)
Other Threads in the C++ Forum
- Previous Thread: Can't determine winner for Tic Tac Toe
- Next Thread: Help Please - with String Manipulation
| Thread Tools | Search this Thread |
api array arrays based beginner binary c++ c/c++ calculator char char* class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news numbertoword output parameter pointer problem program programming project proxy 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 visual visualstudio win32 windows winsock wordfrequency wxwidgets






