Click here to Skip to main content
12,246,000 members (40,227 online)

C / C++ / MFC

 
QuestionIcon/Bitmap missing in 1st control (MFC dialog) Pin
_jg_7-Jan-13 23:52
member_jg_7-Jan-13 23:52 
QuestionThe task runtime question of RTOS. Pin
econy7-Jan-13 6:22
memberecony7-Jan-13 6:22 
AnswerRe: The task runtime question of RTOS. Pin
jeron17-Jan-13 6:35
memberjeron17-Jan-13 6:35 
AnswerRe: The task runtime question of RTOS. Pin
Joe Woodbury7-Jan-13 11:28
memberJoe Woodbury7-Jan-13 11:28 
GeneralTreeview After Select Event Pin
Varun Pandey7-Jan-13 3:49
memberVarun Pandey7-Jan-13 3:49 
GeneralRe: Treeview After Select Event Pin
jeron17-Jan-13 6:08
memberjeron17-Jan-13 6:08 
Questionhow to hide a column of a listctrl Pin
cherry7297-Jan-13 1:55
membercherry7297-Jan-13 1:55 
AnswerRe: how to hide a column of a listctrl Pin
Pete O'Hanlon7-Jan-13 2:16
protectorPete O'Hanlon7-Jan-13 2:16 
QuestionCreating Non-Rectangular Forms Pin
Luca D'Amico6-Jan-13 12:38
memberLuca D'Amico6-Jan-13 12:38 
SuggestionRe: Creating Non-Rectangular Forms Pin
DavidCrow6-Jan-13 18:25
memberDavidCrow6-Jan-13 18:25 
AnswerRe: Creating Non-Rectangular Forms Pin
«_Superman_»6-Jan-13 18:56
member«_Superman_»6-Jan-13 18:56 
AnswerRe: Creating Non-Rectangular Forms Pin
Richard MacCutchan6-Jan-13 23:13
mvpRichard MacCutchan6-Jan-13 23:13 
GeneralRe: Creating Non-Rectangular Forms Pin
Luca D'Amico7-Jan-13 14:05
memberLuca D'Amico7-Jan-13 14:05 
Questionstd::vector problem Pin
Super Lloyd6-Jan-13 2:21
memberSuper Lloyd6-Jan-13 2:21 
I have a function which return an std::vector<T>
it is quite big and moved around a lot and kept for a long time, so I put it into a
std::shared_ptr<std::vector<T>>

Now I need to access the vector as an array
with
std::vector<T> a;
I can write
T* pa = &a[0];

But this doesn't work with a std::shared_ptr<std::vector<T>>

What can I do?

Remark
Why don't I just pass it by reference around?
Well, it is created in a function, and then it is captured by a lambda that is spawn regularly into a task (i.e. in another thread) which would be the only reference left.
And I want to avoid copying the vector (it is big) and destructing when it goes out of scope, I want to create it only once and reuse it / keep it alive!...
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.

AnswerRe: std::vector problem Pin
CPallini6-Jan-13 8:14
mvpCPallini6-Jan-13 8:14 
GeneralRe: std::vector problem Pin
Super Lloyd6-Jan-13 12:53
memberSuper Lloyd6-Jan-13 12:53 
QuestionStatic link to ATL alwayas fail Pin
Falconapollo5-Jan-13 0:19
memberFalconapollo5-Jan-13 0:19 
AnswerRe: Static link to ATL alwayas fail Pin
Richard MacCutchan5-Jan-13 2:28
mvpRichard MacCutchan5-Jan-13 2:28 
Questionhow to use a work thread write file and the main thread show a carton Pin
cherry7294-Jan-13 23:12
membercherry7294-Jan-13 23:12 
SuggestionRe: how to use a work thread write file and the main thread show a carton Pin
DavidCrow5-Jan-13 12:41
memberDavidCrow5-Jan-13 12:41 
AnswerRe: how to use a work thread write file and the main thread show a carton Pin
Albert Holguin6-Jan-13 7:14
memberAlbert Holguin6-Jan-13 7:14 
GeneralRe: how to use a work thread write file and the main thread show a carton Pin
cherry7296-Jan-13 15:58
membercherry7296-Jan-13 15:58 
AnswerRe: how to use a work thread write file and the main thread show a carton Pin
Randor 6-Jan-13 18:39
member Randor 6-Jan-13 18:39 
QuestioncapDriverConnect displays captured frame in CView Pin
Vaclav_Sal4-Jan-13 17:15
memberVaclav_Sal4-Jan-13 17:15 
QuestionWhat is the merit to rewrite memcpy? Pin
econy4-Jan-13 8:31
memberecony4-Jan-13 8:31 
AnswerRe: What is the merit to rewrite memcpy? Pin
Richard MacCutchan4-Jan-13 10:19
mvpRichard MacCutchan4-Jan-13 10:19 
GeneralRe: What is the merit to rewrite memcpy? Pin
econy4-Jan-13 11:31
memberecony4-Jan-13 11:31 
GeneralRe: What is the merit to rewrite memcpy? Pin
jeron14-Jan-13 11:49
memberjeron14-Jan-13 11:49 
GeneralRe: What is the merit to rewrite memcpy? Pin
Richard MacCutchan5-Jan-13 2:20
mvpRichard MacCutchan5-Jan-13 2:20 
AnswerRe: What is the merit to rewrite memcpy? Pin
jschell6-Jan-13 6:02
memberjschell6-Jan-13 6:02 
AnswerRe: What is the merit to rewrite memcpy? Pin
Joe Woodbury7-Jan-13 11:15
memberJoe Woodbury7-Jan-13 11:15 
QuestionWhat is the benefit using duplicate loop statement [solved] Pin
econy4-Jan-13 5:53
memberecony4-Jan-13 5:53 
AnswerRe: What is the benefit using duplicate loop statement Pin
jeron14-Jan-13 6:29
memberjeron14-Jan-13 6:29 
GeneralRe: What is the benefit using duplicate loop statement Pin
econy4-Jan-13 7:37
memberecony4-Jan-13 7:37 
GeneralRe: What is the benefit using duplicate loop statement Pin
jeron14-Jan-13 7:58
memberjeron14-Jan-13 7:58 
GeneralRe: What is the benefit using duplicate loop statement Pin
econy4-Jan-13 8:21
memberecony4-Jan-13 8:21 
GeneralRe: What is the benefit using duplicate loop statement Pin
Richard MacCutchan4-Jan-13 7:59
mvpRichard MacCutchan4-Jan-13 7:59 
AnswerRe: What is the benefit using duplicate loop statement [solved] Pin
CPallini7-Jan-13 0:09
mvpCPallini7-Jan-13 0:09 
AnswerRe: What is the benefit using duplicate loop statement [solved] Pin
Joe Woodbury7-Jan-13 11:19
memberJoe Woodbury7-Jan-13 11:19 
QuestionIt's too slow to use the DrawDibDraw to draw a frame. Pin
yu-jian4-Jan-13 4:31
groupyu-jian4-Jan-13 4:31 
Questionhow to create font by unicode value? Pin
Falconapollo4-Jan-13 2:30
memberFalconapollo4-Jan-13 2:30 
AnswerRe: how to create font by unicode value? Pin
Richard MacCutchan4-Jan-13 4:23
mvpRichard MacCutchan4-Jan-13 4:23 
Questionwhen writing file,dispaly a animation with avi Pin
cherry7293-Jan-13 23:51
membercherry7293-Jan-13 23:51 
AnswerRe: when writing file,dispaly a animation with avi Pin
Rajesh R Subramanian4-Jan-13 1:04
memberRajesh R Subramanian4-Jan-13 1:04 
GeneralRe: when writing file,dispaly a animation with avi Pin
cherry7294-Jan-13 15:34
membercherry7294-Jan-13 15:34 
QuestionMS Visual Studio Express 2010, Cygwin, Eclipse together Pin
trinh.nguyen3-Jan-13 15:39
membertrinh.nguyen3-Jan-13 15:39 
AnswerRe: MS Visual Studio Express 2010, Cygwin, Eclipse together Pin
April Fans3-Jan-13 18:42
memberApril Fans3-Jan-13 18:42 
AnswerRe: MS Visual Studio Express 2010, Cygwin, Eclipse together Pin
Richard MacCutchan3-Jan-13 23:33
mvpRichard MacCutchan3-Jan-13 23:33 
Questiona "new" operator failed Pin
a_matseevsky3-Jan-13 8:41
membera_matseevsky3-Jan-13 8:41 
AnswerRe: a "new" operator failed Pin
jschell3-Jan-13 9:06
memberjschell3-Jan-13 9: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.


Advertise | Privacy | Mobile
Web02 | 2.8.160426.1 | Last Updated 2 May 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid