Last active
December 14, 2015 08:34
-
-
Save eXpl0it3r/757b5671918b90819115 to your computer and use it in GitHub Desktop.
Forward Decleration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "B.hpp" | |
#include "C.hpp" | |
B::B() | |
: m_c(nullptr) | |
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
class C; | |
class B | |
{ | |
public: | |
B(); | |
private: | |
C* m_c; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "C.hpp" | |
#include "D.hpp" | |
C::C() | |
: m_d(nullptr) | |
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
class D; | |
class C | |
{ | |
public: | |
C(); | |
private: | |
D* m_d; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
class D | |
{ | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "B.hpp" | |
int main() | |
{ | |
B b; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment