I have this code:
Code:
#include <string>
#include <iostream>
using namespace std;

void main() {
    char* sztest = "hello";
    char* retVal = "";
    retVal = strcat(retVal,sztest);
    cout << retVal << endl;
}
Compiling using 'g++ test.cpp'

I run it and get segmentation fault that comes from the strcat.

Now whats wrong with this code?