Click here to Skip to main content
       

C / C++ / MFC

 
Questionhow to hide a column of a listctrl Pinmembercherry7297-Jan-13 1:55 
AnswerRe: how to hide a column of a listctrl PinprotectorPete O'Hanlon7-Jan-13 2:16 
QuestionCreating Non-Rectangular Forms PinmemberLuca D'Amico6-Jan-13 12:38 
SuggestionRe: Creating Non-Rectangular Forms PinmemberDavidCrow6-Jan-13 18:25 
AnswerRe: Creating Non-Rectangular Forms Pinmember«_Superman_»6-Jan-13 18:56 
AnswerRe: Creating Non-Rectangular Forms PinmvpRichard MacCutchan6-Jan-13 23:13 
GeneralRe: Creating Non-Rectangular Forms PinmemberLuca D'Amico7-Jan-13 14:05 
Questionstd::vector problem PinmemberSuper 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 PinmvpCPallini6-Jan-13 8:14 
GeneralRe: std::vector problem PinmemberSuper Lloyd6-Jan-13 12:53 
QuestionStatic link to ATL alwayas fail PinmemberFalconapollo5-Jan-13 0:19 
AnswerRe: Static link to ATL alwayas fail PinmvpRichard MacCutchan5-Jan-13 2:28 
Questionhow to use a work thread write file and the main thread show a carton Pinmembercherry7294-Jan-13 23:12 
SuggestionRe: how to use a work thread write file and the main thread show a carton PinmemberDavidCrow5-Jan-13 12:41 
AnswerRe: how to use a work thread write file and the main thread show a carton PinmemberAlbert Holguin6-Jan-13 7:14 
GeneralRe: how to use a work thread write file and the main thread show a carton Pinmembercherry7296-Jan-13 15:58 
AnswerRe: how to use a work thread write file and the main thread show a carton Pinmember Randor 6-Jan-13 18:39 
QuestioncapDriverConnect displays captured frame in CView PinmemberVaclav_Sal4-Jan-13 17:15 
QuestionWhat is the merit to rewrite memcpy? [modified] Pinmemberecony4-Jan-13 8:31 
AnswerRe: What is the merit to rewrite memcpy? PinmvpRichard MacCutchan4-Jan-13 10:19 
GeneralRe: What is the merit to rewrite memcpy? Pinmemberecony4-Jan-13 11:31 
GeneralRe: What is the merit to rewrite memcpy? Pinmemberjeron14-Jan-13 11:49 
GeneralRe: What is the merit to rewrite memcpy? PinmvpRichard MacCutchan5-Jan-13 2:20 
AnswerRe: What is the merit to rewrite memcpy? Pinmemberjschell6-Jan-13 6:02 
AnswerRe: What is the merit to rewrite memcpy? [modified] PinmemberJoe Woodbury7-Jan-13 11:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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
Web03 | 2.8.141220.1 | Last Updated 18 Dec 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid