I have error in Visual studio 2008

Hello everybody, I have Now Visual Studio 2008 but I can't compile the samples who are on the site and when I write some c++ file has an iostream include I receive an error message from the compiler and ths is the text of the error "fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory" I want some lesson about writing an C++ source by Visual Studio 2008 please ..... thank you
Last edited on
My friend, please write it like this:
#include <iostream>
without the ".h" for this particular header file. Sometimes, for some header files, it wants the .h, sometimes it doesn't. It's for a reason, but I'm not sure why.

Also, I'm not sure what you mean exactly about want a C++ source by Visual Studio 2008, but if you want specific stuff about programming for windows, I guess I'm like you and am looking for good windows programming guides.
Last edited on
I have write this code :
#include "stdafx.h"
#include "iostream"
main ()
{
cout << "Hi" ;
return 0;
}

but I receive two errors :
the first error : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
the second error : error C2065: 'cout' : undeclared identifier
and I don't knew any thing
It's ok guy, do this:
1
2
3
4
5
6
7
#include <iostream>
using namespace std;
int main ()
{
   cout << "Hello Mouhannad";
   return 0;
}

That's what it means by "missing type specifier - int assumed. Note: C++ does not support default-int.
'cout' : undeclared identifier".
Last edited on
Thanks ..... Very much .....Very much ..... Very much
Thanks ..... Very much .....Very much ..... Very much
It worked OK thank you man
It's ok, you are welcome.
Last edited on
Topic archived. No new replies allowed.