Click here to Skip to main content
15,879,326 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Moving on to WSASend Pin
Richard MacCutchan13-Aug-14 22:08
mveRichard MacCutchan13-Aug-14 22:08 
GeneralRe: Moving on to WSASend Pin
bkelly1314-Aug-14 3:19
bkelly1314-Aug-14 3:19 
GeneralRe: Moving on to WSASend Pin
Richard MacCutchan14-Aug-14 3:30
mveRichard MacCutchan14-Aug-14 3:30 
GeneralRe: Moving on to WSASend Pin
bkelly1314-Aug-14 3:52
bkelly1314-Aug-14 3:52 
QuestionCreating Classes in VS 2013 Pin
Bram van Kampen9-Aug-14 15:22
Bram van Kampen9-Aug-14 15:22 
AnswerRe: Creating Classes in VS 2013 Pin
Richard Andrew x649-Aug-14 17:50
professionalRichard Andrew x649-Aug-14 17:50 
Questionerror - cannot convert parameter 3 from 'char [1024]' to 'wchar_t *' Pin
Swap95-Aug-14 21:40
Swap95-Aug-14 21:40 
AnswerRe: error - cannot convert parameter 3 from 'char [1024]' to 'wchar_t *' Pin
Richard MacCutchan5-Aug-14 22:34
mveRichard MacCutchan5-Aug-14 22:34 
AnswerRe: error - cannot convert parameter 3 from 'char [1024]' to 'wchar_t *' Pin
Subrat 470826612-Sep-14 15:15
Subrat 470826612-Sep-14 15:15 
Questionhow to let menu auto show next item when mouse on the bottom arrow of menu Pin
fengforky9-Jul-14 22:53
fengforky9-Jul-14 22:53 
AnswerRe: how to let menu auto show next item when mouse on the bottom arrow of menu Pin
Richard MacCutchan9-Jul-14 23:34
mveRichard MacCutchan9-Jul-14 23:34 
QuestionWCHAR, wstring, initializing and accessing them (RESOLVED) Pin
bkelly131-Jul-14 10:13
bkelly131-Jul-14 10:13 
AnswerRe: WCHAR, wstring, initializing and accessing them Pin
Richard MacCutchan2-Jul-14 5:38
mveRichard MacCutchan2-Jul-14 5:38 
Generalnarrowing the focus a bit Pin
bkelly132-Jul-14 9:59
bkelly132-Jul-14 9:59 
GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan2-Jul-14 13:32
mveRichard MacCutchan2-Jul-14 13:32 
GeneralRe: narrowing the focus a bit Pin
bkelly132-Jul-14 17:00
bkelly132-Jul-14 17:00 
GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan3-Jul-14 4:17
mveRichard MacCutchan3-Jul-14 4:17 
GeneralRe: narrowing the focus a bit Pin
bkelly133-Jul-14 17:24
bkelly133-Jul-14 17:24 
GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan4-Jul-14 0:36
mveRichard MacCutchan4-Jul-14 0:36 
I explained in my previous message why line 12 will not compile, local_pointer is not a pointer it is an array. You cannot set an array equal to another array, you can only copy the content from one to another. Your use of the term pointer in some of your variable names is helping to confuse the issue, as they are not pointers.
So your code should be:
C++
//  don't use pointer as a name for an array
    wchar_t local_array[ COMMON_ARRAY_SIZE ][ MAX_NAME_SIZE ];

//  copy elements one at a time
    wcscpy_s(local_array[0], MAX_NAME_SIZE, new_pointer[0]); // etc

//  or copy the entire array
    memcpy(local_array, new_pointer, COMMON_ARRAY_SIZE * MAX_NAME_SIZE);   // as previously suggested

If you want to use pointers then you must remember that all you are doing is keeping a pointer to the original data array in memory like:
C++
wchar_t* local_pointer; // this is a pointer

local_pointer = new_pointer; //  local_pointer now holds the address of the original data

So you must now ensure that that original data is not overwritten.
GeneralRe: narrowing the focus a bit Pin
bkelly134-Jul-14 1:13
bkelly134-Jul-14 1:13 
GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan4-Jul-14 1:45
mveRichard MacCutchan4-Jul-14 1:45 
GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan4-Jul-14 3:08
mveRichard MacCutchan4-Jul-14 3:08 
GeneralRe: narrowing the focus a bit Pin
bkelly134-Jul-14 5:02
bkelly134-Jul-14 5:02 
GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan4-Jul-14 5:40
mveRichard MacCutchan4-Jul-14 5:40 
GeneralRe: narrowing the focus a bit Pin
bkelly134-Jul-14 7:07
bkelly134-Jul-14 7:07 

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.