Hi everyone,
I'm very rusty in my C++ having only taken one class in it a year ago, so I
apologize if this is a basic question..
I am trying to create a new app in C++ from the sample MyErrand C
application that came with CodeWarrior.
One line that I'm using from the C code says:
((MyTestDBPtr)recP)->visitType = record->visitType;
Trying to compile this line as C++ gives me an expression error with the ";"
underlined. I tried to look for C++ references on structs but it didn't seem
to indicate that there should be any problem with this - am I missing
something? Any help would be much appreciated!
The background to this code is:
-----------------------------------------
typedef struct MyTestDB {
Char visitType[257]; /* Free form text field, 256 characters
allowed */
} MyTestDB;
typedef MyTestDB* MyTestDBPtr;
And in the function,
-------------------------------------
MemPtr recP;
recP = MemPtrNew(sizeof(MyTestDB));
((MyTestDBPtr)recP)->visitType = record->visitType; // line generating the
error
Regards,
Crispina Chong
Sr. Web Developer
--------------------------
Purple Monkey Studios, Inc.
Engaging Interactive Media Development
124 S. Marion St.
Oak Park, IL 60302
www.purplemonkey.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/