. , , , src header, .
.h , . stdio, , io, src, printf, .
, , , , (, , ), . .
, /exe, , -, , , .h - .
edit:
inc1.h
#ifndef INC1_H
#define INC1_H
inc1_struct {
int x;
};
#endif
inc2.h
#ifndef INC2_H
#define INC2_H
#include "inc1.h"
void inc2_f();
struct inc1_struct *inc2_callinc1();
#endif
prog.cpp #include "inc1.h" #include "inc2.h"
# #include
void inc2_f() {
printf("inc2_f\n");
}
struct inc1_struct *inc2_callinc1() {
return (struct inc1_struct*) malloc(sizeof(struct inc1_struct));
}
int main(int argc, char **argv) {
struct inc1_struct *s = inc2_callinc1();
return 0;
}
, ,
struct inc1_struct *inc2_callinc1();
inc2.h
inc1.h inc2.h, inc2_callinc1() prog.cpp, inc1. .