I have defined a struct in a header file and populate it in its cpp file.
How can I access to the data into the struct in another cpp file ?
The header which holing the struct is included.

Thanks

Re: access to a struct by Scott

Scott
Sat Oct 02 01:01:51 CDT 2004

JSmith wrote:
> I have defined a struct in a header file and populate it in its cpp file.
> How can I access to the data into the struct in another cpp file ?
> The header which holing the struct is included.
>
> Thanks
>
>

Your question kind of implies a lack of design. Where did you put it?
Is it a member variable of something else? What is its relationship to
the "other" cpp file? A header file declares a struct or class, but it
does not define an object. You can't access a declaration, only an
object created from that declaration. IOW, you question is vague.

--
Scott McPhillips [VC++ MVP]