Archived

This topic is now archived and is closed to further replies.

Abdhl Al Hazred

Void buffer problem

Recommended Posts

Why dosn´t this work? I get no errors in VS but no text is written to the file. I know (99% sure) that buffer ( a void pointer) contains memory data.
  

FILE *g_stream;
g_stream = fopen( "Buffer.out", "w" );
char *bufferpointer = (char*) mBuffer;
fprintf( g_stream, "%s", bufferpointer);
fclose( g_stream );	

  
Thanks, When the stars are right they will awake...

Share this post


Link to post
Share on other sites
Try replacing fprintf( g_stream, "%s", bufferpointer); with fprintf( g_stream, "%s", "blahblahblah");

If that gets written out then its your buffer that''s the problem. How are you getting your string into that buffer?

Share this post


Link to post
Share on other sites