I just discover that this gcc compiler is doing strange things... i did something with enum constructor...and i found that programs begin doing strange things after compiling with gcc, i thought i made something wrong...but my code was correct...
and to show eaxctly... here is very basic code i took from somewhere dealing with enum:
Code:
int main (int argc, char *argv[])
{
enum planets
{
Mercury,
Venus,
Earth,
Mars,
Jupiter,
Saturn,
Uranus,
Neptune,
Pluto
};
enum planets planet1, planet2;
planet1 = Mars;
planet2 = Earth;
if (planet1 > planet2)
puts ("Mars is farther from the Sun than Earth is.");
else
puts ("Earth is farther from the Sun than Mars is.");
return 0;
}
compiles good, no errors, and as u see no errors in the code... however when i run the program, the cursor begins to blink in different places of console window!
wassup with that? any ideas?