|
signature for atof is as follows:
double atof( const char *string );
My question is, what API can I use if I need "long double" precision?
thanx.
norm
|
|
|
|
|
istringstream::operator >> (long double &n) should do nicely.
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
but the code also invoked:
sqrt
fabs
...etc
any alternative?
norm
|
|
|
|
|
norm wrote:
any alternative?
You want functions operating on long doubles? While there are ones operating on long doubles (like sqrtl) in math.h, they are just casting parameters to double before performing calculations using plain, 'double' versions.
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
check this out:
http://www-ccs.ucsd.edu/c/math.html#ceil
i was looking at MSDN, i dont think it says abs() supports "long double"...?
norm
|
|
|
|
|
|
MSDN say to this:
Previous 16-bit versions of Microsoft C/C++ and Microsoft Visual C++ supported the long double, 80-bit precision data type. In Win32 programming, however, the long double data type maps to the double, 64-bit precision data type. The Microsoft run-time library provides long double versions of the math functions only for backward compatibility. The long double function prototypes are identical to the prototypes for their double counterparts, except that the long double data type replaces the double data type. The long double versions of these functions should not be used in new code.
int x=1, y=5;
x^=y^=x^=y;
<a href="http://www.codeproject.com/tips/StupidXORTrick.asp" target="_blank">ClickHereForHelp();</a>
|
|
|
|
|
Hello
I would like to automatically change the file version of my program (Console Application with MFC support), for example after linking.
Is it possible to do that automatically with Visual C++ 6.0.
Or do anyone has a tip for that.
Thanks
Alex
|
|
|
|
|
Look in the Macros section here at CP. If I remeber right there is at least one tool that does the trick.
int x=1, y=5;
x^=y^=x^=y;
<a href="http://www.codeproject.com/tips/StupidXORTrick.asp" target="_blank">ClickHereForHelp();</a>
|
|
|
|
|
There is an article somewhere on CP that does that. You can add it to the post-link section. I am looking for it now. If I find it, I will post again
modified 29-Aug-18 21:01pm.
|
|
|
|
|
http://www.codeproject.com/macro/incprivatebuild.asp
modified 29-Aug-18 21:01pm.
|
|
|
|
|
Hi Peeps,
I am trying to decipher displaying different character sets and so far not too bad. Set the Charset value in Logfont and there you go
I am a bit stumped over what Charset values to use for some of the ISO8859 Latin variations. Can anyone help?
Cheers,
Davy
www.latedecember.com
|
|
|
|
|
Maybe you find the answer here[^]
int x=1, y=5;
x^=y^=x^=y;
<a href="http://www.codeproject.com/tips/StupidXORTrick.asp" target="_blank">ClickHereForHelp();</a>
|
|
|
|
|
perhaps a stupid suggestion : if you are reading external data (from a file), would'nt it be possible that IDE put you in another directory ?
Juste pour faire avancer le Schmilblick!
|
|
|
|
|
Well, as it seems multilanguage resources used to work fine up to Windows NT 4.0. I've been testing this now extensively and results show:
NT4 - works like a charm and as documented/expected
W2k - nope
XP - nope too
W2k and XP have problems finding the resource when the system language is different from the users language settings. e.g.: XP english version, user settings German (Germany), resources are available in EN-US, DE-DE, FR-FR. LoadString does not find the german resource but instead loads the english one.
Nice, eh? Thats what we needed.
On the other side, on a W2k french version, it nicely loads the french resources. I havent yet tested a MUI version of W2k or XP, but thats next.
And, yes, the thread locale is correct in any test case.
int x=1, y=5;
x^=y^=x^=y;
<a href="http://www.codeproject.com/tips/StupidXORTrick.asp" target="_blank">ClickHereForHelp();</a>
|
|
|
|
|
Does this happen in all apps or only in MMC snapins?
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
Unfortunately in all applications. Which means that practically multilanguage resource functionality is broken badly. Well, it may be unusual to use Windows english version with different locale settings, but it still should work as it did once.
int x=1, y=5;
x^=y^=x^=y;
<a href="http://www.codeproject.com/tips/StupidXORTrick.asp" target="_blank">ClickHereForHelp();</a>
|
|
|
|
|
|
nope. doesnt find it. tested on multiple systems (so its not my machine that is f.. up).
even compiled on various machines.
int x=1, y=5;
x^=y^=x^=y;
<a href="http://www.codeproject.com/tips/StupidXORTrick.asp" target="_blank">ClickHereForHelp();</a>
|
|
|
|
|
|
True. Anyway tests show that in our case at least it works under NT4 SP6+. But not more with any following version.
Time to update Win32 SDK documentation on resources? Looks like.
int x=1, y=5; x^=y^=x^=y;
<a href="http://www.codeproject.com/tips/StupidXORTrick.asp" target="_blank">ClickHereForHelp();</a>
|
|
|
|
|
I am using MSFlexGridControl(MSVisual C++) in a dialog based application. I want to make some cells in MSFlexGridControl editable on my wish. Can anybody tell me how can I do it?
Ravi
|
|
|
|
|
hello
my problem is this: i build a release build and it compiles nicely
i then run my release build from within devstudio and outside of devstudio
without any changes to the code or the linkage etc settings
however, the one which is run inside of devstudio behaves correctly
and the one runoutside of devstudio doesnt behave itself properly (parsing data problems)
my question is...what the heck might be going on? its not a debug issue as i'm not running debug mode in either of them
does anyone have any thoughts?
regards
Bryce
|
|
|
|
|
Looks like uninitialized data. Can you check your program under BoundsChecker or Purify?
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
if it were that then surely the problem would surface wheni run the release build in the debuggerer ? as i've told it not to generate debug info etc
Bryce
|
|
|
|