Code:
for(int x=0;x<5;x++)
{
char * strVal;
strVal = new char[4];
sprintf(strVal, "%s%d%g", '<', x, '>');
cout<<strVal<<endl;
delete[] strVal;
}
when i compile this there isnt any errors, but at runtime it say "memory could not be read".

any ideas how to fix this problem. Thanks