Click here to Skip to main content
15,895,709 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
AnswerRe: Program for implementing Quine McCluskey's method for 8,9 or 10 variables Pin
Richard MacCutchan24-Aug-14 21:52
mveRichard MacCutchan24-Aug-14 21:52 
QuestionProgram for implementing Quine McCluskey's method for 8,9 or 10 variables Pin
Member 1103323724-Aug-14 16:38
Member 1103323724-Aug-14 16:38 
AnswerRe: Program for implementing Quine McCluskey's method for 8,9 or 10 variables Pin
Richard MacCutchan24-Aug-14 21:52
mveRichard MacCutchan24-Aug-14 21:52 
Questionunexpected address value in WSABUF ( RESOLVED ) Pin
bkelly1311-Aug-14 13:34
bkelly1311-Aug-14 13:34 
QuestionRe: unexpected address value in WSABUF Pin
Richard MacCutchan11-Aug-14 21:25
mveRichard MacCutchan11-Aug-14 21:25 
AnswerRe: unexpected address value in WSABUF Pin
bkelly1312-Aug-14 1:51
bkelly1312-Aug-14 1:51 
GeneralRe: unexpected address value in WSABUF Pin
Richard MacCutchan12-Aug-14 3:36
mveRichard MacCutchan12-Aug-14 3:36 
GeneralRe: unexpected address value in WSABUF Pin
bkelly1312-Aug-14 5:42
bkelly1312-Aug-14 5:42 
GeneralRe: unexpected address value in WSABUF Pin
Richard MacCutchan12-Aug-14 20:48
mveRichard MacCutchan12-Aug-14 20:48 
GeneralRe: unexpected address value in WSABUF Pin
bkelly1313-Aug-14 1:53
bkelly1313-Aug-14 1:53 
GeneralRe: unexpected address value in WSABUF Pin
Richard MacCutchan12-Aug-14 4:54
mveRichard MacCutchan12-Aug-14 4:54 
AnswerMoving on to WSASend Pin
bkelly1313-Aug-14 10:33
bkelly1313-Aug-14 10:33 
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 
Visual Studio 2008, C++
Class C_AR2_Messages process telemetry messages. The configuration is quite complex so class C_Configuration_Manager reads a configuration file and loads the data into the structures/variable of C_AR2_Messages.
Please note that my work is on a classified computer and I cannot cut and paste from there to here. I probably put in a few typos. Please note them, but take that into consideration.

The message class contains:
CSS
The messages class contains
Class C_AR2_Messages
{ …
WCHAR m_common_parameter_names _NAMES[ COMMON_ARRAY_SIZE  ][  MAX_PARAMETER_NAME_LENGTH ];

All the below fail compile but to me, they match the examples I have found in my searches.  Two of them claim that the open brace is a syntax error.
WCHAR m_test[ ] [ ] = { {L"one"}, { L"two" }, { L"three" } };
WCHAR m_test_2[ 3 ] [8 ] = { {L"one"}, { L"two" }, { L"three" } };
Wstring m_test_3[ ]          = { L"one", L"two", L"three" };


Meanwhile back in class C_Configuration_Manager.h, there is a method used to hand that class the pointer giving it access. It looks like:

Class C_Configuration_Manager
{ …	
VOID  Set_Common_Names_Pointer( WCHAR  *new_pointer[COMMON_ARRAY_SIZE  ][ MAX_PARAMETER_NAME_LENGTH ] );
// and the local pointer
WCHAR mp_common_parameter_names[COMMON_ARRAY_SIZE  ][ MAX_PARAMETER_NAME_LENGTH ];


and C_Configuration_Manager.cpp contains:
VOID  Set_Common_Names_Pointer( WCHAR  *new_pointer[COMMON_ARRAY_SIZE  ][ MAX_PARAMETER_NAME_LENGTH ] )
{ mp_common_parameter_names = new_pointer; }

The compiler says:
Quote:
Error C2440: ‘=’ cannot convert from WCHAR *[] [34] to ‘WCHAR *[18][34]


To my knowledge, both are declared as [18][34]

So having failed on two fronts, I open a third front in this war by editing C_AR2_Messages with
VB
Class C_AR2_Messages
{ …
Friend class C_Configuration_Manager;


Then back in C_Configuration_Manager.cpp added this to access those member variables in C_AR2_Messages

CSS
Wstring test1 = common_parameter_names[ 0 ] [ 0 ];
Wstring test1 = C_Configuration_Manager ::common_parameter_names[ 0 ] [ 0 ];


So I have failed on all three attempts to gain access to that data in the configuration class. Will someone provide the knowledge I need to accomplish this task?
Thank you for your time
If you work with telemetry, please check this bulletin board: www.irigbb.com



modified 7-Jul-14 19:57pm.

AnswerRe: WCHAR, wstring, initializing and accessing them Pin
Richard MacCutchan2-Jul-14 5:38
mveRichard MacCutchan2-Jul-14 5:38 

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.