New to c++ and windows programming.

int Current_Amount_Of_Groups = 1;
wchar_t *Group_Name = "Name";

a) wchar_t buf[30];

b) wchar_t *buf= new wchar_t[30];

swprintf_s( buf, 30, L"%i", Current_Amount_Of_Groups );
wcsncat_s( buf, Group_Name),10);

When I use a) the wsprintf_s and wcsncat_s functions work fine, but when I use b) the swprintf_s works and wcsncat_s does not.

My issue:
I thought by using a) and inputting buf to wcsncat_s was inputting a pointer to an array. So why am I having an issue using b) by inputting a pointer to an array? see my problem?

P.S compiler says: No Instance of overloaded function "wcsncat_s" matches the argument list.