January 17th, 2011, 10:03 PM
Simple Pointer issue
New to c++ and windows programming.
int Current_Amount_Of_Groups = 1;
wchar_t *Group_Name = "Name";
a) wchar_t buf;
b) wchar_t *buf= new wchar_t;
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.
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.
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.