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

问一个C++有屎以来最菜的有关问题

2012-01-07 
问一个C++有屎以来最菜的问题。为什么我编译#includeiostream.h#includestringstringtest(){return333

问一个C++有屎以来最菜的问题。
为什么我编译
#include   <iostream.h>
#include   <string>

string   test(){
        return   "333 ";
}

void   main(){

        int   a=0;
}
这个提示error   C2146:   syntax   error   :   missing   '; '   before   identifier   'test '
做习惯了JAVA,现在需要用到点C++,连格式都不懂了。

[解决办法]
#include <iostream>
#include <string>
using namespace std; <=========少了这一行

string test(){
return "333 ";
}

void main(){

int a=0;
}

热点排行