Here's a little piece of code I'm trying to get to work:
bzium is a non-empty null terminated string, c:\ble.dat exists and is not empty. What I'm trying to do is:
1. open ble.dat in write mode and truncate it
2. dump bzium into opened file
3. close it.
When I run this code it produces no errors, but also does not alter the file in any way. I googled, but all examples I found were similar.
Anyone sees the problem here ?
Mike
Code:
char *bzium;
bzium = dupa.getHeader();
fstream xx("c:\\ble.dat",ios::binary|ios::out|ios::app|ios::trunc);
xx.write(bzium,strlen(bzium));
xx.close();
bzium is a non-empty null terminated string, c:\ble.dat exists and is not empty. What I'm trying to do is:
1. open ble.dat in write mode and truncate it
2. dump bzium into opened file
3. close it.
When I run this code it produces no errors, but also does not alter the file in any way. I googled, but all examples I found were similar.
Anyone sees the problem here ?
Mike