On Sat, Mar 13, 2010 at 4:07 PM, Paul Herring <[email protected]> wrote:
>> I am trying to create a type that is a pointer to a struct, but I cant seem
>> to access the contents of the struct. I am trying to do something like this:
>>
>> typedef struct {
>> int one;
>> int *two;
>> } *myT;
>>
>> int main()
>> {
>> myT *test = new myT;
>> int y = 20;
>> test->two = &y;
>>
>
> *test->two = y;
>
> Why are you using pointers in C++?
For that matter, using typedef'd structs is unnecessary in C++ also.
-- Brett
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
If I were to divulge it, it would overturn the world."
-- Jelaleddin Rumi