Any option in C ++ to set the default variable type to int

Is there an option to omit the type of the variable or to set the type of the variable int in C ++ code to be compiled with the g ++ compiler on Linux.

    const bufLen = 2000;

The compilation went fine on Solaris (since I'm doing porting from Solaris to Linux).

One more thing, I have no control over the file , since it is generated by some parser (provided by a third party as a binary file)

Since I cannot change the C ++ file (since it is generated every time before compilation), I need an option (from g ++), so I can enable it at compile time to suppress / eliminate the error:

error: ISO C++ forbids declaration of `bufLen` with no type

EDIT:

INFO : options I'm currently using-c -fPIC -Wno-deprecated -m32 -O2 -ffriend-injection -g

- , ( )?


+5
2

AndersK, ( [ ])

-fms-extensions g++,

: http://gcc.gnu.org/onlinedocs/gcc-3.4.4/gcc/C-Dialect-Options.html

PS: , . , :)

+2

All Articles