Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > Convert Double ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 44188 of 47449
Post > Topic >>

Convert Double to string issues

by yogi_bear_79 <yogi_bear_79@[EMAIL PROTECTED] > Mar 28, 2008 at 07:08 PM

I have a double of unknown length that I need to split at the
decimal.  I thought I would convert it either to a string or a char.
char seems to be the best since it easily lends itself to splitting.
I have a few issues with this theory.  Hard codeing char M[6] works
fine for my test double -0.5  But I would like it to be more
versitile.  The format "%2.2f" works fine with my test data, but that
should also be versitile.


inline void LineSegment::perpBisect(const double m, const Point p)
char M[6] ;
sprintf(M,"%2.2f",m);
 




 3 Posts in Topic:
Convert Double to string issues
yogi_bear_79 <yogi_bea  2008-03-28 19:08:52 
Re: Convert Double to string issues
kasthurirangan.balaji@[EM  2008-03-28 20:08:44 
Re: Convert Double to string issues
"Jim Langston"   2008-03-29 01:20:18 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Aug 27 18:10:44 CDT 2008.