title: Using strcat in C
body: <p>Okay so I have the following Code which appends a string to another in C#, note that this is Just an <strong>example</strong>, so giving alternative string concatination methods in C# is not nessesary, this is just to simplify the example.</p>
  
  <pre><code>string Data = "";
  Data +="\n\nHTTP/1.1 " + Status_code;
  Data += "\nContent-Type: " + Content_Type;
  Data += "\nServer: PT06";
  Data += "\nContent-Length: " + Content_Lengt;
  Data += "\nDate: " + Date;
  Data += "\n" + HTML;
  </code></pre>
  
  <p>Now I'd like to do the exact same thing in C and I'm trying to do this the following way</p>
  
  <pre><code>time_t rawtime;
  
  time ( &amp;rawtime );
  
  char *message = "\n\nHTTP/1.1 ";
  message = strcat(message, Status_code);
  message = strcat(message, "\nContent-Type: ");
  message = strcat(message, Content_Type);
  message = strcat(message, "\nServer: PT06");
  message = strcat(message, "\nContent-Length: ");
  message = strcat(message, Content_Lengt);
  message = strcat(message,  "\nDate: ");
  message = strcat(message, ctime(&amp;rawtime));
  message = strcat(message, "\n");
  message = strcat(message, HTML);
  </code></pre>
  
  <p>Now, this gives me a Segment fault, I know why, I access and read on memory that i shouldn't. But the question is, how do i solve it? Could I use string.h and just do it the same way that I did in C#?</p>