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.
kompromis
Posts: 98 Joined: Mon Sep 11, 2006 2:36 pm
Location: sweden/stockholm
Post
by kompromis » Sat Apr 21, 2007 1:11 pm
i haw a problem with my class in c++
i have a class like this
files:
http://64digits.com/users/lalle_calle/Ny_mapp.zip
Code: Select all
class connect
{
public:
void fununction1();
void fununction2();
private:
double socketadress;
};
void connect::fununction1()
{
socketadress = opengateaway("ip", port,mode)
std::cout<<socketadress<<std::endl;// now it shows the correct number
}
void connect::fununction2()
{
std::cout<<socketadress<<std::endl;// now it whill be like the variable was never set an it will give an error
and the object destructeor will automatily activate
}
Last edited by
kompromis on Sat Apr 21, 2007 3:02 pm, edited 4 times in total.
Perceval
Posts: 158 Joined: Tue May 30, 2006 2:42 pm
Post
by Perceval » Sat Apr 21, 2007 1:17 pm
First, it's not an irrlicht related problem. Then, you should post your entire code, so we can make sure you don't change the variable value.
spopo
Posts: 33 Joined: Wed Mar 28, 2007 1:46 pm
Post
by spopo » Sat Apr 21, 2007 1:45 pm
Yeh, you should post the entire code, cause everything seems fine now.
And it is function, not fununction.
And (i used my telepathic abilities once again) i think you called fununction2 before fununction1, so socketadress left undefined.
kompromis
Posts: 98 Joined: Mon Sep 11, 2006 2:36 pm
Location: sweden/stockholm
Post
by kompromis » Sat Apr 21, 2007 3:09 pm
i think i might have solved it after like 7-8 hours
Last edited by
kompromis on Sat Apr 21, 2007 4:53 pm, edited 1 time in total.
Perceval
Posts: 158 Joined: Tue May 30, 2006 2:42 pm
Post
by Perceval » Sat Apr 21, 2007 3:42 pm
Sorry, but the link don't work.
Just post your code, it would be easier.
kompromis
Posts: 98 Joined: Mon Sep 11, 2006 2:36 pm
Location: sweden/stockholm
Post
by kompromis » Sat Apr 21, 2007 4:55 pm
well i removed the file after i solved it my self
the thing was to use
instead of