Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

concat problem

hey guys, when i do this

_fstrcpy(data, strcat(data, "hi")); it works fine

when i do this, it also works fine
lstrcpy(data, result); (with result being some data)

but with this i do this, i get error when i call the function from my mirc

lstrcpy(data, strcat("hi", result));

i want to concat "hi" to the beginning of the result, and put it into data to send back to mirc.. but it mIRC doesnt seem to like it, this works though

lstrcpy(data, strcat(result, "hi")); (but i want to concat "hi" at the begninning not the end)

*edit, i even tried lstrcpy(data, "hi" + result);
but that gives error saying it can't add 2 pointers
[700 byte] By [pouncer] at [2007-11-11 7:48:31]
# 1 Re: concat problem
syntax of strcat function
char *strcat( char *strDestination, const char *strSource );

you can not have a constant quantity as first parameter
Nokia2280 at 2007-11-11 21:01:48 >