首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

大家帮忙看看成错在哪了解决思路

2012-02-06 
大家帮忙看看成错在哪了#include iostream.hclassText_const{private:intmpublic:Test_const(intargl){

大家帮忙看看成错在哪了
#include <iostream.h>
class   Text_const
{
private   :
int   m;
public   :
Test_const(int   argl)
{
m=argl;
}
void   setvalue(int   newvalue);
        void   showvalue();
void   showvalue()   const;
};
void   Test_const::setvalue(int   newvalue)
{
m=newvalue;
}
void   Test_const::showvalue()
{
cout < < "m= " < <m < <endl;
}
void   Test_const::showvalue()   const
{
cout < < "m= " < <m < <endl;
}
void   main()
{
Test_const   c1(100);
const   Test_const   c2(100);
c1.setvalue(200);
        c1.showvalue();
c2.showvalue();
}

[解决办法]
#include <iostream>

using namespace std;

class Test_const //Test_const not Text_const
{
.........
[解决办法]
- -!

Test 打成 Text 了

热点排行