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

大伙帮个忙!

2012-08-07 
大家帮个忙!!!/*ppiont.h*/#ifndef HANDER_POINT#define HANDER_POINTclass Cat{int itsAgepublic:int ge

大家帮个忙!!!
/*ppiont.h*/
#ifndef HANDER_POINT
#define HANDER_POINT
class Cat
{
  int itsAge;
  public:
  int getAge();
  void setAge();
  void meow();
};
#endif

/*oint.h*/
#include<iostream>
#include"ppiont.h"

int Cat::getAge()
{
  return itsAge;
}
void Cat::setAge(int age)
{
  itsAge = age;
}
void Cat::meow()
{
  std::cout<<"Meow.\n";
}

/*main.cpp*/
#include<iostream>
#include"oint.h"
int main()
{
  Cat frisky;
  frisky.setAge(5);
  frisky.meow();
  std::cout<<"frisky is a cat who is"<<frisky.getAge()<<" year old.\n";
  frisky.meow();
}

2 E:\C++\程序调试\第8章\练习\2\main.cpp In file included from main.cpp 
2 E:\C++\程序调试\第8章\练习\2\oint.h ppiont.h: No such file or directory. 

真的找不到错在那!!!

[解决办法]
No such file or directory.
木有找到文件,,LZ请检测路径设置。实在不行用全路径

热点排行
Bad Request.