fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory

THanks
Last edited on
When you tried to use
#include <iostream> instead of #include <iostream.h>
did it still give you the message
'iostream.h': No such file or directory ?


None of the versions of Visual Studio you're using have iostream.h, so that definitely won't work. Just plain iostream should be fine.
Last edited on
when i use
#include<iostream>

using namespace std;


it giving me another error:



1>c:\users\genera07z\documents\visual studio 2005\projects\ali\ali\ali.cpp(99) : warning C4996: 'strcpy' was declared deprecated
1> c:\program files\microsoft visual studio 8\vc\include\string.h(73) : see declaration of 'strcpy'
1> Message: 'This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>c:\users\genera07z\documents\visual studio 2005\projects\ali\ali\ali.cpp(122) : warning C4996: 'stricmp' was declared deprecated
1> c:\program files\microsoft visual studio 8\vc\include\string.h(213) : see declaration of 'stricmp'
1> Message: 'The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _stricmp. See online help for details.'
1>c:\users\genera07z\documents\visual studio 2005\projects\ali\ali\ali.cpp(175) : warning C4996: 'strcpy' was declared deprecated
1> c:\program files\microsoft visual studio 8\vc\include\string.h(73) : see declaration of 'strcpy'
1> Message: 'This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>c:\users\genera07z\documents\visual studio 2005\projects\ali\ali\ali.cpp(177) : warning C4996: 'getch' was declared deprecated
1> c:\program files\microsoft visual studio 8\vc\include\conio.h(145) : see declaration of 'getch'
1> Message: 'The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _getch. See online help for details.'
1>c:\users\genera07z\documents\visual studio 2005\projects\ali\ali\ali.cpp(216) : error C3861: 'clrscr': identifier not found
1>c:\users\genera07z\documents\visual studio 2005\projects\ali\ali\ali.cpp(236) : error C3861: 'clrscr': identifier not found
1>c:\users\genera07z\documents\visual studio 2005\projects\ali\ali\ali.cpp(258) : error C3861: 'clrscr': identifier not found
1>c:\users\genera07z\documents\visual studio 2005\projects\ali\ali\ali.cpp(277) : error C3861: 'clrscr': identifier not found
1>c:\users\genera07z\documents\visual studio 2005\projects\ali\ali\ali.cpp(296) : error C3861: 'clrscr': identifier not found
1>c:\users\genera07z\documents\visual studio 2005\projects\ali\ali\ali.cpp(313) : error C3861: 'clrscr': identifier not found
1>c:\users\genera07z\documents\visual studio 2005\projects\ali\ali\ali.cpp(336) : error C3861: 'clrscr': identifier not found
1>Build log was saved at "file://c:\Users\GeNeRa07z\Documents\Visual Studio 2005\Projects\ali\ali\Debug\BuildLog.htm"



I don't know how can i fix this error

Please if u can help me to fix this error.

Try #include <conio.h> .

I think clrscr() is deprecated, so find another way of clearing your screen.
Last edited on
This is a much better set of errors. These errors and warnings indicate that you're trying to use a function, clrscr, that simply does not exist, and that you're using functions ( strcpy, stricmp, getch) that do exist, and it won't stop you using them, but they're really really bad choices.

This all looks like it was written over a decade ago. You should throw away whatever you learned this from and get something recent.

If you absolutely insist on clearing the screen, read this: http://www.cplusplus.com/articles/4z18T05o/
Thanks a lot..
i fixed the error


I hope you can help me with this one too



C++:



fstream f;
f.open("patient",ios::in|ios::out|ios::ate|ios::app|ios::binary);




ERROR:


error C2360: initialization of 'f' is skipped by 'case' label
1> c:\users\genera07z\documents\visual studio 2005\projects\ali\ali\ali.cpp(97) : see declaration of 'f'
You've written your code in such a way that some of it might not be executed; one of those bits is the initialisation of f.

Let's see the code. Please, please, please use the code tags (looks like <>, over on the right).

Topic archived. No new replies allowed.