C++ - 2 classes 1 file

后端 未结 8 2025
南旧
南旧 2021-01-19 03:11

Suppose I want something of this sort, in one .cpp source file:

class A {
    public:
        void doSomething(B *b) {};
};

class B {
    publi         


        
8条回答
  •  暖寄归人
    2021-01-19 03:26

    The C++ FAQ Lite answers this question and others. I'd seriously considering reading that thing end to end, or getting the book and doing the same.

提交回复
热议问题