Warnings
How can i avoid getting the warning message "comparing signed and unsigned values" when compiling? I'm getting a lot of them now and I can't see the errors because the warning messages use all the screen. By the way, I'm using BC++ 5.5 under DOS. Ah, and I almost forgot. How do you copy files from a directory you are not in to other directory you are not in too? The root of my game can be variable, so, is there a way to retrieve the current root?
[edited by - Ragadast on May 26, 2002 7:25:37 PM]
You could always use appropriate data types (e.g. use unsigned ints when looping or comparing unsigned ints). You can also use static_cast to cast the data to the correct type.
I think that adding the line #pragma warn -csu will disable the warning.
It''s not often that you need to know where your game''s executable is, since you can use relative directories instead. Suppose you have this:
c:\game
c:\game\bin location of executable
c:\game\data location of image.pcx
You can access the image by opening "..\\data\\image.pcx".
If you really need to know where the executable is, there''s getcwd(), or you could even use the data in argv[0].
It''s not often that you need to know where your game''s executable is, since you can use relative directories instead. Suppose you have this:
c:\game
c:\game\bin location of executable
c:\game\data location of image.pcx
You can access the image by opening "..\\data\\image.pcx".
If you really need to know where the executable is, there''s getcwd(), or you could even use the data in argv[0].
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement