Click here to Skip to main content
15,905,558 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Using Created() CListBox Pin
gokings4-Aug-04 5:24
gokings4-Aug-04 5:24 
GeneralRe: Using Created() CListBox Pin
David Crow4-Aug-04 5:58
David Crow4-Aug-04 5:58 
GeneralRe: Using Created() CListBox Pin
gokings5-Aug-04 22:08
gokings5-Aug-04 22:08 
GeneralRe: Using Created() CListBox Pin
cmk4-Aug-04 10:04
cmk4-Aug-04 10:04 
GeneralWindow size when dockingbar present Pin
_anil_4-Aug-04 3:44
_anil_4-Aug-04 3:44 
GeneralArrays! Pin
CreepingFeature4-Aug-04 2:58
CreepingFeature4-Aug-04 2:58 
GeneralRe: Arrays! Pin
Antony M Kancidrowski4-Aug-04 3:06
Antony M Kancidrowski4-Aug-04 3:06 
GeneralRe: Arrays! Pin
Jaime Stuardo4-Aug-04 3:35
Jaime Stuardo4-Aug-04 3:35 
GeneralRe: Arrays! Pin
Per Nilsson4-Aug-04 4:08
Per Nilsson4-Aug-04 4:08 
GeneralRe: Arrays! Pin
V.4-Aug-04 3:43
professionalV.4-Aug-04 3:43 
GeneralRe: Arrays! Pin
Tim Smith4-Aug-04 3:55
Tim Smith4-Aug-04 3:55 
GeneralRe: Arrays! Pin
Tim Smith4-Aug-04 3:57
Tim Smith4-Aug-04 3:57 
GeneralRe: Arrays! Pin
digwizfox4-Aug-04 6:16
digwizfox4-Aug-04 6:16 
GeneralSTL iterators and post/pre incrementing Pin
Jim Crafton4-Aug-04 2:49
Jim Crafton4-Aug-04 2:49 
Someone on the VCF forums posted this, which I found a little strange, and was wondering if anyone here knew anything more:

"Also, when iterating an STL iterator, pre-increment (++it) should be preferred to post-increment (it++) as the latter creates a copy of the iterator."

Is this really true?

If I have code like:
vector<int> vec;
//populate vec
vector<int>::iterator it = vec.begin();
while ( it != vec.end() ) {
  int& i = *it;
  i = i * 45;
  it ++;
}


Should I change it to:

vector<int> vec;
//populate vec
vector<int>::iterator it = vec.begin();
while ( it != vec.end() ) {
  int& i = *it;
  i = i * 45;
  ++ it;
}




¡El diablo está en mis pantalones! ¡Mire, mire!

Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!

SELECT * FROM User WHERE Clue > 0
0 rows returned

GeneralRe: STL iterators and post/pre incrementing Pin
Antony M Kancidrowski4-Aug-04 2:57
Antony M Kancidrowski4-Aug-04 2:57 
GeneralRe: STL iterators and post/pre incrementing Pin
RChin4-Aug-04 3:45
RChin4-Aug-04 3:45 
GeneralRe: STL iterators and post/pre incrementing Pin
Nitron4-Aug-04 3:58
Nitron4-Aug-04 3:58 
GeneralRe: STL iterators and post/pre incrementing Pin
digwizfox4-Aug-04 6:25
digwizfox4-Aug-04 6:25 
GeneralRe: STL iterators and post/pre incrementing Pin
Tim Smith4-Aug-04 4:05
Tim Smith4-Aug-04 4:05 
GeneralRe: STL iterators and post/pre incrementing Pin
Anonymous4-Aug-04 17:58
Anonymous4-Aug-04 17:58 
Generalsorry Pin
yingkou4-Aug-04 2:33
yingkou4-Aug-04 2:33 
GeneralRe: sorry Pin
Antony M Kancidrowski4-Aug-04 2:59
Antony M Kancidrowski4-Aug-04 2:59 
GeneralRe: sorry Pin
palbano4-Aug-04 4:59
palbano4-Aug-04 4:59 
GeneralRe: sorry Pin
yingkou4-Aug-04 15:19
yingkou4-Aug-04 15:19 
GeneralRe: sorry Pin
bikram singh5-Aug-04 7:19
bikram singh5-Aug-04 7:19 

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.