• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            有關(guān)模板的錯(cuò)誤1

            template <class T>
            class Matrix{//矩陣
                friend istream& operator>>(istream&, Matrix<T>&);
                friend ostream
            & operator<<(ostream&, Matrix<T>&);
            public:
                Matrix(){mRow
            =0, mCol=0, nZeroNum=0;}
            private:
                vector
            <Term<T>> vec;
                
            int mRow,mCol;//矩陣的行數(shù),列數(shù)
                int nZeroNum;//矩陣中的非零元素個(gè)數(shù)
            };

            報(bào)錯(cuò):
            test21.obj : error LNK2001: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,class Matrix<int> &)" (??6@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV01@AAV?$Matrix@H@@@Z)
            test21.obj : error LNK2001: unresolved external symbol "class std::basic_istream<char,struct std::char_traits<char> > & __cdecl operator>>(class std::basic_istream<char,struct std::char_traits<char> > &,class Matrix<int> &)" (??5@YAAAV?$basic_istream@DU?$char_traits@D@std@@@std@@AAV01@AAV?$Matrix@H@@@Z)
            D:\DemoProject\test21\Debug\test21.exe : fatal error LNK1120: 2 unresolved externals

            糾正如下:
            template <class T>
            class Matrix{//矩陣
                template<class T>
                friend istream
            & operator>>(istream&, Matrix<T>&);
                template
            <class T>
                friend ostream
            & operator<<(ostream&, Matrix<T>&);
            public:
                Matrix(){mRow
            =0, mCol=0, nZeroNum=0;}
            private:
                vector
            <Term<T>> vec;
                
            int mRow,mCol;//矩陣的行數(shù),列數(shù)
                int nZeroNum;//矩陣中的非零元素個(gè)數(shù)
            };

            posted on 2008-10-26 16:44 deep2 閱讀(286) 評(píng)論(0)  編輯 收藏 引用 所屬分類: 錯(cuò)誤集錦

            <2008年10月>
            2829301234
            567891011
            12131415161718
            19202122232425
            2627282930311
            2345678

            導(dǎo)航

            統(tǒng)計(jì)

            常用鏈接

            留言簿(1)

            隨筆分類

            隨筆檔案

            搜索

            最新評(píng)論

            閱讀排行榜

            評(píng)論排行榜

            思思久久99热只有频精品66| 老色鬼久久亚洲AV综合| 久久国产精品久久精品国产| 久久99热国产这有精品| 狠狠精品久久久无码中文字幕 | 国产精久久一区二区三区| 久久一区二区三区免费| 日韩精品久久久久久久电影蜜臀| 精品久久777| 色偷偷88888欧美精品久久久 | 亚洲欧洲久久久精品| 久久久久久国产精品免费无码| 久久国产精品免费一区| 久久精品aⅴ无码中文字字幕不卡 久久精品aⅴ无码中文字字幕重口 | 亚洲午夜久久久久久噜噜噜| 国产欧美久久久精品| 亚洲日本va中文字幕久久| 国产99久久久久久免费看| 久久婷婷五月综合97色| 成人综合久久精品色婷婷| 久久久国产精品| 国产成人精品久久亚洲高清不卡 | 亚洲愉拍99热成人精品热久久| 亚洲国产成人久久综合区| 久久精品国产只有精品66| 国产高清国内精品福利99久久| 久久综合噜噜激激的五月天| 亚洲中文字幕无码久久综合网| 久久无码AV一区二区三区| 久久无码国产| 国内精品欧美久久精品| 国产精品成人99久久久久91gav| 99久久99久久| 精品一区二区久久| 久久免费小视频| 亚洲一区中文字幕久久| 狠狠综合久久综合中文88| 成人a毛片久久免费播放| 久久久久国产精品| 香蕉久久一区二区不卡无毒影院| 久久精品嫩草影院|