Haven't done C++ in along time but I just downloaded Visual C++ 2005, problem is my simple code is not compiling.
I keep getingCode://Program that adds two numbers #include "stdafx.h" #include "io.h" void main() { //Define variables float num1; float num2; float num3; cout << "Enter the first Number: "; cin >> num1; cout << "Enter the second Number: "; cin >> num2; num3 = num1 + num2; cout << "The sum of numbers is: " << num3; endl; }
error C2065: 'cout' : undeclared identifier
error C2065: 'cin' : undeclared identifier
error C2065: 'endl' : undeclared identifier
i first tried iostream.h, but it says it doesnt exist. Has C++ changed all this time I stopped? I thought iostream.h was the standard.


LinkBack URL
About LinkBacks
Reply With Quote
| Zalman CNPS 9500LED + Arctic Cooling MX-1 | Asus A8N-SLi Deluxe + Zalman Northbridge | 1024MB DDR RAM (2 x 512MB Corsair XMS Pro TwinX) | Leadtek nVidia 6600GT 128MB | Creative SoundBlaster X-Fi Xtreme Music | 2x80GB Hitachi Deskstar SATA-II (RAID 0) | Gigabyte 3D Aurora Case | Hiper Type-R 580W Modular | Enermax Ultimate Fan Controller| Microsoft Nautral 4000 | Logitech G5 + fUnc 1030| Ideazon Fang | SpeedLink Medusa 5.1 Surround Headset | Samsung SM913N 19" TFT | Compro DVB-T200
