# re: 第一个C++程序 回复 更多评论
2006-05-28 17:55 by
"I am very like it!"------>"I like it very much!"
这样改可能更好一些。
# re: 第一个C++程序 回复 更多评论
2006-05-28 20:36 by
#include <iostream>
using std::cout;
using std::endl;
int main(int argc, char* argv[])
{
cout<<"Hello , This is my first home for C++."<<endl;
cout<<"I am very like it!"<<endl;
cout<<"I'll stay here.OK."<<endl;
return 0;
}
学习本来就是个严谨的过程,做技术的更是如此,所以还需努力才行。
好了,就写到这里吧。
# 帮运行一下这个程序好啊! 回复 更多评论
2006-12-03 19:58 by
#include<iostream.h>
void fn1();
int x=1,y=2;
void main()
{
cout<<"Begin..."<<endl;
cout<<"x="<<x<<endl;
cout<<"y="<<y<<endl;
cout<<"Evaluate x and y in main()..."<<endl;
int x=10,y=20;
cout<<"x="<<x<<endl;
cout<<"y="<<y<<endl;
cout<<"Step into fn1()..."<<endl;
fn1();
cout<<"Back in main"<<endl;
cout<<"x="<<x<<endl;
cout<<"y="<<y<<endl;
}
void fn1()
{
int y=200;
cout<<"x="<<x<<endl;
cout<<"y="<<y<<endl;