Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which header file should I include for using _swprintf_s()?

When I used _swprintf(), it said it might be unsafe and I should use _swprintf_s instead.

But when I used _swprintf_s(), it said

error C3861: '_swprintf_s': identifier not found

Which header am I missing? I

like image 360
thorvald Avatar asked Dec 01 '10 04:12

thorvald


People also ask

Which header file must be included in a code to use file functions?

Standard library header files: These are those header files that are already present in the compiler of C++; you just need to import them to use them. User-defined header files: These are those header files defined by the user and can be used by including them in the program using #include.

How do I include a header file?

You make the declarations in a header file, then use the #include directive in every . cpp file or other header file that requires that declaration. The #include directive inserts a copy of the header file directly into the . cpp file prior to compilation.

Which header file must be included for programming in Windows?

Every C program should necessarily contain the header file <stdio. h> which stands for standard input and output used to take input with the help of scanf() function and display the output using printf() function.


1 Answers

It is swprintf() and swprintf_s(). No leading underscore.

like image 193
Hans Passant Avatar answered Nov 15 '22 07:11

Hans Passant