Archived

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

Void buffer problem

This topic is 6020 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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