Main Page | Namespace List | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

itos.h File Reference


Detailed Description

Numbers to string conversion functions.

Definition in file itos.h.

#include <cassert>
#include <sstream>
#include <string>
#include <cstdio>

Include dependency graph for itos.h:

Include dependency graph

Go to the source code of this file.

Namespaces

namespace  cttl

Functions

CTTL_STD_STRING itos (int i_)
 Converts integer to string.


Function Documentation

CTTL_STD_STRING itos int  i_  ) 
 

Converts integer to string.

From Bjarne Stroustrup's C++ Style and Technique FAQ: http://www.research.att.com/~bs/bs_faq2.html

How do I convert an integer to a string? The simplest way is to use a stringstream:

        int i = 127;
        std::string ss = itos( i );

For a description of string streams, see 21.5.3 of The C++ Programming Language.

Definition at line 58 of file itos.h.


Generated on Thu Nov 2 17:43:46 2006 for CTTL Utility Classes and Functions by  doxygen 1.3.9.1