T
tatto0_2000
Hi,
I am a bit confuse. If I have the header file hdr.h with the
following:
#ifndef HDR_H
#define HDR_H
#define a 10
#define b 20
#endif
In file1.c:
#include "hdr.h"
/* and other codes to access constant a and b after this */
In file2.c:
#include "hdr.h"
/* and other codes to access constant a and b after this */
If these 2 C files to be compiled in the same project, would it still
legal? Can I get access to both constants in both files?
Thanks.
I am a bit confuse. If I have the header file hdr.h with the
following:
#ifndef HDR_H
#define HDR_H
#define a 10
#define b 20
#endif
In file1.c:
#include "hdr.h"
/* and other codes to access constant a and b after this */
In file2.c:
#include "hdr.h"
/* and other codes to access constant a and b after this */
If these 2 C files to be compiled in the same project, would it still
legal? Can I get access to both constants in both files?
Thanks.