Be sure to move the handwriting program!
In the afternoon and evening, the result is a baby of wuziqi. Although there is nothing to do, there are still many gains. The biggest achievement is that you must write the program. As Yang said, "Sometimes writing a program row is more useful than reading a book ten times." premature optimization is the root of all evil. Write the first version in the most stupid way and modify it later. It is a very bad method to "hide the pot on the stage". Writing programs should be done step by step.
New syntax gains: Virtual int Fuca () = 0; // three inheritance methods of pure virtual functions: class Dog: Public animal; Class dog: protected animal; Class dog: Private animal
Reference transfer: void setboard (chessboard & Board); // declare player. setboard (Board); // use macro definition: # define black 1 ;. H and. CPP: In. the function declared in H must be in. CPP. Otherwise, an error will be reported during connection (1) when creating the console program, select "hello, the World Program will automatically generate the main () function in the Program (2) when creating a new class, you can select the inherited parent class (3) to add a new method below, it is best to right-click the corresponding class and choose "add method" from the class design. (1) do not transmit pointers between classes. You can transmit references. (2) when designing objects, consider objects in the real world, because objects in the real world correspond to objects. To design better classes, we should abstract objects in the real world, find their most essential things, and get the corresponding classes. For example, the referee can be abstracted as a rule. (3) People also obtain computer data through interfaces, that is, the human-computer interface (GUI). Therefore, people and other programs can be viewed as receiving behaviors of the same type to some extent, but the specific implementation is not the same. (4) Pay attention to the quality of encapsulation when designing various classes.