#include <iostream.h>
#include <conio.h>
int main()
{
cout<<"hello";
 textcolor(2);
cprintf("hello");
 return 0;
}

Errors i am getting : call to undefined function 'textcolor' in function main
call to undefined function 'cprintf' in function main

I am using Turbo c++ 4.5 Windows XP SP2
Also graphics.h header file is not supported and dos.h file is simply have no effect on compilation.
Also this type of code is given in the HELP section of compiler.

http://info.borland.com/borlandcpp/turbosuite/turbo45.html
Turbo C++ 4.5 for Windows 3.1
16-bit C and C++ development for Windows

It isn't a DOS compiler, and it isn't an XP compiler.

Just because you managed to make "hello world" work doesn't mean that it's a good choice for all your future software development.

For a start, it's still stuck in a 16 bit world, where the max block for any single object is 64K and the total amount of memory you could ever have is around 1MB.

How much memory do you really have on your 32-bit XP machine?
You're trying to fill the bath with a tea-spoon!

conio.h isn't a part of the C/C++ standard. It was included with about 3 compilers and was implemented differently between each. I would recommend:

a) Getting a newer compiler. Turbo C++ was made for DOS/Win 3.1. Something that was made for Win 3.1 just doesn't cut it. If your machine is running XP then Code::Blocks is a great IDE which comes with a the GCC compiler. http://www.codeblocks.org/

b) Stick to standard C/C++ if you're learning the language. Once you learn C++ you can experiment with non-standard code if you want.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.