日期:2014-05-16 浏览次数:20712 次
#ifndef A_H #define A_H #include <stdio.h> #include <string.h> #define LEN (10) struct Student { char *name; int age; }; void print_str(char *str) { printf("%s\n", str); return ; } void print_int(int val); #endif
#include "a.h" void print_int(int val) { printf("value is : %d\n", val); return ; }
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "a.h" int main() { char *str = "hello"; struct Student st1; st1.name = "L"; st1.age = 18; print_str(str); print_str(st1.name); print_int(st1.age); printf("main end!\n"); return 0; }