|
|
Hello, I need a library file or some program which is similar to bigint() class in the C++. bigint() class library in C++ is used to represnt big int numbers in the C++ programs but I needed such type of library in the C.
|
|
|
|
|
|
This code copied from a beginners book produces 26 errors !!!!!
I think the main problem is stated in the subject anyone please help i'm only on page 17
#include <<iostream.>>;
int main( )
{
int number;
number = 100;
cout << "int number" << number << endl;
}
|
|
|
|
|
heh,try this
#include<iostream>
using namespace std;
int main()
{
int number;
number=100;
cout<<"Number is "<<number<<endl;
return 0;
}
|
|
|
|
|
Thanks for your reply I now get the error:
Info :Building...
Info :Compiling C:\Users\Gordon\Desktop\Source Code\CPP Source\variable.cpp
Error: IOSTREAM.h(25,2):Error directive: Must use C++ for the type iostream.
|
|
|
|
|
Try shutting down the application and run it again.
|
|
|
|
|
Still no joy I'm using Borland Studio 6 does that have a factor?
|
|
|
|
|
how are you compiling your code ? (which compiler, IDE, ...).
Me think you are using a C compiler instead of a C++ compiler.
This signature was proudly tested on animals.
|
|
|
|
|
Sounds like an ancient compiler - requires iostream.h instead of iostream
|
|
|
|
|
I do need to use iostream.h instead of just iostream in Borland studio 6 is that just a quirk of their system?
|
|
|
|
|
gordon3056 wrote: is that just a quirk of their system?
Nah - that's how it was being used before the C++ ISO Standard took place (in 1998). However, I do recommend using a more recent compiler.
|
|
|
|
|
im not sure about that.Im using codeblocks btw,quite ez to use ^_^
|
|
|
|
|
I think its a tribute to The Code Project members that I an absolute beginner can get any help at all. Thank you
|
|
|
|
|
Hello,
I am trying to use this control in a toolbar. For the most part the code works. However, I am running into this odd problem that I am getting partial text back when I call GetText.
The app requires that when I click a different button in the toolbar, I check the combo box and retrieve the text from it for processing. That is when this bug surfaces. The last character is getting truncated. If I retrieve the text in response to the Enter key handler for the combo box, I get the full text using the same GetText call.
Here is the code...most all of it is lifted from the samples.
CObList listButtons;
if (CMFCToolBar::GetCommandButtons(ID_EDT_FIND_NDC, listButtons) > 0)
{
for (POSITION posCombo = listButtons.GetHeadPosition();
pSrcCombo == NULL && posCombo != NULL; )
{
CMFCToolBarComboBoxButton* pCombo = DYNAMIC_DOWNCAST(CMFCToolBarComboBoxButton, listButtons.GetNext(posCombo));
if (pCombo != NULL) pSrcCombo = pCombo;
}
}
if (pSrcCombo != NULL)
{
ASSERT_VALID(pSrcCombo);
LPCTSTR lpszSelItem = pSrcCombo->GetText();
...
}
So if the combo box has the text '1234567890', I am getting back '123456789' in one case, and '1234567890' in another case, depending on whether I press the other button or press the Enter key.
Has anyone encountered this, and can someone suggest a solution?
Thanks for your time.
|
|
|
|
|
I just encountered the same problem here!
No solution so far.
It is so frustrating to work with this feature pack...
|
|
|
|
|
Yes, I finally got frustrated enough to think up alternatives. I had already coded to find the CMFCToolbarComboBoxButton object (Code from MSDN actually), so now I went ahead and code along the following lines:
if (pSrcCombo != NULL)
{
ASSERT_VALID(pSrcCombo);
CMFCToolBarComboBoxEdit *pEdit = (CMFCToolBarComboBoxEdit *) pSrcCombo->GetEditCtrl();
if (pEdit)
{
CString strSelItem=_T("");
pEdit->GetWindowText (strSelItem);
pSrcCombo->AddItem (strSelItem);
...
}
}
Using the Edit Control seems to have solved the problem for me. At the MFCToolbarComboBoxButton level, there is no option for a fix that I have found. Perhaps subclassing the control and intercepting the GetText() call may work, but I have not tried it.
modified on Tuesday, October 20, 2009 4:07 PM
|
|
|
|
|
At least this works for me:
In the Code, where a character is truncated replace the call to pSrcCombo->GetText() with something like this:
CComboBox* a_pComboBox(pSrcCombo->GetComboBox());
ASSERT(a_pComboBox);
CString a_strAddressTextInCombo;
a_pComboBox->GetWindowText(a_strAddressTextInCombo);
Maybe in your code you have to distinguish somehow where the call comes from...
Or you could try if the above code works for both scenarios.
Hope I could help,
Patrik
|
|
|
|
|
Yes, a code sample in the MSDN website gives details on how to identify the control that you are using.
CMFCToolBarComboBoxButton* pSrcCombo = NULL;
CObList listButtons;
if (CMFCToolBar::GetCommandButtons(ID_EDT_FIND_NDC, listButtons) > 0)
{
for (POSITION posCombo = listButtons.GetHeadPosition();
pSrcCombo == NULL && posCombo != NULL;)
{
CMFCToolBarComboBoxButton* pCombo = DYNAMIC_DOWNCAST(CMFCToolBarComboBoxButton, listButtons.GetNext(posCombo));
if (pCombo != NULL && CMFCToolBar::IsLastCommandFromButton(pCombo))
{
pSrcCombo = pCombo;
}
}
}
|
|
|
|
|
My problem is similar to the one described here:
http://www-01.ibm.com/support/docview.wss?rs=1079&context=SS2KS6&dc=DB520&uid=swg21230924
In our application we have DLL that is used to write information to Event
Log. Problem is when I need uninstall/upgrade our application this DLL is
often locked after our application is shut down and it requires computer reboot which is undesirable.
For what it's worth - our application is a service. All other .DLL/.EXE files are successfully deleted by uninstall after service is stopped. Or they can be deleted manually if service is stopped.
I know there is a way to unlock/delete this file because this is what
Unlocker application does (http://ccollomb.free.fr/unlocker/)
Does anyone have any ideas on how this is achieved using Windows API?
modified on Friday, September 11, 2009 11:30 AM
|
|
|
|
|
JoeSchmoe007 wrote: Does anyone have any ideas on how this is achieved using Windows API?
How about shutting down your application?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
File is still locked after application is shut down. I edited original post to reflect that. For what it's worth - our application is a service.
|
|
|
|
|
JoeSchmoe007 wrote: File is still locked after application is shut down.
Then some other process is using it, or your application is still running.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
You can use Process Explorer (run it without installation wrom live sysinternals site[^]) to find out which process is holding your file.
|
|
|
|
|
There is a way to forcibly close handles - because Process Explorer can do it.
However, in this situation, you should use MoveFileEx[^] with the MOVEFILE_DELAY_UNTIL_REBOOT flag and a NULL destination filename and Windows will perform the file deletion at the next boot time, before any applications have started to lock the file.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|