ex1208c.cpp
来自「Fortran 95程序设计&Code-彭国伦」· C++ 代码 · 共 33 行
CPP
33 行
#include <stdio.h>
#include <string.h>
typedef struct _person
{
int age;
float weight, height;
} person;
#ifdef __cplusplus
extern "C" {
#endif
void _stdcall SUB1(int *num)
{
printf("%d\n",*num);
}
void _stdcall SUB2(char *a, int len)
{
a[len]='\0';
printf("%s\n",a);
}
void _stdcall SUB3(person *p)
{
printf("age:%d weight:%5.1f height:%5.1f\n",
p->age, p->weight, p->height);
}
#ifdef __cplusplus
}
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?