|
Write a program that takes an infix expression and converts it into prefix expression using stacks and c++ code.
|
|
|
|
|
Sounds like you have a good professor, good luck your assignment.
led mike
|
|
|
|
|
led mike wrote: Sounds like you have a good professor, good luck your assignment.
Same thought here since the OP reeks like homework
|
|
|
|
|
I am using the MFC dialog application.
There are 3 edit box, add1, add2 and sum
and a button "add",
when exectuing, I input add1, add2, and use the "add" function dlg.m_sum=dlg.m_add1+dlg.m_add2
how to make the sum appears in the "sum" edit box? Do I have to add a view class or how to modify the OnPaint?
I now only have add.cpp and addDlg.cpp
|
|
|
|
|
bloodwinner wrote: I am using the MFC dialog application.
Then you're not using C++/CLI, are you ?
bloodwinner wrote: dlg.m_sum=dlg.m_add1+dlg.m_add2
I assume you have associated ints with the text boxes, not edit controls ?
Then you need to call UpdateData before you do the calculation, to bring down the variables, and UpdateData(FALSE) after the calculation, to populate the controls again. Or, maybe the other way around.
Please ask in the right forum next time
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
how to concatenate quotes to a string
supposed i want to display " Here is "my play ground" Enjoy" how we do please help me
thanks
abhi
abhi
|
|
|
|
|
|
Hi there,
Could any one tell me how I could disable user from viewing resources (i.e. dialogs, icons, menu, etc.) in an application exe file? I have an application that is written in unmanaged C++ in VS 2005 compiled with /clr option. Any help would be greatly appreciated.
Tony
|
|
|
|
|
Run a tool like UPX[^] on the binary.
|
|
|
|
|
Thanks Mike for the info. But I have a problem when I run it, it says.
upx: Myprogram.exe: CantPackException: .NET files (win32/net) are not yet supported
You know other software that support .net exe file?
Thanks
|
|
|
|
|
Hi!
What I'm trying to do is a tool that would help my at work with big number of open windows. It should:
1.Close window when I click middle button over titlebar of window (done)
2.Close window when I click over window's button in taskbar area.
The second one is for me too hard. I manage to catch mouse click using system hooks, but I don't know how to get HWND to specific button. I have whole taskbar handle insted. Sending WM_CLOSE couse closeing system :/.
How to get HWND of taskbar button that was clicked by mouse middle button?
Or how to acquire second goal other way?
Thank You for any help
Artur Tadrała
|
|
|
|
|
Hi, I'm wondering how I can remove the 'Close' button on a modal dialog. The reason is I don't want the user to accidentally close this partiulcar window, or at least display a confirmation to the user to ask whether if they really want to close it. I can't do that with the Form_Closing event as it stills closes it.
|
|
|
|
|
Set the Form.ControlBox property to false
led mike
|
|
|
|
|
Dear all,
I have been trying to send a string and read through Rs232 loop back null modem using the .net2 class serial port. The code is below:
the program sort of works but does not print "hello world", it prints the number 5, which is the byte size i am looking to print. i expected "hello" to print. any ideas as to where i am going wrong? many thanks.
void SendRs232Data()
{
serialPort->Open();
serialPort->Write("Hello World");
int offset = 0;//The offset in the buffer array to begin writing.
int count = 5; //The number of bytes to read.
array<unsigned char="">^ buffer = gcnew array<unsigned char=""> (10);//The buffer array to write the input to.
serialPort->Read(buffer, offset, count);
lblSerial->Text= (serialPort->Read(buffer, offset, count)).ToString();
serialPort->Close();
}
|
|
|
|
|
serialPort->Read(buffer, offset, count)
This function returns the number of bytes read.Since u have given the count value as 5,it would always return 5.Get the expected data from the buffer array
|
|
|
|
|
Thanks. Can you suggest what statment i need in ordr to read from the port?
|
|
|
|
|
Hi,
Delegates raised asynchrnosly does not raise in the invocation order.It executes randomly.How to make this delegate to be raised in the order it is invoked
Thanks in advance
Sangeetha
|
|
|
|
|
Hi,
i tried the CXImage Libary to create a multipage tif file. everything works fine! but for one project i need to split a multipage tif into several tif files.
how can i realise this by using the cximage libary? can anyone help me please?
thanks a lot!
|
|
|
|
|
*sigh* wrong forum.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
then please take it to the right forum section, or forward it... i dont know where to post else...
thx!
|
|
|
|
|
I'm afraid I can't move posts at the moment, I am having network problems while travelling.
The library in question is not written using C++/CLI, it's written in normal c++. Hence, as the forum for this article is no longer supported, the Visual C++ forum is the place to ask this.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Given something like this (assume everything public, VC++ 2003 old syntax)...
__gc class ManagedClass
{
AnotherManagedClass __gc *pAnotherManagedClass;
...
AnotherManagedClass __gc * GetAnotherManagedClass() {return pAnotherManagedClass;}
};
class UnmanagedClass
{
gcroot<ManagedClass *> pManagedClassObj;
...
void UnmanagedClassFunc();
};
Which of the following three is the safest/most-correct/least-overkill way to use the managed
object pointers from an non-GC class method:
void UnmanagedClassFunc()
{
pManagedClassObj->GetAnotherManagedClass()->AnotherManagedClassFunc();
}
or
void UnmanagedClassFunc()
{
gcroot<AnotherManagedClass *> pAnotherManagedClassObj;
pAnotherManagedClassObj = pManagedClassObj->GetAnotherManagedClass();
pAnotherManagedClassObj->AnotherManagedClassFunc();
}
or
void UnmanagedClassFunc()
{
AnotherManagedClass __pin *pAnotherManagedClassObj = pManagedClassObj->GetAnotherManagedClass();
pAnotherManagedClassObj->AnotherManagedClassFunc();
}
Thanks,
Mark
|
|
|
|
|
The first one is fine and is what you need to use.
|
|
|
|
|
Thanks much Nish.
So, pinning is only required if I passed the pointer to another unmanaged function?
There's no chance of the managed object moving during the call? I guess I'm thinking in terms of
a "this" pointer being a C++ guy.
Mark
|
|
|
|
|
Mark Salsbery wrote: So, pinning is only required if I passed the pointer to another unmanaged function?
There's no chance of the managed object moving during the call? I guess I'm thinking in terms of
a "this" pointer being a C++ guy.
Yeah, as long as you are accessing the managed pointer, you don't need to do pinning. But, if you are passing the managed pointer using a native pointer (for instance, when calling a native function), then you need to pin it. Because the native pointer will not be updated when the managed object it is pointing to gets relocated (if it does).
|
|
|
|