Click here to Skip to main content
15,506,981 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
AnswerRe: WCHAR, wstring, initializing and accessing them Pin
Richard MacCutchan2-Jul-14 6:38
mveRichard MacCutchan2-Jul-14 6:38 
Generalnarrowing the focus a bit Pin
bkelly132-Jul-14 10:59
bkelly132-Jul-14 10:59 
GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan2-Jul-14 14:32
mveRichard MacCutchan2-Jul-14 14:32 
GeneralRe: narrowing the focus a bit Pin
bkelly132-Jul-14 18:00
bkelly132-Jul-14 18:00 
GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan3-Jul-14 5:17
mveRichard MacCutchan3-Jul-14 5:17 
GeneralRe: narrowing the focus a bit Pin
bkelly133-Jul-14 18:24
bkelly133-Jul-14 18:24 
GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan4-Jul-14 1:36
mveRichard MacCutchan4-Jul-14 1:36 
GeneralRe: narrowing the focus a bit Pin
bkelly134-Jul-14 2:13
bkelly134-Jul-14 2:13 
Well that was rather stupid on my part. This is what I want to accomplish in the procedure:
C#
void Set_Pointer( wchar_t *new_pointer)
{
    wchar_t *local_pointer;
    wchar_t one[   MAX_NAME_SIZE ];
    wchar_t two[   MAX_NAME_SIZE ];
    wchar_t three[ MAX_NAME_SIZE ];
    wchar_t four[  MAX_NAME_SIZE ];

    local_pointer = new_pointer;

    wcscpy_s( one,   MAX_NAME_SIZE, local_pointer    ); // OK
    wcscpy_s( two,   MAX_NAME_SIZE, local_pointer[1] ); // cannot convert
    wcscpy_s( three, MAX_NAME_SIZE, local_pointer[2] ); // cannot convert
    wcscpy_s( four,  MAX_NAME_SIZE, local_pointer[3] ); // cannot convert
};

The three lines that cannot convert have the error:
Quote:
Error 1 error C2664: 'errno_t wcscpy_s(wchar_t *,rsize_t,const wchar_t *)' : cannot convert parameter 3 from 'wchar_t' to 'const wchar_t *'


The caller is to pass a pointer to an array defined in the manner
wchar_t  some_array[ x ] [ y ];

where x and y are named constants.
What needs to be done?
Thank you for your time
If you work with telemetry, please check this bulletin board: www.irigbb.com



modified 4-Jul-14 7:23am.

GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan4-Jul-14 2:45
mveRichard MacCutchan4-Jul-14 2:45 
GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan4-Jul-14 4:08
mveRichard MacCutchan4-Jul-14 4:08 
GeneralRe: narrowing the focus a bit Pin
bkelly134-Jul-14 6:02
bkelly134-Jul-14 6:02 
GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan4-Jul-14 6:40
mveRichard MacCutchan4-Jul-14 6:40 
GeneralRe: narrowing the focus a bit Pin
bkelly134-Jul-14 8:07
bkelly134-Jul-14 8:07 
GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan4-Jul-14 8:21
mveRichard MacCutchan4-Jul-14 8:21 
GeneralRe: narrowing the focus a bit Pin
bkelly134-Jul-14 9:20
bkelly134-Jul-14 9:20 
GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan4-Jul-14 21:10
mveRichard MacCutchan4-Jul-14 21:10 
Generalreasons Pin
bkelly135-Jul-14 8:22
bkelly135-Jul-14 8:22 
GeneralRe: reasons Pin
Richard MacCutchan6-Jul-14 5:44
mveRichard MacCutchan6-Jul-14 5:44 
GeneralRe: reasons Pin
bkelly137-Jul-14 15:03
bkelly137-Jul-14 15:03 
GeneralRe: reasons Pin
Richard MacCutchan7-Jul-14 23:04
mveRichard MacCutchan7-Jul-14 23:04 
Questionfriend declaration causes undeclared identifier Pin
bkelly1330-Jun-14 6:55
bkelly1330-Jun-14 6:55 
AnswerRe: friend declaration causes undeclared identifier Pin
Subrat 470826612-Sep-14 16:20
Subrat 470826612-Sep-14 16:20 
Questiondestructor not being called (Resolved) Pin
bkelly1326-Jun-14 17:17
bkelly1326-Jun-14 17:17 
AnswerRe: destructor not being called Pin
Orjan Westin26-Jun-14 23:26
professionalOrjan Westin26-Jun-14 23:26 
GeneralRe: destructor not being called Pin
bkelly1327-Jun-14 14:06
bkelly1327-Jun-14 14:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.