问一个程序改错题,急!!

[复制链接]
查看11 | 回复3 | 2013-4-19 10:34:09 | 显示全部楼层 |阅读模式
stdio.h是C语言的输入输出流库函数 而你用C++的输入输出流cout当然报错了!吧stdio.h改为#includeusing namespace std;int main(){
coutvoid main( ) {printf("This is a string");  }c语言用printf。C++用cout,并且两者的开头也有所不懂C++是#includeusing namespace std;int main()...
回复

使用道具 举报

千问 | 2013-4-19 10:34:09 | 显示全部楼层
#includeusing namespace std;int main(){
coutint main( ) {printf("This is a string"); }...
回复

使用道具 举报

千问 | 2013-4-19 10:34:09 | 显示全部楼层
/***********FOUND***********/#includeusing namespace std;void main( ) {cout<<"This is a string"; }需要引入std的命名空间...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行