473,756 Members | 9,334 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to get rid of the fatal error about iostream

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:
c:\project\cons ole\console\con sole.cpp(11): fatal error C1083: Cannot open
include file: 'iostream.h': No such file or directory

By the way, I want to compile the MS's program: ADOXCreateDatab aseX.cpp
about ADO.

The .net always told me:
c:\project\cons ole\console\Deb ug\msado15.tlh( 2374) : error C2059: syntax
error : '-'
c:\project\cons ole\console\Deb ug\msado15.tlh( 2374) : error C2238: unexpected
token(s) preceding ';'
What wrong with .net, if using the VC6.0, there are no those problem.
Who can help me?

Thanks in advanced,

Bill
Nov 16 '05 #1
1 4534
Bill Sun wrote:
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:
c:\project\cons ole\console\con sole.cpp(11): fatal error C1083: Cannot
open include file: 'iostream.h': No such file or directory

By the way, I want to compile the MS's program:
ADOXCreateDatab aseX.cpp about ADO.

The .net always told me:
c:\project\cons ole\console\Deb ug\msado15.tlh( 2374) : error C2059:
syntax error : '-'
c:\project\cons ole\console\Deb ug\msado15.tlh( 2374) : error C2238:
unexpected token(s) preceding ';'
What wrong with .net, if using the VC6.0, there are no those problem.
Who can help me?


You need to use <iostream> (no .h).

Background: VC has supported two different versions of IOStreams for
several years. "Classic IOStreams", as implemented in <iostream.h> (etc),
and "Standard IOStreams", as implemented in <iostream> (etc). Note the lack
of the .h in the standard iostreams header file names.

VC7.0 deprecated the "classic IOStreams" and VC7.1 dropped support for
"classic IOstreams" altogether.

Frequently it's as simple as replacing #include <iostream.h> with #include
<iostream> and adding a 'using namespace std;', but depending on exactly
what you're doing with streams, more work may be necessary.

Check any up to date C++ programming book for basics of Standard IOStreams
programming (e.g. "Accelerate d C++" by Andrew Koenig and Barbara Moo). If
you need the ultimate reference, look for "Standard C++ IOStreams and
Locales" by Angelika Langer & Klaus Kreft.

-cd
Nov 16 '05 #2

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

Similar topics

8
9996
by: Tim Tyler | last post by:
I'm getting fatal errors when executing code - and my error handler is failing to trap them - so I get no stack backtrace :-( The error I am getting is: "Fatal error: Call to a member function fetchRow() on a non-object." What are the available options here? Am I supposed to check I have a real object whenever I perform
1
2877
by: Steve | last post by:
I installed Visual Studio .NET from a developers pack, and when I try to compile anything in C++ it gives me the error "Fatal error: C1083" saying the file is not there. The file I am calling is the iostream.h file. I was told to reinstall .NET and make sure some check boxes are checked in the installation options. They are all the way they should be, but I still get the error.
1
5892
by: Tim | last post by:
I am just creating a hellow world program and it gave me these errors. can you help me out how to resolve this? Thanks, Tim #include <iostream> using namespace std;
0
1719
by: JimmyS | last post by:
I am getting this error .. c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\stl_alloc.h(305) : fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 2701) when including any files for templates .. #include <fstream> , #include <string>, #include <vector>, #include <list> etc... The funny thing is that was not happening before, it really used to work fine with templates. By removing the STL include...
2
2953
by: Itjalve | last post by:
This gives me a fatal error. I'm using .NET VC7.1 and made a win32 consol app, I have no problems with VC6. Debug build. I have removed nearly all my code this is whats left. From the beginning the template was defined in a .h file, but that has no effect, same error. I have seen when searching for fatal error that there are some problems with templates and optimization, but nothing as simple like this. I'm i doing something wrong?
6
5206
by: Steve Crawford | last post by:
I've started seeing the following in my logs: FATAL: invalid frontend message type 8 I searched back over a month and there are 5 instances of this error of which 4 are in the last 24 hours. I could not find this error defined. Any ideas of what it means, it's severity, how to track the cause and cure? Cheers,
10
9003
by: LZXIA | last post by:
Compiling... overlaod.cpp d:\vc work\cpp\think_in_cpp\chapter10\overlaod.cpp(17) : fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 1786) Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information Error executing cl.exe.
2
2499
by: jsl | last post by:
i have converted my project from vc++ 6.0 to visual studio 2005, then the "fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory" is coming... what can i use in visual studio instead of 'iostream.h'
2
1453
by: ichabod079 | last post by:
I'm new to C++ and I am struggling with the whole separate function thing and I am so frustrated right now it's not even funny. What i'm supposed to do is this code and I ask for the 1st number and the 2nd number and then output the quotient and remainder. So I did the code and I fixed most of the errors and now I have 2 errors that say: 1>C:\Users\Rebecca Vance\Documents\Visual Studio 2005\Projects\HW_3b\Debug\HW_3b.exe : fatal error...
0
9303
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9894
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9679
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9676
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9541
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8542
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3141
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2508
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.