tags:

views:

64

answers:

5

I know lstrcpy is used for string copy for both unicode and ascii, But I can not use lstrncpy, because I can't find the head file. What is the name of the head file, I googled it, and find someone is using it. Many thanks!

+1  A: 

As per the MSDN docs include Windows.h

heavyd
A: 

If you know the length anyway, you can simply use memcpy (..., length * sizeof (char_type)); which will work for any character type.

Anteru
A: 

you must use strsafe.h or just include windows.h

dfa
A: 

If you are asking about the Windows lstrcpy() function, it is declared in winbase.h, which normally gets included via windows.h

anon
Woops think you just pipped me to the post!...no pun intended
James
+1  A: 

It is delcared in Winbase.h you need to include Windows.h

James.

James