![]() |
|
#1
|
|||
|
|||
|
(this is my first C++ project. The only things I have coded in C++ were a few samples) I find it hard to get used to C++ when I am used to code in C. So I created an object handler for a game me and jo3_sum are creating and here it is the part I need help with: Code:
typedef struct Model_obj
{
//OBJ_Model obj_model;
BMOBJ obj_class;
} Model_obj;
typedef struct Model_md2
{
BMMD2 md2_class;
MD2_Model md2_model;
} Model_md2;
typedef struct Model
{
int mod_type; // one of the definitions
Model_obj obj;
Model_md2 md2;
//float x, y, z;
} Model;
The thing is whenever I do: Code:
Model something; Code:
BMOBJ obj_class;
BMMD2 md2_class;
MD2_Model md2_model;
Code:
Model_obj obj; Code:
Model_md2 md2; One thing that would (probably) work is to use a pointer instead, and allocate one of the pointers and (maybe) delete the other pointer? Thanks for the help Edit: Figured out to do it in a different way Last edited by pirata nervo; 06-25-2009 at 01:32 PM. |
![]() |
|
|
|||
|
|||
|
|
| Thread Tools | |
| Display Modes | |
|
|