I cant get my compiler to accept bool types....any ideas what I can do about that?
I cant get my compiler to accept bool types....any ideas what I can do about that?
You could post it to a message board, giving vague info and not stating with compiler you're using.
or you could do
enum bool {false, true};
or you could get a new compiler.
lol bad day?Originally posted by Sorensen
You could post it to a message board, giving vague info and not stating with compiler you're using.
or you could do
enum bool {false, true};
or you could get a new compiler.
hummmmm...................................I cant get my compiler to accept bool types....any ideas what I can do about that?
1. What compiler?
2. Do you wish to post your code?
Try to help all less knowledgeable than yourself, within
the limits provided by time, complexity and tolerance.
- Nor
lemme guess?
Borland Turbo C++ 3.0 DOS compiler or something compatible/similar?
if so, then just use a substitute: int
to save some memory, then: short unsigned int
even more memory efficient: char
then do something like this:
example:
int i = 1; // substitute for i = true
int i = 0; // substitute for i = false
you can also do this for char:
example:
char i = 'I'; // true
char i = 'O'; // false
that's a good substitute for boolean types if you want.
or in the Borland Turbo C++ 3.0 DOS library, use <limits.h>
the online help provided with the program will help you.
good luck!
think only with code.
write only with source.