This is a simple program which i wrote it with vim editor:
#include <iostream>
using namespace std;
int main()
{
int a;
int b, c ;
a=(b+c+11)/3;
cout << "x=" << a;
cout << "\n";
return 0;
}
We can see the warnings in visual studio in windows:
...error(s), 2 warning(s)
...\test1.cpp(7) : warning c4700: local variable 'b' used without having been initialized
...\test1.cpp(7) : warning c4700: local variable 'c' used without having been initialized
But, When we use gnome-terminal, we can't see warnings:
SSS@SSS:~/.cpp$ g++ test1.cpp -o test1
SSS@SSS:~/.cpp$ chmod +x test1
SSS@SSS:~/.cpp$ ./test1
x=10925
SSS@SSS:~/.cpp$
In terminal we just can see errors...
How to see these warnings?
Any command?to see warnings?