cover a double x to char ???
-
doubles typically don't fit in one char, however you can easily convert them to string. that is so basic, is this your first day at programming? I hope you are wise enough to learn from a book, study it from front to where ever you get, and look at examples and exercises. The exact answer depends on the language you use, which you did not specify. in good old C you could do it with an sprintf() or swprintf() Here[^] is one page of doc, even wikipedia knows how! Please make Google your daily friend. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
modified on Friday, December 11, 2009 2:51 PM
-
doubles typically don't fit in one char, however you can easily convert them to string. that is so basic, is this your first day at programming? I hope you are wise enough to learn from a book, study it from front to where ever you get, and look at examples and exercises. The exact answer depends on the language you use, which you did not specify. in good old C you could do it with an sprintf() or swprintf() Here[^] is one page of doc, even wikipedia knows how! Please make Google your daily friend. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
modified on Friday, December 11, 2009 2:51 PM
Sorry to say, I think you misunderstood the OP request: he wants to cover the
double
with achar
. This is usually possible, provided thechar
is by repeated as needed. For instance consider thedouble
0.75
: if you repeat the char'*'
four times over it, then you obtain a very good _cover_age. :-DIf the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Sorry to say, I think you misunderstood the OP request: he wants to cover the
double
with achar
. This is usually possible, provided thechar
is by repeated as needed. For instance consider thedouble
0.75
: if you repeat the char'*'
four times over it, then you obtain a very good _cover_age. :-DIf the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]No problem, Microsoft invented a class[^] for that very purpose. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
-
No problem, Microsoft invented a class[^] for that very purpose. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Nah, (Heretic!) that's for managed development. Furthermore, as usual, they didn't invent it, just stolen it from Java... :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]