הינו הפונציות

liran22

New member
הינו הפונציות

void main() { M<int> b; b.print(); } template <class T> class M { T b; public: M(); void print(); }; template <class T> M<T>::M() { b=1; } template <class T> void M<T>::print() { cout<<b; } וזה מה שרשום לי אחרי לינק 4.obj : error LNK2001: unresolved external symbol "public: void __thiscall M<int>::print(void)" (?print@?$M@H@@QAEXXZ) 4.obj : error LNK2001: unresolved external symbol "public: __thiscall M<int>::M<int>(void)" (??0?$M@H@@QAE@XZ) Debug/complex.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe.
 

scalla

New member
אני מכיר בעיה כזאת כשלא ממשים

פונקציות, אבל מכריזים עליהן.
 
למעלה