Adrian Fâciu
Adrian Fâciu

Reputation: 12552

C++ Concatenate

What's the best way (best practice) to append one LPWSTR/LPTSTR to another, without having to convert to something else?

Upvotes: 1

Views: 2980

Answers (2)

matekm
matekm

Reputation: 6030

LPSTR == char* so You could just use strncat

with LPWSTR instead of strncat use just wcsncat

http://msdn.microsoft.com/en-us/library/tbyd7s1y.aspx

Upvotes: 1

James McNellis
James McNellis

Reputation: 355009

You will probably want to use strcat_s and friends, which are length-checked versions of strcat and friends.

Upvotes: 5

Related Questions