Click here to Skip to main content
15,922,015 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Direct buffer access to STL string Pin
markkuk17-Feb-03 1:52
markkuk17-Feb-03 1:52 
GeneralRe: Direct buffer access to STL string Pin
Neville Franks18-Feb-03 20:29
Neville Franks18-Feb-03 20:29 
QuestionIs it common for implementation in .h files? Pin
TigerNinja_16-Feb-03 15:16
TigerNinja_16-Feb-03 15:16 
AnswerRe: Is it common for implementation in .h files? Pin
Michael Dunn16-Feb-03 15:26
sitebuilderMichael Dunn16-Feb-03 15:26 
GeneralRe: Is it common for implementation in .h files? Pin
Tim Smith17-Feb-03 2:08
Tim Smith17-Feb-03 2:08 
GeneralInvalidCastException from remote object that use COM Pin
itay_k16-Feb-03 4:48
itay_k16-Feb-03 4:48 
GeneralQuestion about bind2nd. Pin
George214-Feb-03 20:04
George214-Feb-03 20:04 
GeneralRe: Question about bind2nd. Pin
AlexO15-Feb-03 5:43
AlexO15-Feb-03 5:43 
In this particular case bind2nd is function that uses comparison function (less by default) to compare any argument to value of 'bound'.
So for each element in v.begin() ... v.end() range replace_if calls bind2nd and if true returned it replaces element value with value of 'bound'

Your example:
vector v;
// fill v with 4 6 10 3 13 2
int bound = 5;

replace_if (v.begin(), v.end(), bind2nd (less(), bound), bound);

//////////////////////////////////////////
another way(not the best):
const int bound = 5;

for(vector::size_type i = 0, size = v.size();i< size;++i)
{
if(v[i] <= bound)
v[i] = bound;
}


+
GeneralRe: Question about bind2nd. Pin
George215-Feb-03 17:04
George215-Feb-03 17:04 
GeneralIClassFactory2 Pin
Raphael Amorim14-Feb-03 4:00
professionalRaphael Amorim14-Feb-03 4:00 
QuestionIDispatch from atl-control??? Pin
Zizilamoroso14-Feb-03 1:35
Zizilamoroso14-Feb-03 1:35 
AnswerRe: IDispatch from atl-control??? Pin
geo_m14-Feb-03 2:37
geo_m14-Feb-03 2:37 
GeneralRe: IDispatch from atl-control??? Pin
Zizilamoroso14-Feb-03 4:06
Zizilamoroso14-Feb-03 4:06 
GeneralRe: IDispatch from atl-control??? Pin
geo_m14-Feb-03 4:27
geo_m14-Feb-03 4:27 
GeneralRe: IDispatch from atl-control??? Pin
Zizilamoroso14-Feb-03 4:54
Zizilamoroso14-Feb-03 4:54 
GeneralRe: IDispatch from atl-control??? Pin
geo_m14-Feb-03 5:14
geo_m14-Feb-03 5:14 
GeneralRe: IDispatch from atl-control??? Pin
Zizilamoroso14-Feb-03 6:01
Zizilamoroso14-Feb-03 6:01 
GeneralRe: IDispatch from atl-control??? Pin
Zizilamoroso14-Feb-03 6:28
Zizilamoroso14-Feb-03 6:28 
GeneralRe: IDispatch from atl-control??? Pin
geo_m14-Feb-03 10:55
geo_m14-Feb-03 10:55 
GeneralQuestion about uninitialized memory. Pin
George214-Feb-03 1:03
George214-Feb-03 1:03 
GeneralRe: Question about uninitialized memory. Pin
Tim Smith14-Feb-03 2:19
Tim Smith14-Feb-03 2:19 
GeneralRe: Question about uninitialized memory. Pin
George214-Feb-03 2:27
George214-Feb-03 2:27 
GeneralRe: Question about uninitialized memory. Pin
Tim Smith14-Feb-03 3:20
Tim Smith14-Feb-03 3:20 
GeneralRe: Question about uninitialized memory. Pin
George214-Feb-03 3:24
George214-Feb-03 3:24 
GeneralRe: Question about uninitialized memory. Pin
Joaquín M López Muñoz14-Feb-03 4:16
Joaquín M López Muñoz14-Feb-03 4:16 

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.