Search:

Type: Posts; User: Dang Scholar

Search: Search took 0.00 seconds.

  1. Replies
    9
    Views
    4,913

    Thanks you guys, I think that solved my problem....

    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...
  2. Replies
    9
    Views
    4,913

    [/COLOR] Its true that you I should delete[]...

    [/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...
  3. Replies
    9
    Views
    4,913

    Thanks Jim, using std::string is a nice option...

    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...
  4. Replies
    9
    Views
    4,913

    Recursion with pointer and memory leak

    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...
Results 1 to 4 of 4