Problem with namespaces


 
Thread Tools Search this Thread
Operating Systems AIX Problem with namespaces
# 1  
Old 10-27-2005
Question Problem with namespaces

Hello all,

I am having a problem with the following program on AIX:-

// Namespace.cxx
#include <iostream>
using namespace std;
#include <iostream.h>
int main()
{
// cout<<"Hello world";
return 0;
}

On compilation:-
$ xlC Namespace.cxx
"/usr/vacpp/include/iostream.h", line 114.38: 1540-0063 (S) The text "*" is unexpected.
"/usr/vacpp/include/iostream.h", line 300.25: 1540-0040 (S) The text "seekoff" is unexpected. "streampos" may be undeclared or ambiguous.
"/usr/vacpp/include/iostream.h", line 443.32: 1540-0600 (S) The reference to "ios" is ambiguous.
"/usr/vacpp/include/iostream.h", line 78.7: 1540-0425 (I) "ios" is defined on line 78 of "/usr/vacpp/include/iostream.h".
"/usr/vacpp/include/iosfwd", line 330.45: 1540-0425 (I) "std::ios" is defined on line 330 of "/usr/vacpp/include/iosfwd".

Can anyone explain the reason for these strange looking errors? Please try out the different combinations of first 3 lines of the program and commenting and un-commenting the cout line in the main().

Regards,
Gupta
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. IP Networking

Router problem or ISP problem ?

Hi everyone, I am experiencing discontinuity of Internet service, this started 1 month ago. Everything worked very well for 1 year of intensive use, but now, I have problems reaching my gateway. The gateway is not my router but a node belonging to my ISP and I share the same public IP with... (3 Replies)
Discussion started by: remic
3 Replies

2. UNIX for Dummies Questions & Answers

sed Or Grep Problem OR Terminal Problem?

I don't know if you guys get this problem sometimes at Terminal but I had been having this problem since yesterday :( Maybe I overdid the Terminal. Even the codes that used to work doesn't work anymore. Here is what 's happening: * I wanted to remove lines containing digits so I used this... (25 Replies)
Discussion started by: Nexeu
25 Replies

3. IP Networking

Problem with forwarding emails (SPF problem)

Hi, This is rather a question from a "user" than from a sys admin, but I think this forum is apropriate for the question. I have an adress with automatic email forwarding and for some senders (two hietherto), emails are bouncing. This has really created a lot of problems those two time so I... (0 Replies)
Discussion started by: carwe
0 Replies

4. AIX

AIX OS problem? network problem?

Dear ALL. I installed AIX OS on customer sites. but Only one site is too slow when I connected telnet, ftp.. Ping is too fast. but telnet and FTP is not connected.. of course i check the configuration file on aix but it's normal. Do any Idea?? thanks in advance. - Jun - (3 Replies)
Discussion started by: Jeon Jun Seok
3 Replies

5. UNIX for Dummies Questions & Answers

DHCP problem and eth1 problem

At work I am trying to get this one Linux machine (let's call it ctesgm07) to behave like another Linux machine that we have (let's call it test007). test007 returns the following version info: cat /etc/debian_version: lenny/sid uname -a: Linux test007 2.6.27-7-generic #1 SMP Tue Nov 4... (0 Replies)
Discussion started by: sllinux
0 Replies

6. AIX

user login problem & Files listing problem.

1) when user login to the server the session got colosed. How will resolve? 2) While firing the command ls -l we are not able to see the any files in the director. but over all view the file system using the command df -g it is showing 91% used. what will be the problem? Thanks in advance. (1 Reply)
Discussion started by: pernasivam
1 Replies

7. Solaris

problem in finding a hardware problem

Hi I am right now facing a strange hardware problem. System get booted with the following error: Fatal Error Reset CPU 0000.0000.0000.0003 AFSR 0100.0000.0000.0000 SCE AFAR 0000.07c6.0000.1000 SC Alert: Host System has Reset It happen 4 or 5 times and get the same error every time.I... (8 Replies)
Discussion started by: girish.batra
8 Replies

8. Programming

Compilation error on namespaces in system header debug.h

Hi, I'm porting code from Windows to HP-UX 11, compiling with g++. I'm getting a compilation error on the system's debug.h include file, which is included very indirectly through a series of other system include files. The one I am including is <map> . The errors I am getting are:... (4 Replies)
Discussion started by: rimon
4 Replies

9. Shell Programming and Scripting

problem with dd command or maybe AFS problem

Hi, folks. Sorry for bothering, but maybe someone could help me please. The problem is the following: there is some script that copies files from local file system to AFS. The copying is performed with dd command. The script copies data into some AFS volumes. The problem appeared with one... (0 Replies)
Discussion started by: Anta
0 Replies

10. UNIX for Advanced & Expert Users

SSH Problem auth problem

Hi, Just recently we seem to be getting the following error message relating to SSH when we run the UNIX script in background mode: warning: You have no controlling tty. Cannot read confirmation.^M warning: Authentication failed.^M Disconnected; key exchange or algorithm negotiation... (1 Reply)
Discussion started by: budrito
1 Replies
Login or Register to Ask a Question
FBB::Hostname(3bobcat)						     Host Info						    FBB::Hostname(3bobcat)

NAME
FBB::Hostname - Contains name/address info about a host SYNOPSIS
#include <bobcat/hostname> Linking option: -lbobcat DESCRIPTION
FBB::Hostname objects inherit from Hostent, and offers information about a host, like Hostent. Apart from being initialized by a hostname or host address, they can also be initialized by a FBB::InetAddress object. Most of the functionality of an FBB::Hostname object is avail- able through its parent-class FBB::Hostent. NAMESPACE
FBB All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB. INHERITS FROM
FBB::Hostent CONSTRUCTORS
o Hostname(): The default constructor initializes an empty FBB::Hostname object. o Hostname((std::string const &host)): This constructor initializes an FBB::Hostname object from a string representing the name or dotted decimal address of a host. An FBB::Errno object is thrown if the hostname information could not be retrieved. o Hostname(InetAddress const &inetAddress): This constructor initializes an FBB::Hostname object from an InetAddress object. An FBB::Errno object is thrown if the hostname information could not be retrieved. The copy constructor is available. MEMBER FUNCTIONS
All members of FBB::Hostent are available, as FBB::Hostname inherits from this class. There are no additional members. EXAMPLE
#include <iostream> #include <bobcat/hostname> #include <bobcat/errno> using namespace std; using namespace FBB; int main(int argc, char **argv) { while (true) { cout << "Enter name or address: "; string str; if (!getline(cin, str)) return 0; if (str == "") break; try { Hostname h(str); cout << "Official name: "; cout << h.hostname() << endl; cout << "Aliases: "; for (size_t idx = 0; idx < h.nAliases(); idx++) cout << h.alias(idx) << " "; cout << endl; cout << "Adresses: "; for (size_t idx = 0; idx < h.nAddresses(); idx++) cout << h.dottedDecimalAddress(idx) << " "; cout << endl; } catch (Errno const &err) { cout << err.why() << endl; } } return 0; } FILES
bobcat/hostname - defines the class interface SEE ALSO
bobcat(7), hostent(3bobcat) BUGS
None Reported. DISTRIBUTION FILES
o bobcat_3.01.00-x.dsc: detached signature; o bobcat_3.01.00-x.tar.gz: source archive; o bobcat_3.01.00-x_i386.changes: change log; o libbobcat1_3.01.00-x_*.deb: debian package holding the libraries; o libbobcat1-dev_3.01.00-x_*.deb: debian package holding the libraries, headers and manual pages; o http://sourceforge.net/projects/bobcat: public archive location; BOBCAT
Bobcat is an acronym of `Brokken's Own Base Classes And Templates'. COPYRIGHT
This is free software, distributed under the terms of the GNU General Public License (GPL). AUTHOR
Frank B. Brokken (f.b.brokken@rug.nl). libbobcat1-dev_3.01.00-x.tar.gz 2005-2012 FBB::Hostname(3bobcat)