2

//To all those marking this as a duplicate, I did search before and found some similar ones, however, those did not fully answer my question and I'm still not sure how to answer the question I have included in this post. I need someone nice enough to explain their difference a little bit more in depth.

What is the difference of #include < something > and #include "something.h" ? Also can someone tell me why the 3rd option is right in the multiple choice question below?

Suppose you wanted to make use of terminal control routines I gave and all your codes are put in yourprog.cpp. The interface for terminal control is declared in term control.h and the implementation is stored in term control.cpp. Which of the following include lines should be put in yourprog.cpp so your program can use the terminal control routines?

  1. include <term control>

  2. include <term control.h>

  3. include "term control.h"

  4. include <iostream>

Gela
  • 79
  • 1
  • 13
  • Well the whole point of include is to include a reference to a file containing code, which is why this file must be mentioned. Did you mean to type just the word include for choices 1,2 and 4? – PaulG Oct 03 '13 at 17:46
  • "" tells to compiler to look in the local directory, and usually the predefined header directories as well – Rahul Tripathi Oct 03 '13 at 17:46
  • @PaulG No I had the rest in tags and they didn't appear so I had to make some changes and now it works. I'd much appreciate if you could clarify the question also – Gela Oct 03 '13 at 17:59
  • @RahulTripathi how about the tags? – Gela Oct 03 '13 at 18:01
  • @GelaMp:- <> tells the compiler to look in predefined header directories only – Rahul Tripathi Oct 03 '13 at 18:02
  • Can someone post a link to the alleged duplicate? – CodyBugstein Oct 23 '13 at 05:52

0 Answers0