|
k_micak wrote: I've done this by using a string with a length of 10^26
WOW, your machine must have inifinite memory resuorces.
(Just kidding)
IMHO the task is not daunting (you may mimic the 10-based division-by-hand technique learned at school) but it will turn out to be quite inefficient. Why don't you have a look at a library like this one [^].
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
|
|
|
|
|
wow, I really trust a library when :
"GMP is very often miscompiled! We are seeing ever increasing problems with miscompilations of the GMP code. It has now come to the point where a compiler should be assumed to miscompile GMP. Please never use your newly compiled libgmp.a or libgmp.so without first running make check. If it doesn't complete without errors, don't trust the library. Please try another compiler release, or change optimization flags until it works. If you have the skill to isolate the problem, please report it to us if it is a GMP bug; else to the compiler vendor. (The compilers that cause problems are HP's unbundled compilers and GCC, in particular Apple's GCC releases.) É
|
|
|
|
|
Well this sometimes happens on GCC world. At least they are honest. And probably you should never use a library for GCC whoose make check fails.
I'm confident that passed the make check obstacle, nobody will exchange the library with the string-based approach.
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
|
|
|
|
|
without going to a bignum library, i'd try just duplicating the algorithm that you use when doing long division on paper:
________
1234 | 567890
ex:
5678 / 1234 = 4 with a remainder of 742. carry the remainder to the 9...
7429 / 1234 = 6 with a remainder of 250
250 / 1234 = 0
and now you've reached the decimal point, so the whole number part of the answer is 460, and you can do the rest with FP math.
as long as the divisor (1234) is in the integer range, you'll be OK, since all the other operations in the process will also be in that same range.
modified on Wednesday, March 19, 2008 5:08 PM
|
|
|
|
|
im using vc++ and accessing microsoft access as my database.im using my application on embedded xp,but on running my application im am geting this error
"SPECIFIED DRIVER COULD NOT BE CONNECTED TO THE SYSTEM ERROR:126(MS ACCESS *MDB"
THANKS IN ADVANCE
modified on Wednesday, March 19, 2008 10:24 AM
|
|
|
|
|
I may be wrong about this, but I believe you have to register your database before you can access it. Have you done that?
John P.
|
|
|
|
|
I didnt get what u mean by Registering the database?
|
|
|
|
|
|
Neither do I. I use C++ to interact with Access databases all the time and I've never had to "register" them.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Can you tell us how you defined the "connection string" to get records?
Did you use "Control Panel\Administrative Tools\Data Sources (ODBC)" to define it?
|
|
|
|
|
I'm developing a simple animated game and it must run on windows 2000 and above including vista.
Some of us think:
1. Loading bitmaps (.png files) with DirectDraw7 will be MUCH faster than creating textures with DirectX 9.
2. Performance will be the same or better.
3. DirectX textures distorts the bitmap (.png files).
4. It will work on all windows OS because it's backward compatible.
How wrong are we ?
|
|
|
|
|
Based only on what I have read, not experienced, if you intend to use the DirectDraw interfaces you don't want to use DirectX9 because DD is only exposed through a managed class and is therefore slower. If however you want to use the DX interfaces then DX9 appears to be faster than older versions. One specific thing I have frequently read is that the FPS is higher due to a faster fill rate.
|
|
|
|
|
Thank you very much Mike.
led mike wrote: if you intend to use the DirectDraw interfaces you don't want to use DirectX9 because DD is only exposed through a managed class and is therefore slower
If I understand you right: Using DirectDraw interfaces , with the ddraw.lib as part of the DirectX9 SDK is slower.
But perhaps using ddraw.lib from any other sdk is less compatible ?
|
|
|
|
|
Hanan888 wrote: But perhaps using ddraw.lib from any other sdk is less compatible ?
That is certainly possible, I have not seen any noise in regards to compatibility. You might want to do some Googling yourself because I am not directly involved in any game development currently so I don't pay much attention. I know the net is full of noise about game development though. I also don't know anything about PC game dev, I was involved with the console platforms (XBox, PS) only.
|
|
|
|
|
I saw a lot of "do not use direct draw, unless you are crazy".
Thanks.
|
|
|
|
|
Yeah I know, but I also have seen things like if you are just doing 2d you don't need the overhead of the DX interfaces and libs which have been designed for 3d.
led mike
|
|
|
|
|
Hello
Im building a client server application where the client will send information to the server using Visual C++ .NET. The communication and sending information to the server has succeed. I want to write the information that is retrieved by the server to Microsoft Access. How can i accomplish this? For your information, Im using the win32 console application as the C++ platform. Is there any sample code which i can refer to? Im quite new to this and still learning. Can you guys also include any lib that needs to be linked to the project and also any header files that i must include. Thank you and your reply is really appreciated.
|
|
|
|
|
I'm sure someone in the Managed C++ forum can tell you which .NET class are available to allow you to interact with Access. If you were doing it in straight C++ you'd be talking OLE/DB or ODBC3 or parhaps even wrapping up some ADO in a C++ callable VB Dll, can't believe I said that. You know what to do.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
i am implementing a Active window player in a modeless dialog box. now my issue is when i drag the window to a level the size of the video is increasing. but when i return to the original position only a part of the screen is seen. what needs to be done to solve this problem. the full video needs to be shown in the screen,.
|
|
|
|
|
Is there any windows api there which will give the same output as the netstat command .????
vineesh
|
|
|
|
|
Have you looked at NetStatisticsGet() , or any of the IP Helper functions.
http://msdn2.microsoft.com/en-us/library/aa366071(VS.85).aspx[^]
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
here is a button,it will show a tip window when the mouse is moving above it if it's enabled.
now,the button is disabled.but i still want to show a tips window when the mouse is moving above it.
my problem is,when the button is disabled,it seems that it can't recieve any messages now.
how to resolve such problem?
regards.
|
|
|
|
|
|
yes,its helpful to me.
Thanks.
|
|
|
|
|
great tips
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|