Print a var, who crash when i run it.

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
ayboangelus
Posts: 9
Joined: Thu Dec 11, 2008 12:02 am

Print a var, who crash when i run it.

Post by ayboangelus »

Hi all, i try to print a var, and when my exe is reading the code it crash.

I have it:

Code: Select all

#include "world.h"
#include <iostream>

world::world(IrrlichtDevice* Device,int spouet)
{
    device = Device;
    IVideoDriver* driver = device->getVideoDriver ();
    ISceneManager *scenegraph = device->getSceneManager ();
    IGUIEnvironment *gui = scenegraph->getGUIEnvironment();
    IGUIEnvironment* env = device->getGUIEnvironment();
	scenegraph->addCameraSceneNode (0, core::vector3df (0,0,0), core::vector3df (5,0,0));

    printf("%d",spouet);
	stringw temp = L" ";
	temp += spouet;
    login = env->addStaticText(temp.c_str(),rect<s32>(380,700,670,750),false);
}
world::~world()
{
}
char world::draw()
{
}
Someone know why ? thanks a lot
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Re: Print a var, who crash when i run it.

Post by Acki »

ayboangelus wrote:Hi all, i try to print a var, and when my exe is reading the code it crash.
where exactly does it crash ???
how does it crash ???
what are the error messages ???
how do you call this function ???
is Device a valid pointer ???
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
trivtn
Posts: 132
Joined: Tue Jan 17, 2006 12:30 pm
Location: Viet Nam
Contact:

Post by trivtn »

Yes!, I think he forgot CreateDevice :wink:
There's something is fantastic, there's nothing is absolute.
ayboangelus
Posts: 9
Joined: Thu Dec 11, 2008 12:02 am

Post by ayboangelus »

Sorry, i have make change on my program.

I have add a lot of thing, for answer to you i have put all in comment and when i have try.

No bug :(

Strange, don't know why, now my var print well, without crash my program.

Sorry for the disturb.

Thanks for had answer to me
Post Reply