Crash while trying to concatenate two strings
<pre><code>#include&lt;iostream&gt;

using namespace std;

char *concat(char *string1,char *string2)
{
          char *stringfinal=new char[strlen(string1)+strlen(string2)+2];
          stringfinal=string1;
          char *dest=new char[strlen(string1)+strlen(string2)+2];
          dest = stringfinal;
          while(*dest != '\0')
          {
                      dest++;
          }

          *dest=' ';  // Point 1


          while(*string2 != '\0')        
               *dest++=*string2++;  //Point2
          *dest='\0';
          return stringfinal; 

}

int main()
{

    char *str1="Anurag";
    char *str2="Jain";

    char *strfinal = new char[strlen(str1)+strlen(str2)+2];
    strfinal=concat(str1,str2);

    cout&lt;&lt;strfinal;
    cin.get();

}
</code></pre>
