Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3029

wcscpy_s problem

$
0
0
What am I doing wrong here..?

Code:

// Needed for wcscpy_s
#include <string.h>

// Later in the code
 wcscpy_s (some_destination, L"Hello World");

The above code gives me error C2660: 'wcscpy_s': function does not take 2 arguments

But it does take 2 arguments according to MSDN :confused:

[Edit...] Apologies - it's wcscpy that takes 2 arguments, not wcscpy_s. Does anyone have an example of how to use wcscpy_s? Everything I've tried so far has produced a runtime exception :cry:

[Edit2...] Groan... apparently there's a template version of wcscpy_s which DOES take 2 arguments (and that one seems to work for me...)

Viewing all articles
Browse latest Browse all 3029

Latest Images

Trending Articles



Latest Images