How to write a C++ program in codeblock by dividing files?

1. Here I take the object array as an example to illustrate

 

2. The subject requirements are as follows:

 

 3. Open File->new->project in codeblock

 

 

 4. You can choose Console application or Empty project, and Xiaoguan chooses the latter

5. Click Go->NEXT, give a file name, NEXT, and then you will create a separate project file

6.File->new->file->C/C++ header->go->next->choose a file save path->check debug and delete below->finish

 

 7. At this point you will get a .h file

 

 8.File->new->file->C/C++ source->go->next->c++->next->choose a file save path->check the debug and delete below->finish

 

 9. At this point you will get a .cpp file

 

 10. Create another .cpp master file in the same way

 

 11. You will write the main program in this main file, and you can call the function package in the sub-file at will

12. Compile and run:

 

I hope I can help everyone, I ask you if you want a like, will you give it, thank you all.
Copyright statement: The copyright of this article belongs to the author (@攻城狮小关) and CSDN. Welcome to reprint, but you must keep this paragraph without the author’s consent Statement, and provide the original link in an obvious place on the article page, otherwise the right to pursue legal responsibility is reserved.
It is not easy for everyone to write articles, please respect the fruits of labor~ 
Communication plus Q: 1909561302
Blog Park Address https://www.cnblogs.com/guanguan-com/

Guess you like

Origin blog.csdn.net/Mumaren6/article/details/108822410