When I have two .cpp files from the same set of source files in Code::Blocks, how can I run one of them?

前端 未结 1 860
轻奢々
轻奢々 2021-01-27 01:23

I have two different .cpp files (linked lists) under the same set of source of one project. I tried running one of the linked list files called \"customer\", but it

相关标签:
1条回答
  • 2021-01-27 01:59

    If you wanna run only the customer implementation, you should have:

    "Customer.h"-header file "Customer.cpp"- implementation or definitition of the class or whatever... "main.cpp" - the main file, in wich:

    #include <iostream>
    #include <Customer.h>
    int main()
    {
      ...
      ...
    }
    

    If you have got 2 diferent classes derivated from a linked list class, i think you should split the customer class and the video class, with each implementation files...

    If it is not the correct answer, please put some code to guide us with your class definitions :)

    0 讨论(0)
提交回复
热议问题