These both give the same result.
sizeof(CAMDATA) = 24 , sizeof(m_camdata) = 24
I now use oftream and ifstream which writes and reads it correctly.
BUT
i am doing a separate little project to get my head around what you are telling me
as i prefer to use the irrlicht functions again later ...
Search found 6 matches
- Sat Apr 06, 2013 5:06 pm
- Forum: Beginners Help
- Topic: IReadFile* file not reading my struct
- Replies: 5
- Views: 695
- Sat Apr 06, 2013 11:44 am
- Forum: Beginners Help
- Topic: IReadFile* file not reading my struct
- Replies: 5
- Views: 695
Re: IReadFile* file not reading my struct
Thanks for your reply.
I could not post full code as these functions are in my application class.
So sizeof is the culprit here?
What is the way to get the correct size then?
I will experiment with pure c++ methods of read writing to file then instead of the irrlicht calls.
I could not post full code as these functions are in my application class.
So sizeof is the culprit here?
What is the way to get the correct size then?
I will experiment with pure c++ methods of read writing to file then instead of the irrlicht calls.
- Fri Apr 05, 2013 10:23 pm
- Forum: Beginners Help
- Topic: IReadFile* file not reading my struct
- Replies: 5
- Views: 695
IReadFile* file not reading my struct
Hi,
I have a little problem that is driving me crazy.
I have a struct:
//! Struct for camera data.
struct CAMDATA
{
vector3df Pos;
vector3df Rot;
};
CAMDATA *m_camdata;
and
m_camdata = new CAMDATA();
Then my write and read functions.
//Save camera position data.
void ...
I have a little problem that is driving me crazy.
I have a struct:
//! Struct for camera data.
struct CAMDATA
{
vector3df Pos;
vector3df Rot;
};
CAMDATA *m_camdata;
and
m_camdata = new CAMDATA();
Then my write and read functions.
//Save camera position data.
void ...
- Sun Mar 03, 2013 6:54 pm
- Forum: Beginners Help
- Topic: State Manager
- Replies: 25
- Views: 11832
Re: State Manager
Sorry, just saw this, eyes falling asleep.
IEventReceiver::OnEvent() is pure virtual, so it has to be overridden in derived classes. So, you need to declare and define a function with the same name and parameters as this, then it will work.
bool MyGame::OnEvent(const irr::SEvent& event ...
IEventReceiver::OnEvent() is pure virtual, so it has to be overridden in derived classes. So, you need to declare and define a function with the same name and parameters as this, then it will work.
bool MyGame::OnEvent(const irr::SEvent& event ...
- Sun Mar 03, 2013 6:48 pm
- Forum: Beginners Help
- Topic: State Manager
- Replies: 25
- Views: 11832
Re: State Manager
There seems to be a problem with the statte manager code and irrlicht 1.8.
In the class:
class MyGame : public irr::IEventReceiver, public GraphT<MyGame, irr::SEvent>
//calling this
MyGame game(device);
does not work because i cannot instantiate an abstract class, which irr::IEventReceiver is ...
In the class:
class MyGame : public irr::IEventReceiver, public GraphT<MyGame, irr::SEvent>
//calling this
MyGame game(device);
does not work because i cannot instantiate an abstract class, which irr::IEventReceiver is ...
- Fri Feb 08, 2013 1:31 am
- Forum: Beginners Help
- Topic: Getting to grips with Co-ord system.
- Replies: 0
- Views: 744
Getting to grips with Co-ord system.
If you are like me, old, used to the other co-ord system, and new to Irrlicht, this may be of use or help.
I created this to help me with it, and also learn some of the irrlicht syntax before attempting anything grandios.
You can use any model you have with it.
If anyone would like to host the ...
I created this to help me with it, and also learn some of the irrlicht syntax before attempting anything grandios.
You can use any model you have with it.
If anyone would like to host the ...