Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / endless loop in this code a newbie error ?

Author
Message
stevebrit
15
Years of Service
User Offline
Joined: 6th Jan 2009
Location: Florida USA
Posted: 3rd Feb 2009 16:39
hi folks i am using this piece of code in my project but it seems to get stuck in an endless loop i am sure i am doing something wrong here but cannot see what it is ?. The array elements are all zeroed before this small piece of code. Any help would be appreciated.

Regards :- steve

AMD Athlon64x2 3.1Ghz - Ram 4Gb DDR2 800Mhz - 500Gb HD
Ndivia 9600GT SLI - 24in LCD - WIN 7 - 64 bit BETA

Attachments

Login to view attachments
Kevin Picone
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 3rd Feb 2009 16:58
='s is the assignment operator.

== is for equality comparisons (ie. does left side equal right side)

so your compare should be this,



stevebrit
15
Years of Service
User Offline
Joined: 6th Jan 2009
Location: Florida USA
Posted: 3rd Feb 2009 17:13
Thank you thank you thank you I think i was pulling my hair out over that. I looked at the code over and over again, even dreamed about it lol. I must remember in c++ to see the difference
between = and == thanks a million

Regards Steve

AMD Athlon64x2 3.1Ghz - Ram 4Gb DDR2 800Mhz - 500Gb HD
Ndivia 9600GT SLI - 24in LCD - WIN 7 - 64 bit BETA

Login to post a reply

Server time is: 2024-11-25 13:16:18
Your offset time is: 2024-11-25 13:16:18