here the output and my Compiler version, It is a basic example from Bjarne Stroustrups homepage,
morten@Westpark str42:~/Bjarne_Stroustr up/06_Chapter_06$ g++ dc_except.c
dc_except.c:197 :23: error: strstream.h: No such file or directory
g++ -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++ ,fortran,objc,o bj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --with-tune=i686 --enable-checking=releas e i486-linux-gnu
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
code from here
http://www.research.at t.com/~bs/dc_except.c
I can locate the missing file
locate strstream.h
/usr/include/g++-3/strstream.h
My problem is, that I don't understand the error,
is my compiler misconfigured?
All C++ code examples from Bjarne Stroustrups Homepage should never complain or issue any warning.
Do I need to include something, Please?
4 7295 sicarie 4,677
Recognized Expert Moderator Specialist
This may be a compiler issue - try moving the #include line to the top of the program with the others.
AdrianH 1,251
Recognized Expert Top Contributor
Interesting. I don't understand why they are using #include<strstr eam.h> instead of <strstream>. The include file with a .h is deprecated.
Adrian
#include <strstream> was put at the beginning.
//#include <strstream.h> just in front of main was commented out, after some try and error I found out that it is ok for the compiler to have tthe includes in the middle of the file. In some Microsoft source codes I have seen thet the includes were inserted at the end of the cpp sourcecode file, but that is more that strange.
That solved the problem, I still get noisy warnings,
g++ dc_except.c
In file included from /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/backward/strstream:51,
from dc_except.c:199 :
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/backward/backward_warnin g.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
I put the entire session up here.
http://pastebin.ca/613456
But the warning is a little bit misleading.
morten@Westpark str42:~/Bjarne_Stroustr up/06_Chapter_06$ locate strstream
/usr/include/c++/4.1.2/backward/strstream
/usr/include/g++-3/strstream
/usr/include/g++-3/strstream.h
I can use the example. What is the output of your locate strstream?
Do you also get strange warnings?
What's strstream??
Do you mean sstream ?? Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Bill Davy |
last post by:
sys.path:
H:\Husky\HostPC\V1\SHIP\Debug
H:\Husky\HostPC\V1\SHIP
E:\Bill\Python-2.4.1\PCbuild\python24_d.zip
C:\Python24\Lib
C:\Python24\DLLs
C:\Python24\Lib\lib-tk
H:\Husky\HostPC\V1\RunSHIP
H:\Husky\HostPC\V1\Debug
C:\Python24
|
by: TomB |
last post by:
I have a function on an "included" page.
For reasons unknown to me I frequently will get an error - to the effect
that the function can't be found.
If I hit refresh/F5 it loads the page just fine.
It doesn't happen often .. maybe once every 50 pages. It also doesn't
happen on any specific page.
|
by: amywolfie |
last post by:
I would like to put code behind a Find button on a form which:
1) Performs a find based on a field on the form
2) If NO RECORDS ARE FOUND, then displays a custom "No Records Found" message box.
Thanks!!
amy
===
|
by: Wilsoch |
last post by:
Long story short: My Access developer is letting me down. He doesn't
really know VB and he can't figure out how to do what I need.
Situation:
Access database that will be used locally on individual user's
machines.
What I need:
I need code to make Access look for a "security" file located on the
user's hard drive. If it finds the file, it allows the user to continue
|
by: NormD |
last post by:
We have a client-server app using Web Services on an IIS machine. The trace
below shows that .NET is searching around for some things (e.g.,
SystemDrawing.DLL and System.Drawing.EXE) and taking a LONG time to locate
them. Time after time. The application DOES run, so it is ultimately
finding what it needs.
How can we tell "it" where these are located (should we even have to?) so it
can look directly there instead of searching?
...
| |
by: mwt |
last post by:
Is there a function in python that does what "locate" does in a bash
shell?
I know I could do it by using os.popen('locate'), but I'm curious if
there's a Python "native" way to go about it. Only needs to work in
Unix, but would be interesting if it was cross-platform.
Thanks.
|
by: francescomoi |
last post by:
Hi.
Working with PHP 4.3.10 on Fedora Core 2.
I'm trying to execute phpize:
/usr/local/php/bin/phpize: line 57: aclocal: command not found
I've just installed:
automake17-1.7.9-2
autoconf-2.59-3
|
by: aarthi28 |
last post by:
Hi,
I have this code that I am trying to compile, but I am getting the
following errors
'CoInitializeSecurity': identifier not found
'EOAC_NONE' : undeclared identifier
I have pasted the code below
// Using_WMI1.cpp : Defines the entry point for the console
|
by: Thomas K. Nielsen |
last post by:
Hi I dynamically insert some stylesheets. I want them to be placed
before some javascript is executed. I know I can add an id to the
scripttag that I want the stylesheets to be insert above, but I then
have a problem with with backward compability(need to insert that id
to many pages) and I have a problem if my colleagues forget to add
that id to the script tag.
My question is can I locate a javascript funtion - ie I have a
initPage...
|
by: don |
last post by:
I was trying to compile a .c source file using bcc on my winxp system but
the only way this would work is if I put the stdio.h file in the same folder
as the source file, even though my include statement said this #include
<c:\myfiles\include which I thought would solve the "can't find error" I
was getting for my printf statements etc. etc.
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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...
|
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...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |