Accessing structures in functions in C++
Posted on 2000-03-20
I have some functions that take in structures, amongst other things.
int winapi rectangle(SIZES *pInfo);
...where SIZES is a structure. How can I assign values to the variables of the Structure SIZES? I'v tried creating an object of type SIZES and assigning values using the (.)
SIZES MySizes; //create a Sizes object
*mySizesPtr=&mySizes, //pointer &mySizesRef=mySizes; //reference
mySizes.version = 0x03000000;
But I'm not sure that this is assigning the values to the right place.
Pls can i have a simple example of how to do this correctly. Pls help!