Thanks you guys, I think that solved my problem. I used following code,
I did not know that i could do delete[] temp_string even when it was declared as char* temp_string.
cout<<"Enter a...
Type: Posts; User: Dang Scholar
Thanks you guys, I think that solved my problem. I used following code,
I did not know that i could do delete[] temp_string even when it was declared as char* temp_string.
cout<<"Enter a...
[/COLOR]
Its true that you I should delete[] what I new[] but, my question is where?
If I do delete[] word before it is returned then its not useful anymore.
If I delete after its returned its...
Thanks Jim, using std::string is a nice option and deleting temp_string sounds good. But still 'word' is point to some memory which holds 100 bytes. I return 'word' from this function, and since the...
I have tried to write a simple program that converts numbers to words (i.e it converts 123 to one hundred twenty three). The code compiles completely. The code uses pointer and recursion, which I...