CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: StGuru

Search: Search took 0.05 seconds.

  1. Thread: return function

    by StGuru
    Replies
    19
    Views
    14,838

    Re: return function

    wait. str is getting the returning value of function2. So now the value is stored. Why it is cleared when it is printeD?
  2. Thread: return function

    by StGuru
    Replies
    19
    Views
    14,838

    Re: return function

    @Lindley thanks for the code, but I do not understand what the function3 does?

    @VictorN now it prints random string, but again I don't know what's the difference with the code of laserlight.
  3. Thread: return function

    by StGuru
    Replies
    19
    Views
    14,838

    Re: return function

    I got error [Warning] address of local variable `text' returned.
    Anyway, I got the text printed on the screen without altering the code.

    btw why u use const?
  4. Thread: return function

    by StGuru
    Replies
    19
    Views
    14,838

    Re: return function

    laserlight now I understand what are u saying to me. But I don't find I reason, why the code should not work. It is everything correct. It is true that after calling the function Function1 the...
  5. Thread: return function

    by StGuru
    Replies
    19
    Views
    14,838

    Re: return function

    Wait are u saying to me that I return pointer which doesn't exists in the function implementation?
  6. Thread: return function

    by StGuru
    Replies
    19
    Views
    14,838

    Re: return function

    Thanks for the replies.
    @Speedo does the pointer points to the first element of the array? The array itself its a pointer, right?

    @VictorN I don't understand why you say my Implementation is...
  7. Thread: return function

    by StGuru
    Replies
    19
    Views
    14,838

    return function

    Why do I need char *Function()? I mean, why do I need the * in front of the Function1() ??

    Does the * mean pointer?


    #include <iostream>
    using namespace std;

    char *Function1()
    {
Results 1 to 7 of 7





Click Here to Expand Forum to Full Width

Featured