Current location - Health Preservation Learning Network - Health preserving class - What the hell is C++? !
What the hell is C++? !
Ha ha! You know a lot about C++, so don't worry. This is a good thing, whether it is software design, hardware design or system design (system, including the whole of software and hardware, specifically where the interface between software and hardware should be placed), there is a compromise, a compromise between complexity and cost, and a compromise between cost and performance.

1). When memory is allocated dynamically and the array is out of bounds, defensive programming is not recommended. There is a situation that must be used, that is, when initializing an object with a dynamically created member variable fails, the dynamic memory is released, because in this case, you can't find other methods. Moreover, this method can be used to debug programs.

2) Generic programming does have similarities and differences in compiler implementation, and all compilers cannot be required to be consistent. After you have accumulated enough experience, you will naturally be able to handle it with ease.

3). Pointer, also don't want to preach in some books, danger, system-level programming, how can you leave the pointer. Auto_ptr mainly encapsulates pointers with classes, overloads pointers with operators, and uses them like ordinary pointers. The key is that it has a destructor that can release dynamically created memory. You can choose to use it or not.

4). Namespace std is a standard namespace, so it is written to prevent variables and functions from conflicting with the contents in std. Your CreateFile here is win32API, and you will also find that MFC has CFile, de struct FILE in C language, unix-like create and so on.

I think your problem now is to be eager for success. You have to step by step, you know a lot of things, but you don't understand, don't understand its principle.