Click here to Skip to main content
15,896,278 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: what is the result(union & structure)? Pin
CPallini14-Dec-11 2:33
mveCPallini14-Dec-11 2:33 
GeneralRe: what is the result(union & structure)? Pin
Richard MacCutchan14-Dec-11 2:40
mveRichard MacCutchan14-Dec-11 2:40 
GeneralRe: what is the result(union & structure)? Pin
CPallini14-Dec-11 2:42
mveCPallini14-Dec-11 2:42 
AnswerRe: what is the result(union & structure)? Pin
Stefan_Lang14-Dec-11 5:34
Stefan_Lang14-Dec-11 5:34 
GeneralRe: what is the result(union & structure)? Pin
CPallini15-Dec-11 10:10
mveCPallini15-Dec-11 10:10 
QuestionHow to Convert vector::reference to vector::iterator ? Pin
002comp13-Dec-11 20:21
002comp13-Dec-11 20:21 
AnswerRe: How to Convert vector::reference to vector::iterator ? Pin
Chris Losinger14-Dec-11 2:22
professionalChris Losinger14-Dec-11 2:22 
AnswerRe: How to Convert vector::reference to vector::iterator ? Pin
Stefan_Lang14-Dec-11 5:40
Stefan_Lang14-Dec-11 5:40 
You can't. The type of vector<T>::reference is T&, and has no reference to the original vector object, only to one element of type T.

The only way to assign an iterator is either through one of the methods of vector, or by assigning another iterator.

If you want an iterator to the last element, you can do this:
C++
std::vector<int> myvector(5); // 5 elements
std::vector::iterator last = myvector.end(); // points past the last element
--last; // now points at the last element


P.S.: after rereading your question I think I may have misinterpreted your question. If this isn't what you wanted and need more help, please clarify.
GeneralRe: How to Convert vector::reference to vector::iterator ? Pin
002comp14-Dec-11 17:30
002comp14-Dec-11 17:30 
Questionhow to test a compressed file in MFC? Pin
Le@rner13-Dec-11 20:20
Le@rner13-Dec-11 20:20 
AnswerRe: how to test a compressed file in MFC? Pin
Richard MacCutchan13-Dec-11 22:09
mveRichard MacCutchan13-Dec-11 22:09 
GeneralRe: how to test a compressed file in MFC? Pin
Le@rner13-Dec-11 23:52
Le@rner13-Dec-11 23:52 
GeneralRe: how to test a compressed file in MFC? Pin
Richard MacCutchan14-Dec-11 0:08
mveRichard MacCutchan14-Dec-11 0:08 
GeneralRe: how to test a compressed file in MFC? Pin
Le@rner14-Dec-11 0:35
Le@rner14-Dec-11 0:35 
GeneralRe: how to test a compressed file in MFC? Pin
Richard MacCutchan14-Dec-11 0:38
mveRichard MacCutchan14-Dec-11 0:38 
GeneralRe: how to test a compressed file in MFC? Pin
Le@rner14-Dec-11 0:46
Le@rner14-Dec-11 0:46 
QuestionRe: how to test a compressed file in MFC? Pin
David Crow14-Dec-11 3:34
David Crow14-Dec-11 3:34 
AnswerRe: how to test a compressed file in MFC? Pin
Le@rner14-Dec-11 17:16
Le@rner14-Dec-11 17:16 
QuestionRe: how to test a compressed file in MFC? Pin
David Crow15-Dec-11 2:07
David Crow15-Dec-11 2:07 
QuestionMessure function execution time Pin
columbos1492713-Dec-11 1:40
columbos1492713-Dec-11 1:40 
AnswerRe: Messure function execution time Pin
enhzflep13-Dec-11 1:48
enhzflep13-Dec-11 1:48 
GeneralRe: Messure function execution time Pin
columbos1492713-Dec-11 2:09
columbos1492713-Dec-11 2:09 
AnswerRe: Messure function execution time Pin
Stefan_Lang13-Dec-11 2:29
Stefan_Lang13-Dec-11 2:29 
JokeRe: Messure function execution time Pin
Code-o-mat13-Dec-11 5:12
Code-o-mat13-Dec-11 5:12 
QuestionProblem with owner drawn listbox and double buffering Pin
aangerma13-Dec-11 1:26
aangerma13-Dec-11 1:26 

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.