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

一个C++包含头文件的有关问题

2012-02-21 
一个C++包含头文件的问题~主文件是#include iostream#includeth.h usingnamespacestdintmain(){hello

一个C++包含头文件的问题~
主文件是
#include <iostream>

#include   "th.h "
using   namespace   std;
       
int   main(){
      hello   f;
      f.list();  
      getchar();
      return   0;
}

我现在想包含一个头文件   内容是这样的
class   hello{
         
            public:
                          void   list();
                          };
                         
                          void   hello::list(){
          cout < < "hello   word ";
          }
这么简单的程序为什么一编译   就提示
th.h   `cout '   undeclared   (first   use   this   function)  
cout没定义???


[解决办法]
using namespace std;
#include "th.h "

热点排行