473,386 Members | 1,785 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,386 software developers and data experts.

Trying to use iostream in an open source project

Hi,

I am trying to use C++ iostream in Darwin (apple opensource streaming
server) source code.
Here is what I did:
1. Add these in the file
#include <iostream>
using namespace std;

2. Add ' cout << "Hello world" << endl; ' in the code.

But the problem is I get these compile errors about 'new' and
'delete'. It seems like Darwin source overload "new" and "delete" but
iostream does not like it. Can you please tell me how to fix it?

.../CommonUtilitiesLib/MyAssert.h:34: warning: 'class AssertLogger' has
virtual functions but non-virtual destructor
.../CommonUtilitiesLib/SDPUtils.h: In member function 'Bool16
SDPContainer::HasLineType(char)':
.../CommonUtilitiesLib/SDPUtils.h:92: warning: array subscript has type
'char'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/new:
At global scope:
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/new:
84: error: declaration of 'void* operator new(size_t) throw
(std::bad_alloc)' throws different exceptions
.../CommonUtilitiesLib/OSMemory.h:139: error: from previous declaration
'void* operator new(size_t)'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/new:
85: error: declaration of 'void* operator new [](size_t) throw
(std::bad_alloc)' throws different exceptions
.../CommonUtilitiesLib/OSMemory.h:140: error: from previous declaration
'void* operator new [](size_t)'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/new:
86: error: declaration of 'void operator delete(void*) throw ()'
throws different exceptions
.../CommonUtilitiesLib/OSMemory.h:142: error: from previous declaration
'void operator delete(void*)'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/new:
87: error: declaration of 'void operator delete [](void*) throw ()'
throws different exceptions
.../CommonUtilitiesLib/OSMemory.h:143: error: from previous declaration
'void operator delete [](void*)'
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/new:
In function 'void* operator new(size_t, void*)':
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/new:
94: error: redefinition of 'void* operator new(size_t, void*)'
.../CommonUtilitiesLib/OSMemory.h:125: error: 'void* operator
new(size_t, void*)' previously defined here

May 17 '07 #1
0 1385

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

Similar topics

1
by: user mysql | last post by:
HELLO FRIENDS. HERE A FANTASTIC NEWS FOR MYSQL WINDOWS USER. READE THIS. The article is grab from www/internetnews/com/ DO YOU THINK THAT IS A GOOD NEWS ? ...
188
by: Ilias Lazaridis | last post by:
I'm a newcomer to python: - E01: The Java Failure - May Python Helps? http://groups-beta.google.com/group/comp.lang.python/msg/75f0c5c35374f553 - I've download (as suggested) the python...
8
by: Rich Grise | last post by:
I think I've finally found a tutorial that can get me started: http://www.zib.de/Visual/people/mueller/Course/Tutorial/tutorial.html and I've been lurking for awhile as well. What happened is,...
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:...
5
by: Kevin Buchan | last post by:
I came in today and tried to edit a project that I was working with, locally, at the tail end of last week. This web project was created, hosted, and only edited locally. I truly cannot...
0
by: publicityfoss | last post by:
Apologizes for multiple copies eventually received Documents on Migrations to Open Source available by the COSPA Consortium The COSPA consortium (Consortium for studying, evaluating, and...
158
by: Giovanni Bajo | last post by:
Hello, I just read this mail by Brett Cannon: http://mail.python.org/pipermail/python-dev/2006-October/069139.html where the "PSF infrastracture committee", after weeks of evaluation, recommends...
6
by: Meglio | last post by:
Looking for very strong PHP developer to participate in some open source project. Requirements: - Strong knowledge and good experience of PHP (especially ver. 5): OOP, Exception handling -...
0
by: Stephen Thomas | last post by:
Hi there I wonder if any one has encountered this problem or can suggest what is wrong. I am trying the a procedure from the msn site but get the following message: Error 1 The type or...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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,...

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.