Problem with #ifndef and #pragma once

Posted by Xaver on Stack Overflow See other posts from Stack Overflow or by Xaver
Published on 2010-04-05T03:46:47Z Indexed on 2010/04/05 3:53 UTC
Read the original article Hit count: 525

Filed under:
|
|
|

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

© Stack Overflow or respective owner

Related posts about c++

Related posts about visual-c++