July 21, 2002
What´s the problem with this code:
#include<iostream.h>
void main(void)
{int a, b, c;
 c=0;

 cin>>a>>b;
 c=a+b;
 cout<<c;
}

I try to compiled it but appear an error saying:
Error C:\dm\include\iostream.h 9: Use C++ compiler for iostream.h  --- error
level 1




July 22, 2002
Make sure the source file as a .cpp extension.
Jan



Salvador Sosa Ruiz wrote:

> What´s the problem with this code:
> #include<iostream.h>
> void main(void)
> {int a, b, c;
>  c=0;
>
>  cin>>a>>b;
>  c=a+b;
>  cout<<c;
> }
>
> I try to compiled it but appear an error saying:
> Error C:\dm\include\iostream.h 9: Use C++ compiler for iostream.h  --- error
> level 1