Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
float to int conversions
#11
Yeah, I'm pretty sure that that's the problem. In C, if you don't give a value to variables they contain garbage, so i can be -454298549 or maybe 4308934 or whatever.

Anyhow, I see you've mixed C and C++ pretty uglily. I would advice you to stick with C, and declare that i at the top of your main function and not in the for loop. Just coding style Smile
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#12
thanx for all the replies. ill try out some of the suggestions later 2nite when i get a chance. ive just really started to learn c/c++ so all i did was copy my qb routine into whatever i knew about c/c++. i know it is as ugly as sin, my qb is normally the same!

some time later.....
yay!! it, works.
The problem WAS that it was not set to zero (int i=0)!
thanx again dudes (and by the look of things, a new dudette :oops: )
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)