Hello hlcoders,
Hi! I never used strings in C++ (I am native Delphi programmer :) ) and now I have a
problem :(
I need to print string to console, which depends on integer value.
I want to make such thing
case n of
1: s:='One';
2: s:='Two';
...
end;
in a procedure. So I have such code:
char szMes;
ReturnTestString(szMes,m_iValue);
gHUD.DrawHudString( x+5, y+4, ScreenWidth, szMes, 255, 255, 0 );
and it causes HL to crash. Here is beginning of ReturnTestString
function:
void ReturnTestString(char* &szSring,int Id)
{
switch(Id){
case 0:
sprintf(szHint,"One");
break;
case 1:
...
}
}
please, correct my mistake, cos I don't know C++ syntax very good :(
--
Vyacheslav 'Hoaxer' Djura
Programmer
Wrench Software (www.wrenchsoftware.com)
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders