PageRenderTime 26ms CodeModel.GetById 0ms RepoModel.GetById 1ms app.codeStats 0ms

/www.cppreference.com/wiki/preprocessor/include

https://github.com/tsgates/cclookup
#! | 64 lines | 57 code | 7 blank | 0 comment | 0 complexity | c48978922d14de03fd9a334dd94e5ea0 MD5 | raw file
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
  4. lang="en" dir="ltr">
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <title>preprocessor:include</title>
  8. <meta name="generator" content="DokuWiki" />
  9. <meta name="robots" content="index,follow" />
  10. <meta name="date" content="2010-10-28T18:17:02-0700" />
  11. <meta name="keywords" content="preprocessor,include" />
  12. <link rel="search" type="application/opensearchdescription+xml" href="http://www.cppreference.com/wiki/lib/exe/opensearch.php" title="C++ Reference" />
  13. <link rel="start" href="../../index.html" />
  14. <link rel="contents" href="http://www.cppreference.com/wiki/preprocessor/include?do=index" title="Sitemap" />
  15. <link rel="alternate" type="application/rss+xml" title="Recent Changes" href="http://www.cppreference.com/wiki/feed.php" />
  16. <link rel="alternate" type="application/rss+xml" title="Current Namespace" href="http://www.cppreference.com/wiki/feed.php?mode=list&amp;ns=preprocessor" />
  17. <link rel="alternate" type="text/html" title="Plain HTML" href="http://www.cppreference.com/wiki/_export/xhtml/preprocessor/include" />
  18. <link rel="alternate" type="text/plain" title="Wiki Markup" href="http://www.cppreference.com/wiki/_export/raw/preprocessor/include" />
  19. <link rel="canonical" href="include" />
  20. <link rel="stylesheet" media="screen" type="text/css" href="../lib/exe/css.php@t=custom1&amp;tseed=1289693594" />
  21. <link rel="stylesheet" media="all" type="text/css" href="../lib/exe/css.php@s=all&amp;t=custom1&amp;tseed=1289693594" />
  22. <link rel="stylesheet" media="print" type="text/css" href="../lib/exe/css.php@s=print&amp;t=custom1&amp;tseed=1289693594" />
  23. <script type="text/javascript" ><!--//--><![CDATA[//><!--
  24. var NS='preprocessor';var JSINFO = {"id":"preprocessor:include","namespace":"preprocessor"};
  25. //--><!]]></script>
  26. <script type="text/javascript" charset="utf-8" src="../lib/exe/js.php@tseed=1289693594" ></script>
  27. </head>
  28. <body>
  29. <div class="dokuwiki export">
  30. <h2 class="sectionedit1"><a name="include" id="include">#include</a></h2>
  31. <div class="level2">
  32. <p>
  33. Syntax:
  34. </p>
  35. <pre class="cpp code cpp"> <span class="co2">#include &lt;filename&gt;</span>
  36. <span class="co2">#include &quot;filename&quot;</span></pre>
  37. <p>
  38. This command slurps in a file and inserts it at the current location. The main
  39. difference between the syntax of the two items is that if filename is enclosed
  40. in angled brackets, then the compiler searches for it somehow. If it is
  41. enclosed in quotes, then the compiler doesn&#039;t search very hard for the file.
  42. </p>
  43. <p>
  44. While the behavior of these two searches is up to the compiler, usually the
  45. angled brackets means to search through the standard library directories, while
  46. the quotes indicate a search in the current directory. The spiffy new C++
  47. #include commands don&#039;t need to map directly to filenames, at least not for the
  48. standard libraries. That&#039;s why you can get away with
  49. </p>
  50. <pre class="cpp code cpp"> <span class="co2">#include &lt;iostream&gt;</span></pre>
  51. <p>
  52. and not have the compiler choke on you.
  53. </p>
  54. </div>
  55. </div>
  56. </body>
  57. </html>