I know that when I have only one source file in C++, preprocessor commands are done in order they were written, but what if I have more than one source file? How is the decision made, which source file should be taken at first? I've written in both source files such code:
#ifndef b
#define b 10
int a = 15;
#endif
and when I compile, there is an error, that variable a has been already defined. But why, if there is a command #ifndef and #endif?