Yet another kernel problem YaKP (global variables)
Posted: Wed Feb 04, 2004 11:03 am
Ok now I've a problem with global variables, if declare a variable global the value of it is zero!:
local variables work:
Code: Select all
unsigned int n = 15;
int main()
{
if(n == 0)
putstr("n == 0"); // this is out
else
putstr("n == !0");
}
Code: Select all
int main()
{
unsigned int n = 15;
if(n == 0)
putstr("n == 0");
else
putstr("n == !0"); // this is out
}