Click here to Skip to main content
15,910,210 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
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 
First of all, a remark: the tutorial you're using is grossly outdated, there is no global allocate function, since C++ 98' standard this function is a member of std::allocator.

Now, the second parameter is a hint pointer, optionally used by the allocation engine to improve performance. If no hint is to be provided, the null pointer (0) can be passed. Now, consider the situation:
allocate(1,0);
This cannot work because allocate does not know which kind of type you're allocating memory for. The ambiguity can be solved in one of these two forms:
allocate<int>(1,0); // we're allocating ints
allocate(1,(int*)0); // allocating ints, since the second parm is a (null) pointer to int


Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: Question about uninitialized memory. Pin
Tim Smith14-Feb-03 7:03
Tim Smith14-Feb-03 7:03 
GeneralRe: Question about uninitialized memory. Pin
George214-Feb-03 17:17
George214-Feb-03 17:17 
GeneralRe: Question about uninitialized memory. Pin
George214-Feb-03 17:16
George214-Feb-03 17:16 
GeneralProblems with HTMLElementEvents2 Pin
Xavyer13-Feb-03 2:23
Xavyer13-Feb-03 2:23 
GeneralRe: Problems with HTMLElementEvents2 Pin
stereo16-Feb-03 5:57
stereo16-Feb-03 5:57 
GeneralRe: Problems with HTMLElementEvents2 Pin
Xavyer16-Feb-03 8:04
Xavyer16-Feb-03 8:04 
GeneralQuestion about allocate of STL. Pin
George213-Feb-03 1:55
George213-Feb-03 1:55 
GeneralRe: Question about allocate of STL. Pin
markkuk13-Feb-03 2:24
markkuk13-Feb-03 2:24 
GeneralSinking events... Pin
LukeV12-Feb-03 3:25
LukeV12-Feb-03 3:25 
GeneralRe: Sinking events... Pin
LukeV12-Feb-03 4:37
LukeV12-Feb-03 4:37 
GeneralRe: Sinking events... Pin
LukeV12-Feb-03 11:45
LukeV12-Feb-03 11:45 
GeneralQuestion about front_inserter of STL. Pin
George212-Feb-03 2:56
George212-Feb-03 2:56 
GeneralRe: Question about front_inserter of STL. Pin
Joaquín M López Muñoz12-Feb-03 6:47
Joaquín M López Muñoz12-Feb-03 6:47 
GeneralRe: Question about front_inserter of STL. Pin
George212-Feb-03 13:32
George212-Feb-03 13:32 
GeneralQuestion about reverse_iterator. Pin
George212-Feb-03 2:21
George212-Feb-03 2:21 
GeneralRe: Question about reverse_iterator. Pin
Joaquín M López Muñoz12-Feb-03 2:26
Joaquín M López Muñoz12-Feb-03 2:26 
GeneralRe: Question about reverse_iterator. Pin
George212-Feb-03 2:35
George212-Feb-03 2:35 

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.