|
if I have three words in there lines in a .txt file, and I want to read them to three string, how to do this using c++ ifstream? how to read every line(word)?
|
|
|
|
|
Use getline.
And, next time, ask in the right forum This is the C++/CLI forum.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I am using C++ in VC++ 2003
there are some examples like this http://www.codeproject.com/cpp/miniexcel.asp
but I don't quite understand.
I hope someone could help me or guide me to some related documents, bow!
|
|
|
|
|
bloodwinner wrote: http://www.codeproject.com/cpp/miniexcel.asp
That article is not really "about" Excel Automation. You need to research the Microsoft Office Object Model specifically the Excel Object Model. The MSDN site has examples and of course the documentation to these COM interfaces.
If you posted this in the correct forum it means you are using the .NET runtime for your project. In that case you can use the Microsoft supplied .NET libraries. http://support.microsoft.com/kb/302084[^]
led mike
|
|
|
|
|
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
|
|
|
|