|
a little Googling turns up a few high-precision floating point libs for C++.
|
|
|
|
|
|
it says it can handle numbers in the range: 2^16384 > x > 2^[-16383]
that's far greater than the numbers you gave in your post
|
|
|
|
|
I have problems with the files.
I added the src folder to the project like that:
Tools->Options->Projects And Solutions->VC++ Directories-> and to included files and source files.
I'll show you here the most important code:
<br />
#include "stdafx.h"<br />
#include "num.h"<br />
#include "numDlg.h"<br />
#include "stdio.h"<br />
#include "xpre.h"<br />
<br />
<br />
BOOL CnumDlg::OnInitDialog()<br />
{<br />
CDialog::OnInitDialog();<br />
<br />
CnumDlg::play();<br />
<br />
<br />
return TRUE;
}<br />
<br />
<br />
void CnumDlg::play()<br />
{<br />
struct xpr s;<br />
int i,n;<br />
<br />
s=xZero;<br />
do<br />
{<br />
scanf("%d",&n);<br />
s=xZero;<br />
for(i=0;i<=n;i++)<br />
s=xadd(s,xpr2(xOne,i),0);<br />
xprxpr(s,30);<br />
putchar('\n');<br />
}while (n>0);<br />
}<br />
I earased the most of the code-just the important there.
After I'm running the program I have the following Errors:
1>numDlg.obj : error LNK2019: unresolved external symbol _xprxpr referenced in function "public: void __thiscall CnumDlg::play(void)" (?play@CnumDlg@@QAEXXZ)<br />
1>numDlg.obj : error LNK2019: unresolved external symbol _xadd referenced in function "public: void __thiscall CnumDlg::play(void)" (?play@CnumDlg@@QAEXXZ)<br />
1>numDlg.obj : error LNK2019: unresolved external symbol _xpr2 referenced in function "public: void __thiscall CnumDlg::play(void)" (?play@CnumDlg@@QAEXXZ)<br />
1>numDlg.obj : error LNK2001: unresolved external symbol _xOne<br />
1>numDlg.obj : error LNK2001: unresolved external symbol _xZero<br />
1>C:\Documents and Settings\Semion Naidis\My Documents\Visual Studio 2005\Projects\num\Debug\num.exe : fatal error LNK1120: 5 unresolved externals
How can I fix that?
SnaidiS(Semion)
|
|
|
|
|
you'll need to either provide definitions for those functions, or remove the calls to them.
|
|
|
|
|
I gave a definitions for those functions here:
<br />
#include "xpre.h"<br />
#pragma once<br />
<br />
<br />
class CnumDlg : public CDialog<br />
{<br />
public:<br />
CnumDlg(CWnd* pParent = NULL);
void CnumDlg::play();<br />
struct xpr xadd (struct xpr a, struct xpr b, int k);<br />
struct xpr xpr2 (struct xpr s, int n);<br />
void xprxpr (struct xpr u, int m);<br />
I have the almost the same problem...
1>numDlg.obj : error LNK2019: unresolved external symbol "public: void __thiscall CnumDlg::xprxpr(struct xpr,int)" (?xprxpr@CnumDlg@@QAEXUxpr@@H@Z) referenced in function "public: void __thiscall CnumDlg::play(void)" (?play@CnumDlg@@QAEXXZ)<br />
1>numDlg.obj : error LNK2019: unresolved external symbol "public: struct xpr __thiscall CnumDlg::xadd(struct xpr,struct xpr,int)" (?xadd@CnumDlg@@QAE?AUxpr@@U2@0H@Z) referenced in function "public: void __thiscall CnumDlg::play(void)" (?play@CnumDlg@@QAEXXZ)<br />
1>numDlg.obj : error LNK2019: unresolved external symbol "public: struct xpr __thiscall CnumDlg::xpr2(struct xpr,int)" (?xpr2@CnumDlg@@QAE?AUxpr@@U2@H@Z) referenced in function "public: void __thiscall CnumDlg::play(void)" (?play@CnumDlg@@QAEXXZ)<br />
1>numDlg.obj : error LNK2001: unresolved external symbol _xOne
And if I'm trying to define it the xZero and xOne too(extern const struct xpr xZero, xOne, xTwo, xTen;)
I have the following errors:<br />
1>c:\documents and settings\semion naidis\my documents\visual studio 2005\projects\num\num\numdlg.h(17) : error C2071: 'CnumDlg::xZero' : illegal storage class<br />
1>c:\documents and settings\semion naidis\my documents\visual studio 2005\projects\num\num\numdlg.h(17) : error C2071: 'CnumDlg::xOne' : illegal storage class<br />
1>c:\documents and settings\semion naidis\my documents\visual studio 2005\projects\num\num\numdlg.h(17) : error C2071: 'CnumDlg::xTwo' : illegal storage class<br />
1>c:\documents and settings\semion naidis\my documents\visual studio 2005\projects\num\num\numdlg.h(17) : error C2071: 'CnumDlg::xTen' : illegal storage class
What should I do?
SnaidiS(Semion)
|
|
|
|
|
it's hard for me to say. i suggest you try to contact the authors of the class to see if they have any documentation that can help.
|
|
|
|
|
Maybe you have any other libraries like this one?
SnaidiS(Semion)
|
|
|
|
|
i don't have any libraries of this type.
try Google.
|
|
|
|
|
Hi all,
I use GetTempFileName() to create a temporary file. I fill this file with XML-Data and use ShellExecute to start Excel with my temporary file.
Now I want to delete this file again, since it was only temporary.
But...
When invoking DelteFile() directly after ShellExecute(), Excel says, that the file is not existent.
When waiting for some seconds after ShellExecute(), Execl runs well, but the file is not deleted, because Excel has it opened.
When not creating an XML-file, but a CSV-file instead, I can delete it immediately after ShellExecute()
So, how can I get rid of temporary files, that I have created in my Executable?
Juergen
|
|
|
|
|
e-DJ wrote: When invoking DelteFile() directly after ShellExecute(), Excel says, that the file is not existent.
And this surprises you?! What would you expect it to do?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I expected Execl to load the file before it is deleted. It works with CSV-files.
But XML-files seem to take more time to be opened.
I solved the problem this way, that I use OnClose() to search and delete all temp-files, that my appl has created. It works.
Juergen
|
|
|
|
|
e-DJ wrote: I expected Execl to load the file before it is deleted.
Not sure why you expected that. Unless told to do otherwise, Windows is asynchronous in nature. You have to explicitly provide synchronization constructs.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
All,
Can we post/send a message [ using PostMessage()/SendMessage() API ]from ATL COM DLL to the calling application window if we wanted to update the GUI periodically ?
It seems it is consuming lot of memory when I post or send message from DLL to the applicaton GUI window.
Thanks,
AKS
|
|
|
|
|
AKSIVAKUMAR wrote: It seems it is consuming lot of memory when I post or send message from DLL to the applicaton GUI window.
How are you verifying this?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
David,
I am using a tool to verify the memory leak. Moreover, If i comment that particular line and do run the application again, it consumes less memory.
Regards,
AKS
|
|
|
|
|
AKSIVAKUMAR wrote: If i comment that particular line and do run the application again, it consumes less memory.
What does the recipient of those messages do with them?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
just display the data on the GUI that comes from the DLL.
|
|
|
|
|
What type of data? How much? Is painting involved, or is it just text?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I think the problem isn't the message you are sending but your painting rutines that maybe are not freeing the allocated resources.
|
|
|
|
|
Kharfax,
To inform you that I don't have any painting routine inside my application for this purpose. Just I am posting a message to application handle(m_hWnd)to display them on the GUI.
Please let me know if you have any suggestions ?
Regards,
AKS
|
|
|
|
|
i need to send a file thro network using by Bus master NIC
for tht i need to initiate the dma trasfer of the NIC device
how to do it????
wht shld i do to make the file compatible for DMA transfer??
|
|
|
|
|
You can't access any hardware directly in WinNT+.
You will have to write a Windows driver (or find a usable driver, written by someone else) in order to send the file to the NIC. (A driver has the permissions needed to access the hardware).
So get Windows DDK and start coding.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
Hi,
Suppose to use PostMesage to post some kinds of message to the thread's message queue.The question is: If WM_CLOSE message already was queued, before WM_CLOSE is processed, can we continue to append other messages into the queue after the WM_CLOSE by using PostMessage?
|
|
|
|
|
brucerain wrote: can we continue to append other messages into the queue after the WM_CLOSE by using PostMessage?
You can post as many messages you want even if there is a pending WM_CLOSE message in the queue. Whether the messages that follows the WM_CLOSE message gets handled or not depends on how the WM_CLOSE message is handled. Normally DefWindowProc() will call DestroyWindow() when a WM_CLOSE message is received. DestroyWindow() then flushes the message queue among other things.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|