title: passing a pointer - for writing to a stream
body: <p>Please excuse my ignorance.. i know a fair bit but am somehow still hazy on basics!?!Could you consider this simple example and tell me the best way to pass logmessages to 'writeLogFile'?</p>
  
  <pre><code>void writeLogFile (ofstream *logStream_ptr) 
  {  
      FILE* file;
      errno_t err;
  
      //will check this and put in an if statement later..
      err = fopen_s(&amp;file, logFileName, "w+" );
  
  
      //MAIN PROB:how can I write the data passed to this function into a file??
  
      fwrite(logStream_ptr, sizeof(char), sizeof(logStream_ptr), file);
  
  
      fclose(file);
  
  }
  
  int _tmain(int argc, _TCHAR* argv[])
  {
  
      logStream &lt;&lt;"someText";
  
      writeLogFile(&amp;logStream); //this is not correct, but I'm not sure how to fix it
  
      return 0;
  }
  </code></pre>