English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

1 answers

C does not have a boolean data type as in the case of Visual Basic or any other SDK.
So, you can't declare a variable like:

bool flag; (wrong)

But, instead you can do this alternative, using preprocessor directive(#)

#define TRUE 1
#define FALSE 0

int main()
{
...
...
return 0;
}

You can now use the keyword 'TRUE' and 'FALSE' like this:
if(x = TRUE)
{
...
...
}
else
{
...
...
}

TRUE and FALSE technically are called Symbolic Constants

2006-06-22 12:14:29 · answer #1 · answered by Anonymous · 0 0

fedest.com, questions and answers