View Single Post
Old 10-12-2007, 11:38 PM   #1 (permalink)
Mike9182
 
Super Techie

Join Date: Sep 2006

Location: Altoona, PA

Posts: 253

Mike9182 is on a distinguished road

Send a message via AIM to Mike9182
Default What's wrong in this C++ code

///
/// Program to convert temperature from Celsius degree
/// units into Fahrenheit degree units:
/// Fahrenheit = Celsius * (212 - 32)/100 + 32
///
#include <iostream.h>
#include <stdio.h>

int main(int nNumberofArgs, char* pszArgs[])
{
/// enter the temperature in Celsius
int celsius;
cout << "Enter the temperature in Celsius:";
cin >> celsius ;

/// calculate conversion factor for Celsius:";
/// to Fahrenheit
int factor;
factor = 212 - 32;

/// user conversion factor to convert Celsius
/// into Fahrenheit values
int fahrenheit;
fahrenheit = factor * celsius/100 + 32;

/// output the results
cout << "Fahrenheit value is:";
cout << fahrenheit;

return 0;
}


1>------ Build started: Project: Conversion actual, Configuration: Debug Win32 ------
1>Compiling...
1>conversion.cpp
1>d:\documents and settings\mike\my documents\visual studio 2005\projects\conversion actual\conversion actual\conversion.cpp(6) : fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory
1>Build log was saved at "file://d:\Documents and Settings\Mike\My Documents\Visual Studio 2005\Projects\Conversion actual\Conversion actual\Debug\BuildLog.htm"
1>Conversion actual - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I have the include files in the header files folder in the project organizer, so what do I need to change?
__________________

My Comp:
Antec 900
Gigabyte DS3
EVGA 8800GTS (G92)
Antec TruPower 650 watt psu
Core 2 Duo E6700 @ 3.3Ghz
G.Skill 4GB DDR2-800
2 x Seagate Barracuda 250GB HDD in RAID 0
1 x Seagate Barracuda 500GB HDD
ACER 19" 5ms monitor
ZALMAN CNPS9500 cpu fan/heatsink
Mike9182 is offline