• <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>

            今天用VC6編程時(shí),出現(xiàn)錯(cuò)誤:
            error C2533: 'WumpusWorld::WumpusWorld' : constructors not allowed a return type
            程序并沒(méi)有返回值,構(gòu)造函數(shù)嘛,
            上網(wǎng)一查,方有一位仁兄和我同樣境遇,原來(lái)是
            頭文件中類聲明的時(shí)候,沒(méi)有在類結(jié)尾加上";"

            這個(gè)錯(cuò)誤提示定位也太風(fēng)馬牛不相及了.

            posted on 2007-01-09 23:21 哈哈 閱讀(6095) 評(píng)論(19)  編輯 收藏 引用

            評(píng)論:
            # re: 編譯錯(cuò)誤:constructors not allowed a return type 2007-01-10 11:32 | 傅衍杰your roommate
            我也嘗試過(guò)這樣的錯(cuò)誤,可是我那次反而正確定位在那里哦  回復(fù)  更多評(píng)論
              
            # re: 編譯錯(cuò)誤:constructors not allowed a return type 2007-01-10 11:56 | 平凡小草
            用assistx啊,可以避免這樣的輸入語(yǔ)法錯(cuò)誤  回復(fù)  更多評(píng)論
              
            # re: 編譯錯(cuò)誤:constructors not allowed a return type 2007-01-11 09:15 | sogno
            微軟的c++編譯器這塊做得確實(shí)不怎么樣,錯(cuò)誤提示驢唇不對(duì)馬嘴,比gcc差遠(yuǎn)了  回復(fù)  更多評(píng)論
              
            # re: 編譯錯(cuò)誤:constructors not allowed a return type 2007-01-11 15:00 | 空明流轉(zhuǎn)
            一點(diǎn)都不是問(wèn)題。

            編譯器認(rèn)為你的定義是

            你一定是這樣的結(jié)構(gòu)
            //header

            class XXX{
            }

            //source

            #nclude "xxx.h"
            XXX::XXX()
            {
            }
            //....

            編譯器會(huì)解釋為
            class XXX{} XXX::XXX()
            {
            }

            并非風(fēng)馬牛不相及。

            所以不要隨便就責(zé)怪編譯器。  回復(fù)  更多評(píng)論
              
            # re: 編譯錯(cuò)誤:constructors not allowed a return type 2007-01-11 16:17 | pengkuny
            @空明流轉(zhuǎn)
            老大說(shuō)得是  回復(fù)  更多評(píng)論
              
            # re: 編譯錯(cuò)誤:constructors not allowed a return type 2007-04-03 18:16 | 王一偉
            呵呵 研究下編譯原理 還是很有裨益 :)  回復(fù)  更多評(píng)論
              
            # re: 編譯錯(cuò)誤:constructors not allowed a return type 2008-04-15 15:07 | Mashka
            沒(méi)有分號(hào)  回復(fù)  更多評(píng)論
              
            # re: 編譯錯(cuò)誤:constructors not allowed a return type 2008-04-15 17:20 | 小子
            # re: 編譯錯(cuò)誤:constructors not allowed a return type 2008-04-15 17:22 | 小子
            #include<iostream>
            using namespace std;
            class juzhen
            {
            public:juzhen(int l,int k);
            ~juzhen(){delete p;};
            void out();

            private:
            int i,j,*p;
            }//就是這里少了個(gè);!!!!!!!!!!!!!!!!!!!!!//
            juzhen::juzhen(int l,int k)
            {
            i=l,j=k;
            int i1,j1;
            p=new int(i*j);
            for(i1=0;i1<i;i1++)
            for(j1=0;j1<j;j1++)
            cin>>*(p+i1*j+j1);
            }
            void juzhen::out()
            {
            int i1,j1;
            for(i1=0;i1<i;i1++)
            for(j1=0;j1<j;j1++)
            cout<<*(p+i1*j+j1);
            }

            void main()
            {
            int x,y;
            cout<<"請(qǐng)輸入x,y"<<endl;
            cin>>x>>y;
            juzhen d(x,y);
            d.out();
            }  回復(fù)  更多評(píng)論
              
            # re: 編譯錯(cuò)誤:constructors not allowed a return type 2008-10-31 11:29 | 安安
            呵呵。我也碰到了這個(gè)問(wèn)題,百度下就百度到老兄你了。。謝啦  回復(fù)  更多評(píng)論
              
            # re: 編譯錯(cuò)誤:constructors not allowed a return type 2008-10-31 22:42 | xj
            同樓上~  回復(fù)  更多評(píng)論
              
            # re: 編譯錯(cuò)誤:constructors not allowed a return type 2009-03-05 15:36 | hui
            我也遇到了這個(gè)問(wèn)題,google一下就找到兄弟你了,問(wèn)題一下子就解決掉,謝謝,呵呵  回復(fù)  更多評(píng)論
              
            # re: 編譯錯(cuò)誤:constructors not allowed a return type[未登錄](méi) 2009-03-20 14:24 | Leo
            # re: 編譯錯(cuò)誤:constructors not allowed a return type 2009-07-23 17:34 | aa
            彼此彼此  回復(fù)  更多評(píng)論
              
            # re: 編譯錯(cuò)誤:constructors not allowed a return type 2009-07-30 19:47 | haizhifeng
            高手呀,真是太感謝了!!!!  回復(fù)  更多評(píng)論
              
            # re: 編譯錯(cuò)誤:constructors not allowed a return type 2009-10-12 14:47 | huang
            謝謝了,很有用呵呵  回復(fù)  更多評(píng)論
              
            # re: 編譯錯(cuò)誤:constructors not allowed a return type 2009-12-25 10:25 | clouds
            謝謝阿。我也是google過(guò)來(lái)的。  回復(fù)  更多評(píng)論
              
            # re: 編譯錯(cuò)誤:constructors not allowed a return type 2010-04-09 18:19 | 寫(xiě)什么姓名嗎?
            同樣遇到這個(gè)問(wèn)題,看到答案后一分析,果然這個(gè)提示有些道理啊,呵呵  回復(fù)  更多評(píng)論
              
            # re: 編譯錯(cuò)誤:constructors not allowed a return type 2010-07-30 10:36 | wo
            @寫(xiě)什么姓名嗎?
            我也遇到了這個(gè)錯(cuò)誤。結(jié)果google一下就到這里了  回復(fù)  更多評(píng)論
              

            只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問(wèn)   Chat2DB   管理


            国产视频久久| 久久99久久99精品免视看动漫| 久久久久se色偷偷亚洲精品av| 99久久www免费人成精品| 久久久久国产精品熟女影院| 亚洲国产成人久久综合一区77| 日本免费久久久久久久网站 | 亚洲va中文字幕无码久久| 久久精品国产半推半就| 久久久久久国产精品无码超碰| 色婷婷综合久久久久中文一区二区| 久久人做人爽一区二区三区| 久久亚洲国产精品成人AV秋霞| 老男人久久青草av高清| 亚洲AV成人无码久久精品老人| 人妻系列无码专区久久五月天| 性做久久久久久久| 久久久久亚洲AV无码麻豆| AV狠狠色丁香婷婷综合久久| 好久久免费视频高清| 国产精品久久久久乳精品爆| 国产精品一区二区久久精品无码| 国产2021久久精品| 超级97碰碰碰碰久久久久最新 | 亚洲级αV无码毛片久久精品| 久久精品国产亚洲AV大全| 国产美女久久久| 久久久久亚洲av成人无码电影| 久久精品无码av| 亚洲人成网亚洲欧洲无码久久| 国产精品美女久久久m| 国产真实乱对白精彩久久| 一日本道伊人久久综合影| 综合久久国产九一剧情麻豆| 精品一区二区久久| 7777精品伊人久久久大香线蕉| 7777久久亚洲中文字幕| 天天做夜夜做久久做狠狠| 99久久人妻无码精品系列蜜桃| 日韩美女18网站久久精品| 国产精品美女久久久|