| Fakherthe1 (17) | |
|
#include <iostream> using namespace std; class gra { private: int g; int g2; public: gra(); gra(int a,int b); gra add(const gra& rhs); }; gra::gra(int a,int b) { g=a; g2=b; } gra gra::add(const gra& rhs) { gra sum; sum.g=g+rhs.g; sum.g2=g2+rhs.g2; return sum; } int main() { gra p1(34,12); gra p2(13,65); gra ad; ad=p1.add(p2); } This is my program when i build it gives this error unresolved external symbol "public: __thiscall gra::gra(void)" (??0gra@@QAE@XZ) referenced in function "public: class gra __thiscall gra::add(class gra const &)" (?add@gra@@QAE?AV1@ABV1@@Z) | |
|
|
|
| Peter87 (3687) | |
| You have not defined the default constructor. | |
|
|
|
| tntxtnt (61) | |||
Your class doesn't have the default constructor's implementation. When you declare gra sum; the compiler will init sum with the default constructor which you don't implement it yet.
| |||
|
|
|||
| Fakherthe1 (17) | |
|
Having Problem with dxva dxva checker report ATI Radeon HD 2400 ModeMPEG2_C: DXVA1, 720x480 / 1280x720 / 1920x1080 / 3840x2160 ModeMPEG2_D: DXVA1, 720x480 / 1280x720 / 1920x1080 / 3840x2160 ModeMPEG2_IDCT: DXVA2, 720x480 / 1280x720 / 1920x1080 / 3840x2160 BB0796AE-2ED4-468D-A182-38F2CEADECF8: DXVA1, 720x480 / 1280x720 / 1920x1080 / 3840x2160 5B23D46D-FA5F-4FDC-B78A-7EB2787942EC: DXVA1, (Skipped) ModeWMV8_PostProc: DXVA1/2, 720x480 / 1280x720 ModeWMV9_PostProc: DXVA1/2, 720x480 / 1280x720 | |
|
Last edited on
|
|