Re: can we return pointer or struct?



struct contact
{
string name;
int telephone_number;
string email_address;
//...
};

// to return a pointer
contact* get_my_contact(void);

// to return a struct
contact get_a_copy_of_someones_contact(const string& who);

ben

"boki" <bokiteam@xxxxxxxxxxxxxx> wrote in message
news:OATF0JgWFHA.3220@xxxxxxxxxxxxxxxxxxxxxxx
> Hi All,
> Can we return pointer or struct? I don't know how to do...
>
> Thank you very much!
>
> Best regards,
> Boki.
>
>


.



Relevant Pages

  • Re: how to store list of varying types
    ... When there's a variable-length string, ... typedef struct { ... pointer null, and the second one the CString object. ... then have to finish constructing the packet by copying the two data objects ...
    (microsoft.public.vc.mfc)
  • Re: Managed dll and native c dll
    ... I want to pass a pointer to pin pointer to the function. ... struct ManagedDesc1 ... String str1; ... now pass to native dll struct Nativedesc1. ...
    (microsoft.public.dotnet.framework.interop)
  • Re: MVC in C++
    ... Things are now flowing more along the classic MVC lines. ... > struct Observable ... > string version; ... In that case the Controller would trigger a model update *and it* could ...
    (comp.object)
  • Re: Help with C->C# Port
    ... char is a character. ... you would use a string in C# ... - **char is a pointer to a pointer of char. ... There are struct in C# too. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: A C Adventure: your comments are welcome
    ... void * usrRightSegment; ... That is a string is a binary tree of segments, ... struct inside a struct either as the thing itself or as a pointer ... because C makes it easy to change pointer type. ...
    (comp.lang.c)

Loading