G
gil
Hi,
In VS 2005 (SP1), the following code does not compile:
=============
typedef int _sptr ;
_sptr p = 1;
=============
the compiler emits the following:
source1.cpp(1) : warning C4091: 'typedef ' : ignored on left of 'int'
when no variable is declared
source1.cpp(2) : error C4430: missing type specifier - int assumed.
Note: C++ does not support default-int
After pulling half my hair out, I found that changing _sptr to almost
anything else (e.g. _sptr1), makes the code compile. Note that:
1. _sptr is not mentioned anywhere in the MSDN database.
2. I suspect that this didn't happen to me before upgrading my VS2005
to SP1.
3. Removing the '_' made the word 'sptr' change to blue as if a
keyword, again, sptr isn't mentioned in MSDN. (this happened on one
PC, on another it didn't).
Can anyone please help, what is _sptr?
Thanks,
Gil Moses.
In VS 2005 (SP1), the following code does not compile:
=============
typedef int _sptr ;
_sptr p = 1;
=============
the compiler emits the following:
source1.cpp(1) : warning C4091: 'typedef ' : ignored on left of 'int'
when no variable is declared
source1.cpp(2) : error C4430: missing type specifier - int assumed.
Note: C++ does not support default-int
After pulling half my hair out, I found that changing _sptr to almost
anything else (e.g. _sptr1), makes the code compile. Note that:
1. _sptr is not mentioned anywhere in the MSDN database.
2. I suspect that this didn't happen to me before upgrading my VS2005
to SP1.
3. Removing the '_' made the word 'sptr' change to blue as if a
keyword, again, sptr isn't mentioned in MSDN. (this happened on one
PC, on another it didn't).
Can anyone please help, what is _sptr?
Thanks,
Gil Moses.