This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

#include paths

Im new to uvision and programming and im looking at a project that has some headers as,
#include "..\..\..\swim\lpc_types.h". How do i give it the correct path to the file?..how is "..\..\..\" supposed to define a path?, ive only seen headers included like #include lpc_types.h

Parents
  • But almost anyone writing a #include with "..\.." in it, is likely to get hurt when they another day have "\bios" or "\network" or similar, and ends up with one of the C escape sequence replacements instead.

    So use of a single "\" in an #include on the MS-DOS/Windows platform have caught lots of developers. And probably a number of people on other platforms too.

    But both "\" and "\\" ends up in language standard texts either claiming "undefined" or "conditionally supported". While "/" is almost always supported even if the language standard doesn't require it. But "/" is part of POSIX.

Reply
  • But almost anyone writing a #include with "..\.." in it, is likely to get hurt when they another day have "\bios" or "\network" or similar, and ends up with one of the C escape sequence replacements instead.

    So use of a single "\" in an #include on the MS-DOS/Windows platform have caught lots of developers. And probably a number of people on other platforms too.

    But both "\" and "\\" ends up in language standard texts either claiming "undefined" or "conditionally supported". While "/" is almost always supported even if the language standard doesn't require it. But "/" is part of POSIX.

Children