473,406 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

iostream.h

hi,

i have copied some c++ code from a book. here it is:

#include <iostream.h>
int Add (int x, int y)
{
cout << "In Add(), received " << x << " and " << y << "\n";
return (x+y);
}

int main()
{
cout << "I'm in main()!\n";
int a, b, c;
cout << "Enter 2 numbers: ";
cin >> a;
cin >> b
cout << "\nCalling Add()\n";
c=Add(a,b);
cout << "\nBack in main().\n";
cout << "c was set to " << c;
cout << "\nExciting\n\n";
return 0;
}

i keep getting an error, though: "fatal error C1083: Cannot open include
file "iostream.h". no such file ot directory exists"

what do i do to get rid of this error? do i set the using precompiled
headers property to use precomplied headers?
--
Alvo von Cossel I of Germany
Nov 17 '05 #1
2 1007
Throw away the book, and find a newer one.

#include <iostream>
using namespace std;

Nov 17 '05 #2
you should use "#include<iostream>" instead of "#include<iostream.h>", if
you use VS.NET. besides this, your project is very simple which means you
didn't use STL, MFC or .NET, so you can build up a empty project (under
..NET ) and add a .cpp file.
"Nemanja Trifunovic" <nt*********@hotmail.com> ????
news:11**********************@g14g2000cwa.googlegr oups.com...
Throw away the book, and find a newer one.

#include <iostream>
using namespace std;

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: John Tiger | last post by:
Can anybody have idea about the difference between #include <iostream.h> and #include <iostream>. Is later one valid statement on any compiler. I tried compiling on MSVC second statement give...
13
by: ncstate | last post by:
it seems when i try to compile this simple code I get an error message i believe is from g++ not finding the IOSTREAM header file. i found the header file in /usr/include/c++/3.2.2/ so that is why...
19
by: ernst.stiegler | last post by:
Hello, I just want to read a whole line from a console input. What I don't understand is that I always have to press ENTER twice in order to see the line I've entered. Here's my code : ...
1
by: Pradyot Dhulipala | last post by:
Hi, I am using ns2.26 with the Makefile using C++ compiler version c++ (GCC) 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk). When I use iostream.h in a simple program and compile with c++ everything works...
2
by: humble04 | last post by:
Hi, I am compiling a collection of C++ code. Most of them are using the new format #include <iostream>. I think all of them because I failed at finding out which header file uses the old format ...
7
by: S. Nurbe | last post by:
Hi, probably this is a common problem but I couldn't find yet a proper solution (and I hope there is one). I have two relative complex frameworks: one uses only iostream.h the other one only...
1
by: Shane Ragone | last post by:
What happened to iostream.h in VS .NET? Are we now to code: #include <iostream> instead of: #include <iostream.h> All my past code that used iostream.h will no longer
1
by: Bill Sun | last post by:
Hi, I just want to using a console application in the .net enviroment. Before the main(), I using the #include "iostream.h" but the .net tell me:...
1
by: Ly Hoang Hai | last post by:
Hi all, I have just port my C++ 6.0 project into C++ project of Visual Studio.NET. However, .NET tell me that it can not find iostream.h. Some search on the internet tell me that I should change...
2
by: NewToCPP | last post by:
I am having some trouble including "iostream" "fstream" to my code. I tried the following ways and base times it did not work. What is the problem? test.cc: ======= ..... #include...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.