iostream is a declaration for c++ programs if you are using ccompiler it will not run because c++ programs will not run in c compiler or suppose your program is not running in c++ compiler(eg:-turbo) if we consider go for 1) options menu select compiler|c++ options in the dialog box that appears select cpp always now you can run the program without errors