摘要: 1需要包含文件加 #pragma once (MS)2 使用宏 /* 2.h */ #ifndef H_2#define H_2#include "3.h"#endif (最后)3#include的时候用条件判断下,如#ifndef H_2#include "2.h" #endif 4 变量等定义写到CPP中,在h中 使用 extern如果 cpp中, int i;h中 extern int i; 阅读全文
posted @ 2010-10-04 11:18 谭志宇 阅读(474) 评论(0) 推荐(0) 编辑