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

strstream not found

#include <iostream>
#include <string>
#include <vector>
#include <strstream>
using namespace std;

At line 4, i am geeting error

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.

and please explanin what this line means in code

<!--[if !supportEmptyParas]--> <!--[endif]-->

With Regards
Parhiyar
Jan 5 '08 #1
5 2393
weaknessforcats
9,208 Expert Mod 8TB
strstream is deprecated.

You should be using sstream instead.

<!--[if !supportEmptyParas]--> <!--[endif]-->
Let's see the entire line of code and maybe a line or two abiove and below.
Jan 5 '08 #2
I have replaced strstream with sstream but now got only one error in the following loop:

int search_count = 0;
for (int i=0; i<100000; i++) {
sstream stm;
stm << i;
stm >> search_vect[search_count++];
}

Error: sstream undeclared (First use this function)
(Each undeclared identifier is reported only once for each function it appears in)
Jan 6 '08 #3
oler1s
671 Expert 512MB
I have replaced strstream with sstream
Why? Where did you get the idea of sstream? Do you even look at documentation?

It's stringstream. Seriously, read documentation. Don't complain when your guesses fail miserably.
Jan 6 '08 #4
i am doing simulation in NS2 for sensor networks , for query processing i have to implement B-tree

I just copy B-tree code from wiki pedia

but i am getting error in this loop right at the end of 1500 lines codes, so i am completly confuse what to do, i have searched through Documentation and found some information but unable to fix it
Jan 7 '08 #5
weaknessforcats
9,208 Expert Mod 8TB
Did you #include <sstream> ??

Better read up on stringstream.
Jan 7 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Bpb | last post by:
I'm trying to use a string stored in a strstream object as the filename parameter in the open call on an fstream object.. It requires a const char* but no matter what I try I can't seem to get a...
4
by: vishnu mahendra | last post by:
Can anyone please tell me what is the use of "strstream.h" header file and the functions in "strstream.h". where can i find documentation for that header file. thankyou in advance, vishnu.
6
by: vishnu mahendra | last post by:
hello to all, #include<iostream.h> #include<conio.h> #include <strstream.h> void main() { clrscr(); strstream str; char *a = new char; int i;
2
by: derek | last post by:
Hi, I'm trying to compile someone's code which uses ostrstream. I know it's declared in file strstream, but I can't find this file in the /usr/include/c++/3.3.3 directory. There is a file called...
2
by: b83503104 | last post by:
Hi, An old code is using stuff like #include <strstream.h> ostrstream *m_actionStream; and the compiler complained syntax error before `*' token I followed some previous posts and tried...
10
by: Aaron Gray | last post by:
Hi, I have an application that uses 'strstream' in just under half its .cc files, about 10 files. What is the replacement for 'strstream' ? What are my options for replacing it ? Many...
8
by: berkay | last post by:
hi all,i need this header file can anyone send it.thanks all.
5
by: nithya4u | last post by:
I am working on a c++ module, where large amount of data needs to be written to a stream and str() method is been used to assign the value of this to the char*. This produces the intended result....
4
by: morten44 | last post by:
here the output and my Compiler version, It is a basic example from Bjarne Stroustrups homepage, morten@Westparkstr42:~/Bjarne_Stroustrup/06_Chapter_06$ g++ dc_except.c...
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
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...
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
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
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,...
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...

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.