Click here to Skip to main content
14,358,245 members

ATL / WTL / STL

 
AnswerRe: error - cannot convert parameter 3 from 'char [1024]' to 'wchar_t *' Pin
Subrat 470826612-Sep-14 16:15
memberSubrat 470826612-Sep-14 16:15 
Questionhow to let menu auto show next item when mouse on the bottom arrow of menu Pin
fengforky9-Jul-14 23:53
memberfengforky9-Jul-14 23:53 
AnswerRe: how to let menu auto show next item when mouse on the bottom arrow of menu Pin
Richard MacCutchan10-Jul-14 0:34
protectorRichard MacCutchan10-Jul-14 0:34 
QuestionWCHAR, wstring, initializing and accessing them (RESOLVED) Pin
bkelly131-Jul-14 11:13
memberbkelly131-Jul-14 11:13 
AnswerRe: WCHAR, wstring, initializing and accessing them Pin
Richard MacCutchan2-Jul-14 6:38
protectorRichard MacCutchan2-Jul-14 6:38 
Generalnarrowing the focus a bit Pin
bkelly132-Jul-14 10:59
memberbkelly132-Jul-14 10:59 
GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan2-Jul-14 14:32
protectorRichard MacCutchan2-Jul-14 14:32 
GeneralRe: narrowing the focus a bit Pin
bkelly132-Jul-14 18:00
memberbkelly132-Jul-14 18:00 
Hello Richard,
Re: Your code will be far more flexible if you use dynamic arrays, rather than fixed size ....

That will not work for this project. It is a telemetry project and the data arrives fast and furious. We are collecting data from very expensive missiles that travel very fast.

I tried using an std::map. It made writing the code much easier, but it was definitely far to slow. Too much overhead in the template libraries. When I was testing the std::map, I stepped into the code to fetch an integer. After about a hundred function calls to get that integer I knew that was the problem. The buffers from the sender were overflowing constantly. As soon as I deleted the map and went to a fixed size array, the cpu time of this application went down to about 1%. I started four copies for four different streams on one machine and had no problem.

The wstring is used when I am reading from a file as the tokenizer needs it. The data is saved in WCHAR (wchar_t) and for real time is used in that format.

So, for a re-cap. I want a declaration of N number of WCHAR strings as in:
WCHAR names[ STRING_COUNT ][ SIZE_OF_STRING ];
I have that working.

Then I want a procedure to take the address of that array of strings and hand it to a local pointer as in:

void Set_Local_Pointer( WCHAR * new_pointer[ STRING_COUNT][SIZE_OF_STRING ] )
{ mp_local_pointer = new_pointer; }

What is the right way to declare mp_local_pointer?
Thank you for your time
If you work with telemetry, please check this bulletin board: www.irigbb.com


GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan3-Jul-14 5:17
protectorRichard MacCutchan3-Jul-14 5:17 
GeneralRe: narrowing the focus a bit Pin
bkelly133-Jul-14 18:24
memberbkelly133-Jul-14 18:24 
GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan4-Jul-14 1:36
protectorRichard MacCutchan4-Jul-14 1:36 
GeneralRe: narrowing the focus a bit Pin
bkelly134-Jul-14 2:13
memberbkelly134-Jul-14 2:13 
GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan4-Jul-14 2:45
protectorRichard MacCutchan4-Jul-14 2:45 
GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan4-Jul-14 4:08
protectorRichard MacCutchan4-Jul-14 4:08 
GeneralRe: narrowing the focus a bit Pin
bkelly134-Jul-14 6:02
memberbkelly134-Jul-14 6:02 
GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan4-Jul-14 6:40
protectorRichard MacCutchan4-Jul-14 6:40 
GeneralRe: narrowing the focus a bit Pin
bkelly134-Jul-14 8:07
memberbkelly134-Jul-14 8:07 
GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan4-Jul-14 8:21
protectorRichard MacCutchan4-Jul-14 8:21 
GeneralRe: narrowing the focus a bit Pin
bkelly134-Jul-14 9:20
memberbkelly134-Jul-14 9:20 
GeneralRe: narrowing the focus a bit Pin
Richard MacCutchan4-Jul-14 21:10
protectorRichard MacCutchan4-Jul-14 21:10 
Generalreasons Pin
bkelly135-Jul-14 8:22
memberbkelly135-Jul-14 8:22 
GeneralRe: reasons Pin
Richard MacCutchan6-Jul-14 5:44
protectorRichard MacCutchan6-Jul-14 5:44 
GeneralRe: reasons Pin
bkelly137-Jul-14 15:03
memberbkelly137-Jul-14 15:03 
GeneralRe: reasons Pin
Richard MacCutchan7-Jul-14 23:04
protectorRichard MacCutchan7-Jul-14 23:04 
Questionfriend declaration causes undeclared identifier Pin
bkelly1330-Jun-14 6:55
memberbkelly1330-Jun-14 6:55 

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.