|
From: <Mat...@Ve...> - 2005-04-13 14:26:41
|
Alright, I'll explain this for you really quick. When you include in C++, you include by filename. So, when the code says #include <iostream>, the <> means it's a system header in a standard directory like /usr/include/c++ or /usr/include for C headers on UNIX systems. On Windows the directories are a little "weird" but Dev-C++ takes care of it for you. This is different from Java, where the import keyword pulls stuff in by the name of the classes / packages you want. Personally, I have many more problems with the Java approach than the C++ approach, but that's just me. Your mileage may vary. Now, to include code of your own, place it in the same directory as the main file, and use "" instead of <>. For example, if you called the subten function's file subten.c, you would need #include "subten.c". Also, the compiler needs you to name files as .c or .cpp according to the kind of code you put in them, or it might get confused and try to compile some C++ as C, which will not usually work. If in doubt, call it a .cpp since C will compile as C++ 98/100 times. Hope this helps, Matt -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of Austin Scholze Sent: Tuesday, April 12, 2005 9:19 PM To: AAAAA Dev C++ mail list Subject: [Dev-C++] (no subject) <SNIP> #include "subten" </SNIP> ___________________________________________________________________ The information contained in this message and any attachment may be proprietary, confidential, and privileged or subject to the work product doctrine and thus protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify me immediately by replying to this message and deleting it and all copies and backups thereof. Thank you. |