title: Writing new line character in file
body: <p>I just want write blank line into the file. i use following code but is not working.</p>
  
  <pre><code>        char* RegID;
          RegID = "10";
          char* mndtime;
          mndtime  = "10";
          char* resourcetype;
          resourcetype  = "Backup";
          char* ressubtype;
          ressubtype = "shadowprotect";
          char* DataBuffer = new char[100];
  
          StrCpy(DataBuffer,"&lt;wpshadowprotectstatus&gt;");
          strcat(DataBuffer,"\n");
          strcat(DataBuffer,"&lt;mndtime&gt;");
          strcat(DataBuffer,RegID);
          strcat(DataBuffer,"&lt;\\mndtime&gt;\n");
          strcat(DataBuffer,"&lt;resourcetype&gt;");
          strcat(DataBuffer,RegID);
          strcat(DataBuffer,"&lt;\\resourcetype&gt;\n");
          strcat(DataBuffer,"&lt;ressubtype&gt;");
          strcat(DataBuffer,RegID);
          strcat(DataBuffer,"&lt;\\ressubtype&gt;\n");
          strcat(DataBuffer,"&lt;jobname&gt;");
          strcat(DataBuffer,RegID);
          strcat(DataBuffer,"&lt;\\jobname&gt;\n");
          strcat(DataBuffer,"&lt;jobstarttime&gt;");
          strcat(DataBuffer,RegID);
          strcat(DataBuffer,"&lt;\\jobstarttime&gt;\n");
          HANDLE hFile; 
  
          hFile = CreateFile("text.txt",                // name of the write
                             GENERIC_WRITE,          // open for writing
                             0,                      // do not share
                             NULL,                   // default security
                             CREATE_NEW,             // create new file only
                             FILE_ATTRIBUTE_NORMAL,  // normal file
                             NULL);                  // no attr. template
  
          if (hFile == INVALID_HANDLE_VALUE) 
          { 
              return 0;
          }
          DWORD dwBytesToWrite = (DWORD)strlen(DataBuffer);
          DWORD dwBytesWritten = 0;
          BOOL bErrorFlag = FALSE;
          bErrorFlag = WriteFile(hFile,           // open file handle
                          DataBuffer,      // start of data to write
                          dwBytesToWrite,  // number of bytes to write
                          &amp;dwBytesWritten, // number of bytes that were written
                          NULL);            // no overlapped structure
  </code></pre>
  
  <p>but i dont known why new line is not dump in text file.</p>
  
  <p>Note :- 
  1)I dont want to use std:: library c++.
  2)Dont want to use xml parser.</p>