473,405 Members | 2,210 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,405 software developers and data experts.

visual studio.net 2003 professional : problem with header

Hello,

I included the header "iostream"

Why is there only the possiblity of including
#include<iostream>? From Visual C++ 6 I know the iostream.h.
The name doesnt't really interest me. But it should work. The library
consists of the commands like "cout", "cin", ... But if I want to use
these commands I get an compiler error that they are unknown.

What's the problem? Do I miss something?

Thanks
Sarah
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 17 '05 #1
2 1072
There's a subtle difference.

"iostream.h" is the header file for the old Standard C++ Library. This file
is deprecated in Visual C++ .NET 2003. Instead, you must use "iostream"
header and specify the namespace "std" to access the good-old "cout", "cin"
etc functions. If you wish to know more of this behaviour, search MSDN with
string "iostream differences from Standard C++ Library"

There are two choices you can use. Which one you choose is a matter of
preference and taste. Naturally, it may be a matter of namespace clashing if
you have similarly named functions, objects or structures as the Standard
C++ Library.

Solution #1: The 'using namespace' keyword (generally safe)

#include <iostream>
using namespace std;

cout << "This will print a line of text" << endl;

----

Solution #2: Full namespace resolution (always safe, but bulkier)

#include <iostream>

std::cout << "This will print a line of text, too" << std::endl;

----

Hope this helps

-Antti Keskinen
"sg10241024" <sg********@hotmail-dot-com.no-spam.invalid> wrote in message
news:42********@127.0.0.1...
Hello,

I included the header "iostream"

Why is there only the possiblity of including
#include<iostream>? From Visual C++ 6 I know the iostream.h.
The name doesnt't really interest me. But it should work. The library
consists of the commands like "cout", "cin", ... But if I want to use
these commands I get an compiler error that they are unknown.

What's the problem? Do I miss something?

Thanks
Sarah
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Nov 17 '05 #2
sg10241024 wrote:
Hello,

I included the header "iostream"

Why is there only the possiblity of including
#include<iostream>? From Visual C++ 6 I know the iostream.h.

The official ISO C++ standard (ISO/IEC 14882:1998, and 2003) defines
<iostream>.
VC++ 6 was a pre-standard compiler. A nice book to get you up and
running with ISO C++, is "Accelerated C++" by Andrew Koenig, Barbara Moo:

http://www.acceleratedcpp.com

If you want to learn the entire language (which will take *years*), is
"The C++ Programming Language" 3rd Edition or Special Edition by Bjarne
Stroustrup, the creator of C++:

http://www.research.att.com/~bs/3rd.html




The name doesnt't really interest me. But it should work. The library
consists of the commands like "cout", "cin", ... But if I want to use
these commands I get an compiler error that they are unknown.

What's the problem? Do I miss something?

Thanks
Sarah

using namespace std;


--
Ioannis Vranos
Nov 17 '05 #3

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

Similar topics

6
by: Martin Bless | last post by:
The good news: Along with Python-2.4 comes really good news to Windows users. Yes, you now CAN build extension modules yourself using the SAME C++ compiler and linker Python is built with...
1
by: Corrie Meyer | last post by:
Announcement: SwiftReports standard edition 1.0 for Visual Studio ..NET 2003 released by UniSwift. We are pleased to announce the first release of a fully-managed reporting tool for the...
1
by: Daniel A. Thomas | last post by:
License required Maybe you don't have this but have one of the products that qualifies for the upgrade such as ... Visual Studio .NET 2003 Professional Visual Studio .NET 2003 Professional...
2
by: Herfried K. Wagner [MVP] | last post by:
Hello, There are often questions in this newsgroup posted by VS.NET 2002 users. VS.NET 2002 is "out of date", its successor is VS.NET 2003. There is a special ("cheap") upgrade offer available...
9
by: MFarmer | last post by:
I currently have VB6.0 and am looking to upgrade to VB.Net. My problem is I have the professional version and I cannot find where I can get the VB.Net professional upgrade without purchasing the...
1
by: Rossi | last post by:
I want to upgrade visual basic .net 2003 standar edition but there is no visual basic .net 2003 professional edition. Can I just buy the visual studio ..net 2003 professional UPGRADE version and...
6
by: JonSteng | last post by:
..Net Visual Studio Professional 2003 Version 7.1.3088 ..Net Framework 1.1 SP1 Version 1.1.4322 IIS 5.1 Windows XP Professional SP2 Micron T3000 Laptop (1.5 GHz; 1GB RAM; 40GB HD with 17GB Free)...
18
by: surfrat_ | last post by:
Hi, I am having the following problems in getting Microsoft Visual Studio 2005 Professional to link to an Access .mdb database. Please help me to sort this out. Problem 1: The Microsoft...
3
harshadd
by: harshadd | last post by:
Visual Studio .NET Professional 2003 Can any 1 give me details of "Visual Studio .NET Professional 2003" this products contents? I mean if I have purchased "Visual Studio .NET Professional 2003"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
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
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...
0
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...
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
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.