Quick question regarding Conditional Compilation (ifndef)

Posted by sil3nt on Stack Overflow See other posts from Stack Overflow or by sil3nt
Published on 2010-05-16T04:10:01Z Indexed on 2010/05/16 4:20 UTC
Read the original article Hit count: 172

Filed under:
|
|
|

Hello, This is quite probably a very silly question but I need to be sure. I've been given a class declaration in a header file eg.

#ifndef file_H
#define file_H

class ex{
private:

public:
};

#endif

and I've been required to write the method definitions in the same file, which I have done, my question is does the "#endif" stay where it is just after the class declaration or does it go at the end of my file after the class method definitions?.

© Stack Overflow or respective owner

Related posts about c++

Related posts about compiler