data.hpp File Reference

#include <algorithm>
#include <iostream>
#include <iterator>
#include <ostream>
#include <vector>

Go to the source code of this file.

Typedefs

typedef std::vector
< int > 
intvector
 Convenient shorthand for a vector of integers.
typedef
intvector::iterator 
intvec_iterator
 Convenient shorthand for an intvector’s iterator.

Functions

template<class Container>
void read_data (Container &data)
template<class Container>
void write_data (Container const &data)


Detailed Description

Definition in file data.hpp.


Typedef Documentation

typedef std::vector<int> intvector

Convenient shorthand for a vector of integers.

Listing 41-2. The data.hpp file to support integer data

Definition at line 13 of file data.hpp.


Function Documentation

template<class Container>
void read_data ( Container &  data  )  [inline]

Read a series of values from the standard input into data, overwriting data in the process.

Parameters:
[in,out] data a sequence container of values

Definition at line 22 of file data.hpp.

template<class Container>
void write_data ( Container const &  data  )  [inline]

Write a container of values to the standard output. Write all values on one line, separated by single space characters, and surrounded by curly braces, e.g., { 1 2 3 }.

Parameters:
[in] data a container of values

Definition at line 34 of file data.hpp.


Generated on Sun Nov 30 09:53:23 2008 for Exploring C++ - Final Forms of Key Examples by  doxygen 1.5.3