I'm a developer at C++ Shanghai team. I'm interested in everything related to C++
Browse by Tags
All Tags »
VC (RSS)
-
According to C standard, it only supports output text in MBCS (Multi-Byte Character String): n1124.pdf , 7.19.3/12 The wide character output functions convert wide characters to multibyte characters and write them to the stream as if they were written Read More...
|
-
This is an intellectual exercise: when shifts a 32-bit unsigned integer in C++, how to detect whether the calculation overflows efficiently? Here is the function prototype. shl_overflow will return true if v << cl overflows (cl is between 0 and Read More...
|
-
Many recursive algorithms have initial parameters. For example, Fibonacci Number is defined as: Fn = Fn-1 + Fn-2, with F1 = F2 = 1. By giving different values to F1 and F2, we can generate different sequence of numbers. 1. If we implement the algorithm Read More...
|
-
NOTICE: The technique describes in the article may not be supported in future release of VC. You should not use it in production code There are two kinds of initialization in C++: static initialization and dynamic initialization. According to the standard, Read More...
|
-
Unfortunately, VS2008 SP1 doesn't recognize C++ tr1 headers. That means there are no syntax highlighting and no intellisense for these files. This is a bug, but you can fix it by yourself. The trick is in the registry. VS maintains a list of extensionless Read More...
|
-
MSDN has a page describing various VC extensions. But it is far from complete. I've collected a list of nonstandard extensions provided by VC, some of them are evil . If you want to write standard conformant C++ code, you'd better be aware of these extensions Read More...
|
-
Playing with the compiler is interesting. One challenge for the compiler writer is compilation performance. There're many kinds of C++ code which are the nightmare for the compiler. Now let's go! 1. Preprocess a. Self Inclusion (GCC only) Normally, the Read More...
|
-
Someone may wonder what the difference is between Debug and Release mode, and whether it is possible to mix them. Here is one example: http://forums.msdn.microsoft.com/en-US/vcgeneral/thread/775ce067-b225-4141-8b86-2d7e9b61db97/ syperk said: "As a result, Read More...
|
-
In VC STL, there are two macros called "_HAS_IMMUTABLE_SETS" and "_HAS_STRICT_CONFORMANCE" which are defined in yvals.h. They are related to some defects in the C++ standard 2003. 1. _HAS_IMMUTABLE_SETS will influence the constness of set::iterator. Associative Read More...
|