|
uus831 wrote: But how do i determine how much data to read from the file? I mean, if the file in.txt contains 10 rows of data, how can i determine that i need to call scanf 10 times?
fscanf() will tell you when it has read past the end of the file stream:
while (fscanf(stdin, ...) != EOF)
{
...
}
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
I'm working on a MDI application and i need to display multiple child window. I don't know how to do it.
Hope somebuddy can give a comment.
Thanks.
|
|
|
|
|
I am using three different file types in my File Dialog.
Now when the User types in a file name and select a particular file
type from the drop down box and tries saving it, it doesn't save the
file type selection from the drop down box.
And also when i tried to get the file extension using the GetFileExt()
function it doesn't work.
Unless user types the file extension along the file name, this
function is not able to retrieve the file extension. How can this be
resolved?
Thanks in advance.
|
|
|
|
|
dipuks wrote: And also when i tried to get the file extension using the GetFileExt()
function it doesn't work.
Unless user types the file extension along the file name, this
function is not able to retrieve the file extension. How can this be
resolved?
Have you provided a default extension?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I'm not sure I'm in the right forum, if it's possible in C++ or if there's a program that does this. I'm trying to automatically compare and merge two .rtf documents and save it in a folder. The documents are the same name in different folders. I would like to know if there's a function call to use the attribute in word. Thanks for any comments or criticisms. Thanks
|
|
|
|
|
KirkNarine wrote: if it's possible in C++
Yes it is.
KirkNarine wrote: if there's a program that does this.
I don't know. Google might be able to help you discover that.
KirkNarine wrote: The documents are the same name in different folders.
That information is not relevant.
KirkNarine wrote: I would like to know if there's a function call to use the attribute in word.
I have no idea what that means.
KirkNarine wrote: Thanks for any comments or criticisms. Thanks
You are welcome. You're welcome
led mike
|
|
|
|
|
KirkNarine wrote: or if there's a program that does this.
Yes. Use WinMerge tool.
Maxwell Chen
|
|
|
|
|
Iam using MFC .In my project,I choose "single document" .while Iam writting,I have a problem that when I choose "File" on menu ,I continue to choose Open .MFC Program display me a dialog which help choose a file .And after I choose file,I don't know how do I get file path .Please help me.Thanks
Iam going to post pictures on forum,but I can't find where post it.Iam sorry
|
|
|
|
|
nvphap wrote: And after I choose file,I don't know how do I get file path .
Your document class has methods for retrieving that.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: Your document class has methods for retrieving that.
Yeah, I think they still hide that information in the documentation.
led mike
|
|
|
|
|
may you speak clearly about which you reply to me,please .Thanks
|
|
|
|
|
From your document class(es), you can call CDocument::GetPathName() to get the full pathname.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
After I click button "open" to choose file ,the event or function where I will process to get file path,what is it's name? .Thanks
|
|
|
|
|
|
Override the CDocument::OnOpenDocument(LPCTSTR lpszPathName) function. The arguement contains the File Name which is selected in Open dialog
|
|
|
|
|
Hi friends,
I want to develop one business (back end exe to do functional computations and to get/store data into Oracle) application which i can develop either in Pro*C/C++ or C#.
Which language (Pro*C/C++ or C#) shall i chose ??? and why ???
which application will be more faster ?? and why ???
xyz
|
|
|
|
|
Amit4u wrote: Which language (Pro*C/C++ or C#) shall i chose ??? and why ???
Honestly, nobody cares which language you use. Choose the one which you know best. Both languages have good and bad aspects about them.
Amit4u wrote: which application will be more faster ?? and why ???
Generally speaking C++ generates slightly faster machine code, however with an Oracle DB application this really doesn't matter.
Best Wishes,
-David Delaune
|
|
|
|
|
Which language you know better ?
|
|
|
|
|
A Senior Software Developer should be able to evaluate C++ and C#.
|
|
|
|
|
I have a VS2005 (WinXP) project that compiles perfectly with zero warnings or errors that i recently migrated to VS2008 (Vista), and on initial compile i got these three errors:
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\netioapi.h(155) : error C2146: syntax error : missing ';' before identifier 'PhysicalMediumType'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\netioapi.h(155) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\netioapi.h(155) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
And i can't figure out what is causing it. I know it's related to network I/O, but not sure what inparticular. Anyone have any suggestions?
Thanks!
|
|
|
|
|
You need to #include
ntddndis.h
or
netioapi.h
Best Wishes,
-David Delaune
|
|
|
|
|
You'll need to get your header files in order.
At the line the errors occur, the compiler does not recognize the "PhysicalMediumType"
type. You need to examine the header files (including nesed ones) above that line to
find out why.
maybe some info here will help[^]
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
hi
I made a listview control with LVS_REPORT style .......
My task is when i select any item from the listview control and delete it....the focus should go on to the next item......not only focus but next item should be selected......
Thanx in advance
AbidBhat
|
|
|
|
|
Have you looked into the LVM_SETITEM and/or LVM_SETITEMSTATE messages?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi all,
I am writing a multi-threaded program that runs multiple Ftp clients with different transfer types to connect to different ftp servers. The general sequence of each session is:
CInternetSession::CInternetSession ();
CInternetSession::GetFtpConnection ();
.....
Do all kinds of weird and wonderfull things like get, put, pwd etc.
.....
CFtoConnection::Close ();
delete m_FtpConnection;
CInternetSession::Close ();
delete m_Session;
Basically it all works as expected. The only problem is that the ftp server's log always ends with:
0325 15:05:12 (00000984) 172.29.9.67 connection aborted
0325 15:05:12 (00000984) 172.29.9.67 connection closed
and I don't like the "connection aborted" part, since my clients will probably come back to me asking what the hell is going on here!!!!
It does not matter if I remove the close statements or the delete statements. Only when I remove the whole close and delete part, will I not get the aborted message. I then however also not get the "connection closed", so that in a next cycle the ftp server's log show things like:
0325 14:24:20 (00000fa8) 172.29.9.67 connection reset
0325 14:24:20 (00000fa8) 172.29.9.67 connection closed
When I use the standard window ftp manually and do something there, then I see a log like:
0325 14:52:05 (00001084) NBK0188.cew.centric.lan D(0) 172.29.9.67 user1 QUIT
0325 14:52:05 (00001084) NBK0188.cew.centric.lan S(0) 172.29.9.67 user1 logoff R D P
0325 14:52:05 (00001084) 172.29.9.67 connection closed
0325 14:59:38 (000017a8) 172.29.9.67:2235 connected to 172.29.9.67:21
The quit probably coming from the "bye" command, however I do not see any equivalent in the CFtpConnection or CInternetSession classes.
Does anyone have any bright ideas on the subject? Would be greatly apreciated!
Thanks in advance,
William
|
|
|
|