/* * Copyright (c) 2008,XXX网络科技有限公司技术部 * All rights reserved. * * 文件名称: HighC.h * 文件标识: 见配置管理计划书 * 摘 要: MySql的C++封装 * * 当前版本: 1.1 * 当前作者: qingfeng * 完成日期: 2008.06.26 * * 取代版本: 1.0 * 原作者 : jianke *完成日期 : 2007.05.18 */
#ifndef HIGHC_H //防止HighC.h被重复引用 #define HIGHC_H
#include <iostream> //引用标准头文件 //#include "myhead.h" //引用非标准的头文件 using namespace std;
void Function1(); //全局函数声明
class Box //类结构声明 { public: void Draw(); //类的成员函数大写
private: int m_a; //类的数据成员m_前缀 int m_b; };
#endif
/* * Copyright (c) 2008,XXX网络科技有限公司技术部 * All rights reserved. * * 文件名称: HighC.cpp * 文件标识: 见配置管理计划书 * 摘 要: MySql的C++封装 * * 当前版本: 1.1 * 当前作者: qingfeng * 完成日期: 2008.06.26 * * 取代版本: 1.0 * 原作者 : jianke *完成日期 : 2007.05.18 */
#include "HighC.h" //引用头文件
int g_people; //全局变量用g_
//全局函数的实现体 /* 函数介绍: * 输入参数 : * 输出参数 : * 返回值 : */ void Function1() { cout << "Function1" << endl; } //空行 //类成员函数的实现体 void Box::Draw() { m_a=1; m_b=2; cout << "Draw" << m_a << m_b << endl; } //空行 int main() {
const int MAX=100; //const常量大写 static int s_initvalue; //静态的用s_ return 0; }