overloading *, +, -'operators for vector class

前端 未结 4 1351
说谎
说谎 2021-01-06 08:33

I\'m writing a Line class to make numerical methods and I want these operators (*, +, -) to make my code more readable and easier to understand.



        
4条回答
  •  走了就别回头了
    2021-01-06 09:11

    The linker error tells you that your code is missing definitions of two member functions that you declared - the constructor and the destructor:

    Line::Line() {
        // Code of the constructor goes here
    }
    
    Line::~Line() {
        // Code of the destructor goes here
    }
    

提交回复
热议问题