I'm going to compile a very simple code on onlinegdb.com
The code is as below.
#include <stdio.h>
#include <string.h>
int main()
{
char s[10] = {0};
strcpy_s(s, 10, "1234567890");
printf("%s", s);
return 0;
}
I chose option Language as C++
, C++14
and C++17
, but all those are not compiling strcpy_s
.
It says:
main.cpp: In function ‘int main()’:
main.cpp:16:33: error: ‘strcpy_s’ was not declared in this scope
strcpy_s(s, 10, "1234567890");
^
I googled minutes, but there was no answer.
Doesn't gdb online support c compiler above c++11 ? Help me please. Thanks.
Aucun commentaire:
Enregistrer un commentaire