Page 1 of 1

Print a var, who crash when i run it.

Posted: Sun Dec 28, 2008 1:00 pm
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

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

Posted: Sun Dec 28, 2008 4:53 pm
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 ???

Posted: Sun Dec 28, 2008 6:09 pm
by trivtn
Yes!, I think he forgot CreateDevice :wink:

Posted: Mon Dec 29, 2008 8:57 pm
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