|
by: Chris Mantoulidis |
last post by:
Hello all... I get an error message for the following program by the
compiler:
#include <iostream>
#include <string>
using namespace std;
ostream_iterator<string> oo(cout);
|
by: Fraser Ross |
last post by:
a std::ostream_iterator can be constructed from a ostream but not a fstream.
If the fstream is opened with the out mode how can I get a ostream_iterator?
I am not using a pointer to any base class.
Fraser.
|
by: Jeff |
last post by:
std::copy to std::ostream_iterator doesn't seem to
work with maps and pairs.
Shouldn't I expect something like this to work?
The G++ error message when USE_COPY_TO_PRINT is
defined as a non-zero number follows.
---------------- error message --------------------
|
by: Wiseguy |
last post by:
consider the following:
ostream_iterator<int> i(cout,"");
cout << setw(3);
copy(int_list.begin(),int_list.end(),i);
the problem is that the field width restriction is only active for the first
element of int_list. after the first element is copied to cout the stream
setw(3) no longer has any affect.
|
by: Nan Li |
last post by:
Hello,
Can any one get the 'copy' statement below to work? I want it to
do the same thing as the 'for' loop does. But I got a lot of STL error
during compile.
Thanks,
Nan
#include <map>
|
|
by: alzforu |
last post by:
The code in which i m facing the problem is:
//file stream.cc
#include <vector>
#include <algorithm>
#include <iostream>
using namespace std;
|
by: Evyn |
last post by:
Hi,
Can someone tell me why I always get an error like "`ostream_iterator'
undeclared (first use this function) " when using ostream_iterator. I
have for example tried the following code taken from
http://www.camtp.uni-mb.si/books/Thinking-in-C++/Chapter04.html :
//: C04:Intset.cpp
// Simple use of STL set
#include <set>
|
by: krzysztof.konopko |
last post by:
I cannot compile the code which defines a std::map type consisting of
built in types and operator<< overload for std::map::value_type.
See the code below - I attach a full example.
Note: if I define map type with my new type (structure) everything is
OK. All compileres I've cheked report an error so I think it is a
problem with my code.
#include <algorithm>
#include <cstddef>
|
by: subramanian100in |
last post by:
Consider the following piece of code:
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <utility>
#include <iterator>
#include <algorithm>
int main()
|
by: ShaunJ |
last post by:
I'm trying to use an ostream_iterator to iterate over a set of pairs.
I've used an ostream_iterator over other types and had no problem.
However, with the following code snippet, I'm getting a compiler
error, and I'm stymied as to why. It's seems to be related to the
string type, because iterating over pairs of other types has worked
fine for me. The (rather verbose) error is:
/usr/include/c++/4.2/bits/stream_iterator.h:196: error: no...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|