void CFileTestDlg::Write(const void *ptr,unsigned long size)
ABCDEFGHI
void CFileTestDlg::Write(const void *ptr,unsigned long size) { FILE *fp; fp=fopen("TestFile.bin","wb"); char str[50]; fwrite(ptr,size,1,fp); fclose(fp); /* FILE *fp; fp=fopen("test.bin", "wb"); char x[10]="ABCDEFGHI"; fwrite(x, sizeof(x[0]), sizeof(x)/sizeof(x[0]), fp); fclose(fp); */ } void CFileTestDlg::OnButton1() { // TODO: Add your control notification handler code here float buffer=1.33333; unsigned char *ptr=NULL; Write(&buffer,sizeof(float)); }
float
char
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)