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

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

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

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

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

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

            class XXX{
            }

            //source

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

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

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

            所以不要隨便就責(zé)怪編譯器。  回復(fù)  更多評論
              
            # re: 編譯錯誤:constructors not allowed a return type 2007-01-11 16:17 | pengkuny
            @空明流轉(zhuǎn)
            老大說得是  回復(fù)  更多評論
              
            # re: 編譯錯誤:constructors not allowed a return type 2007-04-03 18:16 | 王一偉
            呵呵 研究下編譯原理 還是很有裨益 :)  回復(fù)  更多評論
              
            # re: 編譯錯誤:constructors not allowed a return type 2008-04-15 15:07 | Mashka
            沒有分號  回復(fù)  更多評論
              
            # re: 編譯錯誤:constructors not allowed a return type 2008-04-15 17:20 | 小子
            暈死
              回復(fù)  更多評論
              
            # re: 編譯錯誤: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;
            }//就是這里少了個;!!!!!!!!!!!!!!!!!!!!!//
            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<<"請輸入x,y"<<endl;
            cin>>x>>y;
            juzhen d(x,y);
            d.out();
            }  回復(fù)  更多評論
              
            # re: 編譯錯誤:constructors not allowed a return type 2008-10-31 11:29 | 安安
            呵呵。我也碰到了這個問題,百度下就百度到老兄你了。。謝啦  回復(fù)  更多評論
              
            # re: 編譯錯誤:constructors not allowed a return type 2008-10-31 22:42 | xj
            同樓上~  回復(fù)  更多評論
              
            # re: 編譯錯誤:constructors not allowed a return type 2009-03-05 15:36 | hui
            我也遇到了這個問題,google一下就找到兄弟你了,問題一下子就解決掉,謝謝,呵呵  回復(fù)  更多評論
              
            # re: 編譯錯誤:constructors not allowed a return type[未登錄] 2009-03-20 14:24 | Leo
            同感  回復(fù)  更多評論
              
            # re: 編譯錯誤:constructors not allowed a return type 2009-07-23 17:34 | aa
            彼此彼此  回復(fù)  更多評論
              
            # re: 編譯錯誤:constructors not allowed a return type 2009-07-30 19:47 | haizhifeng
            高手呀,真是太感謝了!!!!  回復(fù)  更多評論
              
            # re: 編譯錯誤:constructors not allowed a return type 2009-10-12 14:47 | huang
            謝謝了,很有用呵呵  回復(fù)  更多評論
              
            # re: 編譯錯誤:constructors not allowed a return type 2009-12-25 10:25 | clouds
            謝謝阿。我也是google過來的。  回復(fù)  更多評論
              
            # re: 編譯錯誤:constructors not allowed a return type 2010-04-09 18:19 | 寫什么姓名嗎?
            同樣遇到這個問題,看到答案后一分析,果然這個提示有些道理啊,呵呵  回復(fù)  更多評論
              
            # re: 編譯錯誤:constructors not allowed a return type 2010-07-30 10:36 | wo
            @寫什么姓名嗎?
            我也遇到了這個錯誤。結(jié)果google一下就到這里了  回復(fù)  更多評論
              

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


            欧洲性大片xxxxx久久久| 久久精品亚洲中文字幕无码麻豆| 精品久久久久久亚洲精品 | 久久精品国产色蜜蜜麻豆| 久久99国产精品久久99小说| 无码人妻久久一区二区三区蜜桃 | 国内精品久久久久久麻豆| 人妻中文久久久久| 97久久精品人妻人人搡人人玩| 久久e热在这里只有国产中文精品99 | 狠狠色丁香久久婷婷综合图片 | 亚洲成av人片不卡无码久久| 久久精品中文无码资源站| 久久中文精品无码中文字幕| 97久久综合精品久久久综合| 久久夜色精品国产噜噜亚洲a| 久久久久久免费一区二区三区 | 久久er国产精品免费观看8| 性高湖久久久久久久久| 亚洲欧美国产精品专区久久| 91亚洲国产成人久久精品| 久久99精品久久只有精品| 大香伊人久久精品一区二区| 久久精品国产99国产精品| 一本久久久久久久| 久久精品人人做人人爽97| 99精品久久久久久久婷婷| 久久噜噜久久久精品66| 99久久免费国产精品| 久久精品无码一区二区三区| 99久久精品国内| 精品精品国产自在久久高清| 久久精品国产第一区二区三区| 久久综合香蕉国产蜜臀AV| 久久影院综合精品| 好久久免费视频高清| 国产成人无码久久久精品一| 久久精品一区二区三区不卡| 国产精品久久波多野结衣| 久久91精品国产91久久户| 久久九九青青国产精品|