当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

    摘要: map<int,string> data_map; ...... 把data_map写入硬盘,比如"e:\\data.dat" ...... 从data.dat中读出 data_map,并在内存中重新构造一个map<int,string> 我找了一些资料,可都没有找到fstream的用法。 ......
 ·100分求助解决下面的问题    »显示摘要«
    摘要: #ifndef _aspire_cmpp_api_h_ #define _aspire_cmpp_api_h_ struct reccconnect { int nseqid; char ssrcaddr[ 6+1 ]; u_char usauthsp[ 16 ]; u_char ucversion; int ntimestamp; }; typedef struct rec......


用最后的10分: 我写的c头文件怎样编译和运行

不好意思,10分也想请教问题,   还希望大家多加理解.  
   
      我的系统使red   hat   9  
      我按照书上写的写了一个err_exit.h的头文件,如下:  
   
      #include   <stdio.h>  
      #include   <errno.h>  
      #define   err_exit(MESSAGE)(  
          perror(MESSAGE),  
          exit(1)  
      )  
   
      请问我应该怎么搞才会使我的这个头文件在以后自己写的程序中通过#include   "err_exit.h"语句被包进来.  
   
 

NO.1   作者: icedust

gcc的参数  
  -I指定include的路径

NO.2   作者: bluemiles

把err_exit.h放到gcc的include路径下  
  或者跟你的.c文件放到同一个目录

NO.3   作者: acqy

err_exit.h最好这样写:  
  #if   !defined   (__ERR_EXIT_H)  
  #define   __ERR_EXIT_H  
  #include   <stdio.h>  
  #include   <errno.h>  
  #define   err_exit(MESSAGE)   (perror(MESSAGE);exit(1))  
  #endif  
  然后将这个文件放到usr/include目录下或者放到调用程序的当前目录下


 ·学习<< jstl in action >>    »显示摘要«
    摘要: 用jstl的导入标签克服jsp:include的局限性 javaserver页面标准标签库(jstl)提供了自定义标签的标准集,其中包括jstl导入标签。这个导入标签向jsp:include标签添加功能,并消除了你自己为这些功能编写代码的需要。 第一个额外的功能能让你能够直接地把其他web网站的内容包括进自己的页面。所以下面的内容现在是合法的: <c:import url=&quo......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE