may I know why I comment out the #ifndef #ifend #define and #pragma it gets an include itself error.
A Thread Starter Alex1700 Joined Jan 12, 2020 107 Apr 2, 2023 #1 may I know why I comment out the #ifndef #ifend #define and #pragma it gets an include itself error.
WBahn Joined Mar 31, 2012 32,703 Apr 2, 2023 #2 Because of exactly what the error is telling you. You have a file that is including itself. What do you expect to happen when it includes FOO.h the first time? It's going to include FOO.h a second time. Then a third time. And so on.
Because of exactly what the error is telling you. You have a file that is including itself. What do you expect to happen when it includes FOO.h the first time? It's going to include FOO.h a second time. Then a third time. And so on.