<iostream.h>

hi everybody, i need help with this problem i tried to made a calculator in c++ for my programation class and i did it well all the way but at the final when you press f7 to see your errors it apears this

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

here is my project for any dobuts

#include<iostream.h>
void main (){
int x,y,sum,rest,mult,div;

cout<<"enter first number";
cin>>x;
cout<<"enter second number";
cin>>y;
sum=x+y;
rest=x-y;
mult=x*y;
div=x/y;
cout<<"the sumatory is:"<<sum<<endl;
cout<<"the difference is:"<< rest<<endl;
cout<<"the product is:"<<mult<<endl;
cout<<"the division is:"<< div<<endl;
}

i've got the visual c++ express edition 2010

thx afterwards :)
#include <iostream> no .h
Last edited on
void main (){ is incorrect. C++ uses
int main (){

You've not stated a namespace either.

using namespace std;

Throw away whatever gave you this code. It's pre-standard C++ from over a decade ago.
@clanmjc i've already tried without <.h> but only gave me more errors
@moschops ok, thx i will try to do it like you say.
thx.
well it seems to be ok but when i start debugging and i enter the second number it apears this :c

'esd.exe': Loaded 'C:\Users\Lawrence\Documents\Visual Studio 2010\Projects\esd\Debug\esd.exe', Symbols loaded.
'esd.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'esd.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'esd.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'esd.exe': Loaded 'C:\Windows\SysWOW64\msvcp100d.dll', Symbols loaded.
'esd.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded.
The program '[1732] esd.exe: Native' has exited with code 0 (0x0).
Topic archived. No new replies allowed.