A Null Preprocessor Directive
An empty # sign is a null preprocessor directive. A null directive has no effect but you can use it to document your intentions, for example: ifndef HEADER_INCLUDED#define HEADER_INCLUDED#else# //
An empty # sign is a null preprocessor directive. A null directive has no effect but you can use it to document your intentions, for example: ifndef HEADER_INCLUDED#define HEADER_INCLUDED#else# //
The library supports two types of file streams: char-based streams such as std::ifstream and whcar_t streams. The names of wchar_t streams are the same as their char-based counterparts, except that
Just like the fseek() function of , classes enable you to position the stream’s pointer at an arbitrary location by calling the seekg() member function. For example, you can position
C++ forbids direct assignments of arrays. Therefore, your compiler will flag the following code as an error: char buff[];buff=
Here a few guidelines for improving std::string’s performance and avoiding common pitfalls. Consider the following for-loop: std::string str =
C++ never passes arrays to a function. Instead, the argument is implicitly converted to a pointer that contains the address of the first array element. For example: void f(char s[]);int
An ordinary class may have template member functions. In the following example, the class A declares a template member function called f(): class A{public: template T f(T t);}; You may
The terms template argument and template parameter do not mean the same thing. A template parameter is a symbol, or a placeholder which is replaced by the actual argument when
Many Windows programmers use DLLs abundantly. Although dynamic linking certainly offers some advantages, it can also cause noticeable maintenance and performance setbacks. For starters, DLLs are slower than statically linked