--- mahdi heydari <[EMAIL PROTECTED]> wrote:
> Hi all.
> plz someone tell me how can i return a string that i
> generated in a function.
> 

It depends on how you generated it.  If you used new
in the function, you can return it by pointer.

std::string* someFunc()
{
    std::string *generated;
    generated = new std::string;
    return generated;
}

Just remember to delete it when you are finished with
it.

Ray


 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

Reply via email to