Constructors/Destructors. 我们都知道,在C++中建立一个类,这个类中肯定会包括构造函数.析构函数.复制构造函数和重载赋值操作:即使在你没有明确定义的情况下,编译器也会给你生成这样的四个函数.例如以下类: class CTest { public: CTest(); // 构造函数 Constructor ~CTest(); // 析构函数 Destructor CTest(const CTest &); // 拷贝构造函数 Copy Constructor. CTest…
Question Key words Anwser A assignment operator abstract class It is a class that has one or more pure virtual functions. assignment & initialization constructed -> change value ,Same time Assignment changes the value of the object that has already…
Q: What is the difference between new/delete and malloc/free? A: Malloc/free do not know about constructors and destructors. New and delete create and destroy objects, while malloc and free allocate and deallocate memory. Q:What is difference between…
Q: What is a class? A: A class is an expanded concept of a data structure: instead of holding only data, it can hold both data and functions. Q: What are the differences between a C++ struct and C++ class? A: The default member and base class access…
Q. What's the process and threads and what's the difference between them? A.  A process is an executing program. One or more threads run in the context of the process.  It has a primary thread. A thread is the basic unit to which the operating system…
Q: What is virtual function?A: A virtual function or virtual method is a function or method whose behavior can be overridden within an inheriting class by a function with the same signature. This concept is an important part of the polymorphism porti…
Q: What is a dangling pointer? A: A dangling pointer arises when you use the address of an object after its lifetime is over. This may occur in situations like returning addresses of the automatic variables from a function or using the address of the…
Today, Infusion held a talk in Columbia University about tech interview. Talker: Nishit Shah @ Infusion, Techinical Account Manager, Dev -> Team Lead -> Manager 3 Real Questions Smart? Gets Things Done? Fit the team? The Introductions Tell me about…
long long ago , i think if i want to improve my english especially computer english . i must do so mucn things like read some professional book and listen some professional vedio.but recently, i found out it's wrong. at the beginning, i must use engl…
原文: https://code.google.com/p/googlemock/wiki/CookBook Creating Mock Classes Mocking Private or Protected Methods Mocking Overloaded Methods Mocking Class Templates Mocking Nonvirtual Methods Mocking Free Functions The Nice, the Strict, and the Naggy…