Hello,
First of all, I want to ignore the Enter and get the name from the input.
Second why the below syntax doesn't work? I have to use strcopy.
ch_arr_result[z] = ch_arr_first[i];
you don't have any strings.
a string looks like this
string s;
string a;
s = "hello world";
a = s;
you are using what we call C-strings, which is what the C language uses but c++ allows them (c++ allows over 95% of C even when its not the best way to do code).
c++ does not allow you to copy arrays with an equals sign. you can do that with vectors, but not arrays. This is why it didn't work: a C-string is just an array.
<cstdio> is the c++ header, you are using the C header.
printf, scanf, etc are also C. where are you getting this stuff? Your book or examples or something are teaching you C, or worse, 1980s era style C++ which is C with a couple of additions.
If you are actually TRYING to learn and write C, then
#include <string>
using namespace std;
those are c++ and have to go. Its ok to learn C, and we can even help some, but say so up front if that is a goal.
When you want to use C string library functions #include <string.h> in C code. Use #include <cstring> when writing C++ code when using the C string library functions.
The C string library function strcpy_s requires your compiler to be able to use the C11 (or later?) standard.