Sponsored Content
Top Forums Programming Problem with STL's std::set container parameter to the operator << () Post 302622645 by Corona688 on Thursday 12th of April 2012 11:43:30 AM
Old 04-12-2012
I'd also refactor your loop a bit:

Code:
while(itr != s.end())
{
        os << (*itr) << " ";
        itr++;
}

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

DEBUG_PROG and opts: parameter not set

I am using a Sun Ultra 30 with 250MG of RAM and 9GIG of hard drive. I connect to the machine via Exceed 6 and have the Oracle8i for Solaris in the cdrom drive. I have read and complied with Oracle's instruction in preparation to installing Oracle. Since I don't have enough space to cp the content... (1 Reply)
Discussion started by: Alexxx14
1 Replies

2. Shell Programming and Scripting

ksh: dbfFILe: parameter not set

Having the following message returned: FIND REDLOG FILES..... ksh: dbfFILe: parameter not set When I attempt to perform the script below....#!/bin/ksh . $HOME/.profile # Initial Script Prerequisites ORACLE_SID=MDirect ; export ORACLE_SID REDOLOGDIR=$ARCLOGDEST ; export REDOLOGDIR... (2 Replies)
Discussion started by: Cameron
2 Replies

3. Shell Programming and Scripting

How to redirect std out and std err to same file

Hi I want both standard output and standard error of my command cmd to go to the same file log.txt. please let me know the best commandline to do this. Thanks (2 Replies)
Discussion started by: 0ktalmagik
2 Replies

4. Programming

Sun Studio C++ - Getting error in linking std::ostream &std::ostream::operator<<(std:

Hello all Im using CC: Sun C++ 5.6 2004/07/15 and using the -library=stlport4 when linkning im getting The fallowing error : Undefined first referenced symbol in file std::ostream &std::ostream::operator<<(std::ios_base&(*)(std::ios_base&))... (0 Replies)
Discussion started by: umen
0 Replies

5. Shell Programming and Scripting

reading from within the loop --std i/p problem

i have a teat file having data like one 12/3 two 23/09 three 12/12 now from another script i want to read one line at a time ,cut field one and two in two separate variable ,compare field1 with another variable but outside the loop .If i found a match i want to take from user the value... (2 Replies)
Discussion started by: mobydick
2 Replies

6. UNIX and Linux Applications

set mysql password with host parameter

hi, linux gurus... i'm trying to write a script in ksh called ResetPass that allows a user to change mysql passwords. the script accepts user, password and host like this: ResetPass <user> <password> <host>. here's the code: ***************************************************** mysql... (1 Reply)
Discussion started by: ankimo
1 Replies

7. Solaris

Problem creating sol8 container using seperate / /usr and /var ufsdumps

Hello experts New to solaris 8 containers and zones in general and I'm having some problems creating a Solaris 8 container using ufsdumps of /, /usr and /var. I have created the zone which worked fine and a running the following command. zoneadm -z zone_s8 install -v -p -a /root.ufs ... (2 Replies)
Discussion started by: BrokeIt
2 Replies

8. Programming

how to check the value in stl container during debug

Hi, guys. I am working on a project right now. But when I debug my code, I can't see the values in stl container, e.g vector, map. Can anyone help me, please. I am really frustrated:wall:. I am using code::blocks IDE, by the way. Thanks in advance...... (0 Replies)
Discussion started by: tefino
0 Replies

9. Shell Programming and Scripting

Dot operator and space, Parameter not set

Hi, i have this script setenv.sh if then echo "is empty" fi echo "done" The following is the result when i run the script from command without and with a dot and space operator $ setenv.sh is empty done $ . setenv.sh sh: VAR_1: Parameter not set. $ It's our standard to run... (5 Replies)
Discussion started by: ysrini
5 Replies

10. Shell Programming and Scripting

Can't set parameter to lynx properly

My intention is to go through list of addresses and call google geocode api for each of them. I am using lynx for this, but somehow I can't supply the parameters to it in a proper way. To show that my parameters are OK I just hardcoded one address in my script and put it in my input file, and... (2 Replies)
Discussion started by: migurus
2 Replies
std::insert_iterator< _Container >(3cxx)								  std::insert_iterator< _Container >(3cxx)

NAME
std::insert_iterator< _Container > - SYNOPSIS
Inherits std::iterator< output_iterator_tag, void, void, void, void >. Public Types typedef _Container container_type typedef void difference_type typedef output_iterator_tag iterator_category typedef void pointer typedef void reference typedef void value_type Public Member Functions insert_iterator (_Container &__x, typename _Container::iterator __i) insert_iterator & operator* () insert_iterator & operator++ () insert_iterator & operator++ (int) insert_iterator & operator= (const typename _Container::value_type &__value) insert_iterator & operator= (typename _Container::value_type &&__value) Protected Attributes _Container * container _Container::iterator iter Detailed Description template<typename _Container>class std::insert_iterator< _Container > Turns assignment into insertion. These are output iterators, constructed from a container-of-T. Assigning a T to the iterator inserts it in the container at the iterator's position, rather than overwriting the value at that position. (Sequences will actually insert a copy of the value before the iterator's position.) Tip: Using the inserter function to create these iterators can save typing. Definition at line 581 of file stl_iterator.h. Member Typedef Documentation template<typename _Container> typedef _Container std::insert_iterator< _Container >::container_type A nested typedef for the type of whatever container you used. Definition at line 590 of file stl_iterator.h. typedef void std::iterator< output_iterator_tag , void , void , void , void >::difference_type [inherited] Distance between iterators is represented as this type. Definition at line 126 of file stl_iterator_base_types.h. typedef output_iterator_tag std::iterator< output_iterator_tag , void , void , void , void >::iterator_category [inherited] One of the tag types. Definition at line 122 of file stl_iterator_base_types.h. typedef void std::iterator< output_iterator_tag , void , void , void , void >::pointer [inherited] This type represents a pointer-to-value_type. Definition at line 128 of file stl_iterator_base_types.h. typedef void std::iterator< output_iterator_tag , void , void , void , void >::reference [inherited] This type represents a reference-to-value_type. Definition at line 130 of file stl_iterator_base_types.h. typedef void std::iterator< output_iterator_tag , void , void , void , void >::value_type [inherited] The type 'pointed to' by the iterator. Definition at line 124 of file stl_iterator_base_types.h. Constructor &; Destructor Documentation template<typename _Container> std::insert_iterator< _Container >::insert_iterator (_Container &__x, typename _Container::iterator__i) [inline] The only way to create this iterator is with a container and an initial position (a normal iterator into the container). Definition at line 596 of file stl_iterator.h. Member Function Documentation template<typename _Container> insert_iterator& std::insert_iterator< _Container >::operator* () [inline] Simply returns *this. Definition at line 650 of file stl_iterator.h. template<typename _Container> insert_iterator& std::insert_iterator< _Container >::operator++ () [inline] Simply returns *this. (This iterator does not move.) Definition at line 655 of file stl_iterator.h. template<typename _Container> insert_iterator& std::insert_iterator< _Container >::operator++ (int) [inline] Simply returns *this. (This iterator does not move.) Definition at line 660 of file stl_iterator.h. template<typename _Container> insert_iterator& std::insert_iterator< _Container >::operator= (const typename _Container::value_type &__value) [inline] Parameters: value An instance of whatever type container_type::const_reference is; presumably a reference-to-const T for container<T>. Returns: This iterator, for chained operations. This kind of iterator maintains its own position in the container. Assigning a value to the iterator will insert the value into the container at the place before the iterator. The position is maintained such that subsequent assignments will insert values immediately after one another. For example, // vector v contains A and Z insert_iterator i (v, ++v.begin()); i = 1; i = 2; i = 3; // vector v contains A, 1, 2, 3, and Z Definition at line 632 of file stl_iterator.h. Author Generated automatically by Doxygen for libstdc++ from the source code. libstdc++ Tue Nov 27 2012 std::insert_iterator< _Container >(3cxx)
All times are GMT -4. The time now is 09:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy