home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Virtual Reality Madness
/
VRMAD96_ONE.ISO
/
virtek
/
libex
/
libex043.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-08-24
|
839b
|
24 lines
// Example: 043 from Library Reference
#include "..\3D-Ware\dddware.h"
#include <stdio.h>
char buffer[]={"TESTING"};
char buffer2[7];
char filename[]={"3d-ware.tmp"};
short filehandle;
short main(void)
{
dddWriteFile(filename, buffer , 7); // Write a temorary working file to disk.
filehandle = dddFopen(filename); // Open the file.
if (filehandle == -1)
{
printf("Error opening file \"%s\".",filename);
return 1;
}
dddStrnSet(buffer2, 0, 7); // Clear the buffer to zeros.
dddFread(buffer2, 7, filehandle); // Read in the working file.
dddFclose(filehandle);
// Print the loaded file for the user to see.
printf("\ndddFread read in the following string :- %s\n",buffer2);
return 0;
}