|
I *know* it's his sig, but the code he posted is also C, and I would strongly advise against using it in a C++ program.
Christian Graus - C++ MVP
|
|
|
|
|
|
Hi Christian,
The whole " ... The only programmers that are better than C ..." is just my signature But you are right I would strongly advise against it too.
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
« Programm3r » wrote: The whole " ... The only programmers that are better than C ..." is just my signature
So why not set it apart from the rest of your post (so that folks don't take it out of context)?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
The standard C++ way is to use an ifstream. This has the advantage of providing a clean way to read the data, especially if you know exactly what format it's in.
I recommend googling for ifstream for some examples.
Christian Graus - C++ MVP
|
|
|
|
|
Shah Satish wrote: How i can read data from .txt file.
If you are using MFC, check out the CStdioFile class. If not, check out the STL's ifstream class.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi!!! Thanks for reply.
Ya..I am using MFC class.have any idea??
|
|
|
|
|
Shah Satish wrote: have any idea??
Nothing other than what I already provided.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi all,
Just a quick question, the parameter lpFileName required by the Delete Function, can or rather must it be a complete path to the file for example:
<code>
BOOL DeleteFile(
LPCTSTR lpFileName
);
lpFileName = "C:\Directory\file1.txt";
DeleteFile(lpFileName);
</code>
And what about rights to delete the file??
Thanx in advance
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
prefer full paths...
BTW, "C:\Directory\file1.txt" is not a valid path due to the \ escape character. you should write :
"C:\\Directory\\file1.txt"
|
|
|
|
|
Thank you toxcct....
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
You can also use of SHFileOperation instead DeleteFile, why?
From the MSDN:
When used to delete a file, SHFileOperation attempts to place the deleted file in the Recycle Bin. If you wish to delete a file and guarantee that it will not be placed in the Recycle Bin, use DeleteFile.
|
|
|
|
|
Thank WhiteSky for the help...
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Dear All,
I need to create an XML file from Registry. I dont know how to do this.
Registry subkeys are tagnames and registry values are tag attributes.
Kindly help me.
Thanks.
|
|
|
|
|
where's your problem exactly ? reading the registry ? or writing XML ?
|
|
|
|
|
writing XML ..
Kindly help me. Show some sample programs if you can.
thanks
|
|
|
|
|
have you already searched for an XML library ?
if so, have you tried to play with it ?
what was wrong with this[^] ?
[edit]
please indicate what you tried, where you couldn't go further, and because of what ? (post code samples if relevant).
[/edit]
|
|
|
|
|
- call regedit.exe
- export the registry
- write a program that converts the result to XML format
|
|
|
|
|
did you read the posts in the thread ?!
|
|
|
|
|
|
it's what it appears like to me...
|
|
|
|
|
If you're just creating a document, then just concatenate strings, it's not worth the hassle of getting a DOM object going.
Christian Graus - C++ MVP
|
|
|
|
|
Anybody knows any sites/links/articles on developing eVC++ SDK (NOT MFC)applications??
|
|
|
|
|
It's pretty much the same as developing an SDK-based application for desktop/server Windows. You will often find, however, that various functions were omitted from Windows CE as they are redundant: for example, MoveToEx and LineTo were omitted in favour of PolyLine . This was done to reduce the size of the kernel image.
The C runtime is missing a lot of functions and as such can't really be counted as a standard-compliant C implementation. Again, this was done where there was a more useful Win32 alternative.
On the whole, though, techniques for desktop Windows development are directly applicable to Windows CE/Windows Mobile programming.
|
|
|
|