|
i need code of window base calculator which can do operations upto 32 digits which is possible by huge integers or real...can anyone help?????
|
|
|
|
|
We will be glad to help.
Tell us what you have done so far, and we will try to answer questions you have.
|
|
|
|
|
...that may be too much work for him...
|
|
|
|
|
i have done it with huge integers so far but there is a problem that when i operate anyt function like adding or multiplying there become a dot after my answer and when i try to write again a new value that become written after that dot and previous answer stays on screen. what should i do???
|
|
|
|
|
Without snippet of code, this will be very difficult to answer (and please don't post the full code, only relevant snippets).
Did you try to use your debugger ?
|
|
|
|
|
Send a letter to the Microsoft, asking for the source code of their calculator application.
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]
|
|
|
|
|
i have done it with huge integers so far but there is a problem that when i operate anyt function like adding or multiplying there become a dot after my answer and when i try to write again a new value that become written after that dot and previous answer stays on screen. what should i do???
|
|
|
|
|
You need to be a bit clearer on what you want. "32 digits" implies decimal digits but I suspect you may bew talking about 32-bit numbers (ie 32 binary digits) or perhaps 32 hex digits. Also do you just want to calculate using these large numbers or do you want code for a calculator type program with buttons etc.
My best guess is that you just want to do calculations on big integers up to 32 hex digits (128-bits). These sorts of numbers are use in things like encryption. I have used the code in this article with success: C++ Integer Class[^].
Andrew Phillips
http://www.hexedit.com
andrew @ hexedit.com
|
|
|
|
|
I have fetched unicode data from microsoft database access in cstring variale as below
_variant_t dataHnd;
CString data2;
dataHnd=pRecordset_Objectiv->GetCollect("Meaning");
data2=dataHnd.bstrVal;
but in data2 variable ???? shows instead of hindi unicode data.
plz anyone tell me how i can get hindi unicode data in string variable
|
|
|
|
|
You can use the code like this also...
<br />
TCHAR szMsg[256];<br />
_tcscpy(szMsg,OLE2T(dataHnd.bstrVal));<br />
I hope this might help you...
|
|
|
|
|
Do you have _UNICODE and UNICODE defined in your project configuration? These will force CString to wide character.
|
|
|
|
|
Hi,
I need to add a log viewer in my application but as well as I need to put a buttons on top. How can I do that?
|
|
|
|
|
Use visual studio resource editor.
|
|
|
|
|
You really should provide more information if you want a useful response.
Is the viewer going to be in a modal/modeless dialog or a separate program and have you considered these alternatives?
Are the buttons you want to add going to be in a tool bar, plain buttons or owner drawn?
Keep it simple
dex
|
|
|
|
|
I noticed that the main.cpp in a Qt application has to contain the following line:
QApplication app(argc, argv).
I know that argc is the number of command-line arguments, and argv is that array list of command-line arguments. But, the question in my mind is: what are those arguments I'm passing to the constructor and at the same time cannot explicitly see? What is working behind the scences out there?
Thanks.
|
|
|
|
|
Abder_Rahman wrote: what are those arguments I'm passing to the constructor and at the same time cannot explicitly see?
Could you clarify your question? As far as I can see the only arguments passed to the constructor are argc and argv , which are the command line arguments, there is nothing hidden.
The best things in life are not things.
|
|
|
|
|
I mean what arguments we have to pass.
|
|
|
|
|
it wouldn't surprise me if there were some esoteric QT command line params, but I'd guess that QTapplication consumes them so you can query the application object for them later
|
|
|
|
|
Abder_Rahman wrote: I mean what arguments we have to pass.
Whatever you want. See also the answer below by Maximilien.
The best things in life are not things.
|
|
|
|
|
To check the number of argument passed.
for example
if (argc != 3)
{
printf("usage: myapp <srcfile> <dstfile>");
// Here 0 = myapp
// 1 = srcfile
// 2 = dstfile
//Total 3 Arguments entered
return FALSE;
}
pszSrcFileName = argv[argc-2]; // Src is second to last argument
pszDstFileName = argv[argc-1]; // Dst is the last argument
by default no arguments are passed. Unless you have created a program that read a Command Line Arguments.
Regards,
Vishal
|
|
|
|
|
Abder_Rahman wrote: what are those arguments I'm passing to the constructor and at the same time cannot explicitly see?
If you can put a break point in the constructor, you should be able to see the arguments passed to QApplication from the program entry point (main or WinMain )
The arguments are passed to the entry point via the command line, or form the application properties (right-click on the EXE).
The QApplication allows some default parameters. (see http://doc.qt.nokia.com/4.7/qapplication.html#QApplication[^] ).
I assume a QT developer can also add his own command line parameters by overriding either the QApplication and maybe a couple of methods to handle and parse the new parameters.
Other than that, I'm not certain what is the question.
Max.
Watched code never compiles.
|
|
|
|
|
Like grid control is it possible to add a fixed row in list control (clistctrl)
If i create a list control with LVS_EX_CHECKBOXES style then check box display in 1st column. Can i change check box position to any other column in list control
|
|
|
|
|
|
You can change the check box position by using this APIListView_SetColumnOrder ->[^]
"Every Little Smile can touch Somebody's Heart...
May we find Hundreds of Reasons to Smile Everyday... and
May WE be the Reason for someone else to smile always!" (ICAN)
|
|
|
|
|
hi to all,
I am writing a function to check access rights on file or folder using AclAPI.h
I am using following api's
GetFileSecurity()
ImperonateSelf()
OpenThreadToken()
MapGenericMask()
AccessCheck()
do i have to include
#pragma comment(lib, "advapi32.lib")
in my code or not.
Without including #pragma comment(lib, "advapi32.lib") Program is working.
and
BOOL WINAPI OpenThreadToken(
__in HANDLE ThreadHandle,
__in DWORD DesiredAccess,
__in BOOL OpenAsSelf,
__out PHANDLE TokenHandle
);
what does parameter in OpenThreadToken (OpenAsSelf) means.
Please give some valuable suggestions.
Regards,
Vishal
|
|
|
|