⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 education.c

📁 c语言是面向过程的程序语言
💻 C
字号:
/* ****************************** * Object Oriented Programming in C * * Author: Laurent Deniau, Laurent.Deniau@cern.ch * * For more information, please see the paper: * http://home.cern.ch/ldeniau/html/oopc/oopc.html * ****************************** */#include <stdio.h>/*------------------------------*//*   education implementation   *//*------------------------------*/#define IMPLEMENTATION#include <education.h>/*  ---------------------  Object implementation  ---------------------*/voidconstMethodDecl(print){  printf("\tdipl:\t%s\n", this->m.diploma);}BASEOBJECT_IMPLEMENTATION  methodName(print)ENDOF_IMPLEMENTATION/*  --------------------  Class implementation  --------------------*/initClassDecl() {} /* required */dtorDecl() /* required */{  free((void*)this->m.diploma);  this->m.diploma = NULL;}voidmethodDecl_(init) char const diploma[] __{  this->m.diploma = strdup(diploma);}voidmethodDecl_(copy) t_education const*const edu __{  education._education(this);  education.init(this, edu->m.diploma);}ABSTRACTCLASS_IMPLEMENTATION  methodName(init),  methodName(copy)ENDOF_IMPLEMENTATION

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -