C++ compile problem
hi i want to run this code
#include<iostream> #include<conio.h> #include<graphics.h> i have error in graphics.h i have C++ 2005 |
Quote:
It would help if you told us exactly what the error message was. Also, I don't know what you mean when you say you want to run that code, as there's no main() function in it.. Can you post the full code (if it's short, or the part where the errors occur, if not) along with those error messages? Also, be aware the conio.h and graphics.h are Windows headers (I believe), so if you're trying to compile this on Linux, you won't be able to. Edit: see dugan's reply below. |
Quote:
My reply is: it doesn't work because you're trying to include proprietary Borland C++ headers in a project that you're building with Microsoft Visual Studio 2005. There is no reason at all to believe that Microsoft's compiler would support the proprietary extensions included with a competing compiler from the mid 90s. Furthermore, conio.h and graphics.h are specifically meant for writing DOS programs. A program using them would not run in any other operating system. If you got that code out of a C++ book, then throw that book out NOW. The book was obviously written for Borland C++. Borland C++ was released before C++ was standardized in 1998, so the book would not only be teaching you proprietary Borland C++ extensions, but also pre-standard C++. And BTW, as you can see from reading the opening post in the "C/C++ tutorials" sticky thread, the sticky thread is for external links to C/C++ tutorials. Not for asking for C/C++ help. |
cannot include file 'graphic.h' no such file or directory this is error
|
Quote:
|
All times are GMT -5. The time now is 06:44 AM. |