Strncat Problem

Well I have this:

1
2
LPSTR cpSiteToSearch = "http://www.google.com/search?hl=en&source=hp&biw=1366&bih=601&q=";
strncat (cpSiteToSearch, input, strlen (cpSiteToSearch) + strlen (input));


input is used like this a little bit before:

1
2
TCHAR input [256];
GetWindowText (GetDlgItem (hwnd, INPUT_CONTROL), input, 256);


I used MessageBox (0,0,0,0); right after these lines to see what would happen and it was never used.

What I am trying to do is add the input to "http://www.google.com/search?hl=en&source=hp&biw=1366&bih=601&q=" and then I use shellexecute to open what ever they searched.

Any help please? Thanks ! :D
You haven't actually said what the problem is.
When I use this is doesn't add anything. And when I added the Messagebox right after the strncat line nothing happened. It like, stopped right at the strncat line.
You're appending to cpSiteToSearch, not input.
http://opengroup.org/onlinepubs/007908799/xsh/strncat.html
Topic archived. No new replies allowed.