VC2005 Breaking Change: typename’ needed for dependent name to be treated as a type

Original Code: template<class T>const T::X& f(T::Z* p); template<class T, int N>struct Baz{}; template<class T>struct Blah : public Baz< T::Type, T::Value> {      typedef T::X  Type;   Type foo();      T::X bar();      operator T::Z();     }; Errors VC2005 issue: sample.cpp(2) : warning C4346: ‘T::X’ : dependent name is not a type        prefix with ‘typename’ to indicate a typesample.cpp(2) :…


Breaking Change: I/O stream changes

Original Code: #include <iostream.h> int main(int argc, char *argv[]) { cout<<“Hello World\n”;} Error VC2005 issues: sample.cpp(1) : fatal error C1083: Cannot open include file: ‘iostream.h’: No such file or directory Code after applying the fix: #include <iostream>using namespace std; //important to be able to use cout int main(int argc, char *argv[]) { cout<<“Hello World\n”;} Thanks,  Ayman Shoukry


VC2005 Breaking Change: No More Implicit ‘int’

Original Code: int main(){ const x = 0;} Error VC2005 issues: sample.cpp(3) : error C4430: missing type specifier – int assumed. Note: C++ does not support default-int Code after applying the fix: int main(){ const int x = 0;} For more details, check out Thanks,  Ayman Shoukry  

VC++ Express Edition is Free

Effective from April 19th, all Visual Studio 2005 Express Editions are permanently Free. For more information, take a look at Also, if you have any concerns or issues you are facing with the VC++ Express Edition, you can use the VC++ Express Specific Forums. Thanks,   Ayman


Breaking change: for scoping change – default is now: /Zc:forScope

Original Code: //sample.cpp                       int main() {                             for(int i = 0; i < 10; ++i);    for(i = 0; i < 10; ++i) ;    }                                                                                Error VC2005 issues: sample.cpp(3) : error C2065: ‘i’ : undeclared identifier Code after applying the fix: //sample.cppint main() {  int i;    for(i = 0; i < 10; ++i) ;…

Migrating to VC++ 2005

I have been hanging a lot lately on the VC++ MSDN forums and I have noticed that lots of the issues raised there are due to migration difficulty to VC2005. Hence, I am thinking of starting a series of small short posts here explaining some of the common issues developers would face when migrating their C++ code to…


The first of the VC++ Channel9 series is out

You can now check Brandon Bray’s video on channel9. There are more videos to come for multiple features of VC++ 2005. Thanks, Ayman Shoukry

VC++ Optimization Session at the MDC 2006

Last February I gave a session at the MDC 2006. I have had some feedback for making the slide deck available. I have attached it to this post. Thanks for your interest and sorry for the delay! Thanks, Ayman Shoukry Visual C++ 2005 New Optimizations.ppt