www.digitalmars.com         C & C++   DMDScript  

c++ - HELP!!!!

reply "Salvador Sosa Ruiz" <salvadorsosa tutopia.com> writes:
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
Jul 21 2002
parent Jan Knepper <jan smartsoft.cc> writes:
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
Jul 21 2002