Re: converting 1944 to '1','9','4','4'

From: Leor Zolman (leor_at_bdsoft.com)
Date: 04/14/04


Date: Wed, 14 Apr 2004 14:31:15 GMT

On Wed, 14 Apr 2004 14:17:32 GMT, Leor Zolman <leor@bdsoft.com> wrote:

>
>//
>// tostrtest.cpp: Test tostring.h library
>//
>
>#include "tostring.h"
>
>int main()

Sorry, forgot to put
        #include <iostream>
up there. It was compiling for /me/ due to the headers included by
tostring.h in the platform I happen to be using (Comeau), but was rather
(un-)lucky.

Also, as mentioned by others in the thread by now, boost's lexical_cast
facility exists for this type of thing. I just like to practice my template
writing ;-)
        -leor

-- 
Leor Zolman --- BD Software --- www.bdsoft.com
On-Site Training in C/C++, Java, Perl and Unix  
C++ users: download BD Software's free STL Error Message Decryptor at:
   www.bdsoft.com/tools/stlfilt.html


Relevant Pages

  • Re: !!, what is it?
    ... > Tim Woodall wrote: ... >>>I recall seeing some platform specific headers which went for the ... > 1s complement platform. ... > int bitfield could be treated as if it was an unsigned int ...
    (comp.lang.c)
  • Re: printf and stat problem
    ... that interfers with compiling with a standard C compiler on a platform other than yours. ... If buf.st_size is not an int, then you are calling printf incorrectly. ...
    (comp.lang.c)
  • Re: First C++ Project
    ... Neither of these two headers are part of standard C++. ... int main ... > draw line; ... it declares. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: thoughts for a C compiler
    ... I will be compiling at runtime (basically treating C like a ... Take the example of the glib I mentioned in the other msg. ... as for the scriptC interface, this is less clear as of yet. ... Headers can't really be auto translated, ...
    (comp.lang.misc)
  • Re: Moving from C++ to VC++
    ... If it is the longest integer. ... platform, I want the longest integer type ... Now /I/ would like to have 'int' being the ... Adhering to what computing standards' intention ...
    (microsoft.public.vc.language)