Problem with #ifndef and #pragma once
- by Xaver
I want write the program with next struct
stdafx.h - contains some #define defenitions of program constants and #include of headers wich uses in all project.
frmMain.h - contatins code of Form1 also can Show form2 and uses some code from BckHeadr.h and some functions call that headers included in stdafx.h.
frmIniPrgs.h - contatins code of Form2 and uses some code from BckHeadr.h and some functions call that headers included in stdafx.h.
BckHeadr.h - contatins some definitions of functions and some functions call that headers included in stdafx.h.
I know what i must use #ifndef or #pragma once directives. But i can not decided this problem. I included in stdafx.h: frmIniPrgs.H, BckHeadr.h, frmMain.h. And use #ifndef in all modules. I uset it like this:
#ifndef MYMODULE_H
#define MYMODULE_H
//module code
#endif