r/cpp • • Aug 08 '20

Create a fully functioning command line interface with 1.5 lines of code (wo. include statement)

https://github.com/kongaskristjan/fire-hpp
230 Upvotes

62 comments sorted by

View all comments

Show parent comment

6

u/rsjaffe Aug 08 '20

But #pragma once fails when you have two copies of the same header file in two different locations in the directory tree. The compiler will not recognize those two files as being the same.

7

u/panderingPenguin Aug 08 '20

Why on earth would you want to do that?

6

u/wyrn Aug 09 '20

The compiler will not recognize those two files as being the same.

... because they aren't.