Getting Errors with “std_lib_facilities.h”

Hey guys, newbie's here. I'm doing exercises from Stroustrup's book. I got errors when I included his header file. Here's the detail: https://stackoverflow.com/questions/38988513/getting-errors-with-std-lib-facilities-h

Thanks you!
Last edited on
closed account (48bpfSEw)
I read cross over the Stroustrup's homepage and stumbled over this statement:

http://www.stroustrup.com/Programming/

Supporting code:

Note that different compilation systems and programmer communities have different conventions for where to put header files. The book assumes that a header file is in the same directory/folder as the .cpp files and uses "plain" #include "std_lib_facilities.h". If that doesn't work, try #include "../std_lib_facilities.h" (one level up) and #include "../../std_lib_facilities.h" (two levels up).
DUDE! YOU'RE AWESOME! You've enlightened me. I've been using old version of header file and did not target to current project in Xcode while creating new header file. Now it's working fine.

But one more question:

1
2
3
/Users/f/Downloads/testing/testing/std_lib_facilities.h
/Users/f/Downloads/testing/testing/std_lib_facilities.h:107:14: Comparison of unsigned expression < 0 is always false
/Users/f/Downloads/testing/testing/std_lib_facilities.h:113:14: Comparison of unsigned expression < 0 is always false


Now it shows me those. Here's the link for screenshot: https://imgur.com/a/mL4Cc
Last edited on
closed account (48bpfSEw)
"unsigned int i" can not be a negative number therefore is "i < 0" always false!
It is not realy an error, but useless in combination with || (or)...
Last edited on
Topic archived. No new replies allowed.