# 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;