重拾C语言-函数多文件定义

xiaoxiao2021-02-28  133

函数定义文件

文件名为: definition.function.func.c

// 函数声明 int _max(int a, int b); // 函数定义 int _max(int a, int b) { if ( a > b ) return a; else return b; }

调用函数定义

\#include <stdio.h> \#include "definition.function.func.c" void main() { printf( "%d\n", _max( 88, 87 ) ); return; }
转载请注明原文地址: https://www.6miu.com/read-50237.html

最新回复(0)