Mam malinky problem s viditelnostou funkcii, ktore includujem. Teda neviem ci som to dobre napisal ale vysvetlim.
mam dajme tomu 3 subory:
Kód: Vybrať všetko
//hlavny.c - obsahuje
#include <vedlajsi.h>
main(){
..
..
}
Kód: Vybrať všetko
//vedlajsi.h - obsahuje 2 uplne funkcne prototypy funkcii
#ifndef __vedlajsi_h__
#define __vedlajsi_h__
extern int min(int a, int b);
extern int max(int a, int b);
#endif
Kód: Vybrať všetko
//vedlajsi.c - obsahuje 4 definicii funkcii
#include <vedlajsi.h>
static void scitanie(int a, int b);
static void odcitanie(int a, int b);
// definicie funkcii
int min(int a, int b){
...
}
int max(int a, int b){
...
}
static void scitanie(int a, int b){
...
}
static void odcitanie(int a, int b){
...
}
Dufam, ze som to napisal aspon trocha zrozumitelne inak dane subory berte iba ako priklad. Vdaka za odpovede