程序找錯

 #include <iostream.h>
class Customer
{
public:
  int age;
};
void mian()
{
  Customer obj1,obj2;
  cout<<"Enter the first customer's age:";
  cin>>obj1.age;
  obj2=obj1;
  cout<<obj1.age<<"  is the age of customer1"<<endl;
  cout<<obj2.age <<"  is the age of custmoer2"<<endl;
}

上邊是我在課上練習的時候敲的一段小程序,有一處錯誤,你能找出來嗎?

如果你找出來了,那麼你是細心的人,如果沒找出來,嘿嘿……你和我一樣,要注意了,程序員最重要的就是細心!!!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章