It seems you are doing it the right way. Opening a file using fopen with "w" as the parameter creates an empty file for writing. If a file with the same name already exists its content is erased and the file is treated as a new empty file.
but since you are writing in the for loop the contents are written such that the file contains all the three names or names equal to the number of iterations
You need to google first, if you have "It's urgent please" mentioned in your question. _AnShUmAn_
The code was just a sample code... I want to update some information lets say for more than 1000 times, so dont you think that will an overhead? I think better option will be deleting contents amd updating the same with the updated information. Please suggest.
Now, my requirement is, each and every time I write a name into the file, i want to delete the previous name.
Little weird. So what do achieve by writing them into the file immediately? If you want to keep the last-entered text to be written, you can keep them in a temp buffer and write it into the file at the end. Otherwise if you want to keep up the requirement, I'd suggest the same as everybody there, something like
Can we create a Toolbar without MenuBar in Visual Studio 2008 (MFC).
I don't want to add a Menubar in my application. Instead of menubar, i want only toolbar to be attached with mainframe window?
Is it possible to do this?
If yes, help with some code?
In my VC++ project floating point division by zero operations (and overflow/underflow etc.) used to generate 1.#INF000000000000, NaN etc.
Recently for some reason the same operations create an error message:
Unhandled exception at 0x0341f550 in xevi34_2.exe: 0xC000008E: Floating-point division by zero.
Does someone have an idea why this could happen? I am using VCC Studio v8 (2005).
Interesting: If I create a new project and try the division by zero there it still gives back the 1.#INF000000000000 value.
The INTERNET_CACHE_ENTRY_INFO has a member LPBYTE lpHeaderInfo pointing to a buffer holding the header info. Does anybody know the structure (format) of that header info ?
To me it seems that the title of the web page starts at offset 0x38 (that's what I'm interrested to know) but I'm not sure it's happening all the time under al versions of Windows and IE. That's why I would like to see some documentation about that.
The header info holds the title using a strange coding for the characters, each character on 32 bits (4 bytes). I don't know any character/string format on 32 bits. What's the name of that kind of character/string ? How can I convert it to standard unicode (on 16 bits) ?
I understand I could simply copy it to another buffer and skip bits 16-31, but I'm not sure it will work with any kind of unicode characters.
I use a 64 bit Centrino processor, 64 bit Vista Ultimate, 32 bit IE7, VS2008.
I've got some C code that using single FILE* fp does those:
fp = fopen(binfile, "rb");
//read it with fread
fp = fopen(txtfile, "rt");
//read it with fscanf
fclose(fp); //<------------------this is the line SEH happen in release build
I found the SEH location by puting printf() enclosing fclose(fp)
You can't access IRQs, or even "real" memory, both of which you'd need for DMA.
This is the job of kernel mode drivers, and they're a whole nasty territory. I have written a couple, and debugging was a PAIN! Never did get the hang of debugging them, and it (used to be) serial only for a remote computers.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
Last Visit: 31-Dec-99 18:00 Last Update: 23-Sep-23 8:13