Click here to Skip to main content
16,004,906 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
AnswerRe: How to derive from a existing Interface? Pin
MANISH RASTOGI9-Aug-07 18:21
MANISH RASTOGI9-Aug-07 18:21 
QuestionDifference between “vector” and “array”? Pin
Nandu_77b7-Aug-07 1:12
Nandu_77b7-Aug-07 1:12 
AnswerRe: Difference between “vector” and “array”? Pin
Nemanja Trifunovic7-Aug-07 1:50
Nemanja Trifunovic7-Aug-07 1:50 
GeneralRe: Difference between “vector” and “array”? Pin
Kevin McFarlane7-Aug-07 2:04
Kevin McFarlane7-Aug-07 2:04 
GeneralRe: Difference between “vector” and “array”? Pin
Nandu_77b7-Aug-07 2:14
Nandu_77b7-Aug-07 2:14 
GeneralRe: Difference between “vector” and “array”? Pin
Nemanja Trifunovic7-Aug-07 2:26
Nemanja Trifunovic7-Aug-07 2:26 
GeneralRe: Difference between “vector” and “array”? Pin
Nandu_77b9-Aug-07 4:18
Nandu_77b9-Aug-07 4:18 
Questiontemplate function Pin
swjam6-Aug-07 17:24
swjam6-Aug-07 17:24 
hi,

in the code below, i highlighted my points of interest. the declaration of the template function make takes a const char[]. in the call to this function, why is < deque<char> > inserted before the actual parameter? i.e. it's not in the signature and the parameter is not a typename but an explicit const array of characters.
thanks!

<br />
// Demonstrating the generic find algorithm with a deque<br />
#include "stdafx.h"<br />
<br />
#include <iostream><br />
#include <cassert><br />
#include <deque><br />
#include <algorithm>  // For find<br />
using namespace std; <br />
template <typename Container><br />
Container make(const char s[])<br />
{<br />
  return Container(&s[0], &s[strlen(s)]);<br />
}<br />
  <br />
int main()<br />
{<br />
  cout << "Demonstrating generic find algorithm with "<br />
       << "a deque." << endl;<br />
  deque<char> deque1 = <br />
    make< deque<char> >("C++ is a better C");<br />
<br />
  // Search for the first occurrence of the letter e:<br />
  deque<char>::iterator<br />
    where = find(deque1.begin(), deque1.end(), 'e');<br />
  assert (*where == 'e' && *(where + 1) == 't');<br />
  cout << " --- Ok." << endl;<br />
  return 0;<br />
}<br />


I am a SysAdmin, I battle my own daemons.

AnswerRe: template function Pin
Steve Echols6-Aug-07 18:01
Steve Echols6-Aug-07 18:01 
GeneralRe: template function [modified] Pin
swjam6-Aug-07 18:58
swjam6-Aug-07 18:58 
GeneralRe: template function Pin
Steve Echols6-Aug-07 19:17
Steve Echols6-Aug-07 19:17 
AnswerRe: template function Pin
Michael Dunn7-Aug-07 12:37
sitebuilderMichael Dunn7-Aug-07 12:37 
QuestionCalling a routine in a dll from the command line. Pin
firesteel6-Aug-07 0:16
firesteel6-Aug-07 0:16 
AnswerRe: Calling a routine in a dll from the command line. Pin
Stuart Dootson6-Aug-07 1:19
professionalStuart Dootson6-Aug-07 1:19 
GeneralRe: Calling a routine in a dll from the command line. Pin
firesteel6-Aug-07 2:21
firesteel6-Aug-07 2:21 
GeneralRe: Calling a routine in a dll from the command line. Pin
Stuart Dootson6-Aug-07 6:01
professionalStuart Dootson6-Aug-07 6:01 
QuestionCorrect/Best way to do convert int to string as uppercase hex ? Pin
Defenestration5-Aug-07 10:59
Defenestration5-Aug-07 10:59 
AnswerRe: Correct/Best way to do convert int to string as uppercase hex ? Pin
Stuart Dootson6-Aug-07 6:07
professionalStuart Dootson6-Aug-07 6:07 
QuestionDisplaying jpeg image sequences with ATL only Pin
p_4732-Aug-07 0:19
p_4732-Aug-07 0:19 
Questioni neeeeeeeed hlppppppp Pin
topekash20001-Aug-07 3:13
topekash20001-Aug-07 3:13 
AnswerTroll alert Pin
Chris Losinger1-Aug-07 3:30
professionalChris Losinger1-Aug-07 3:30 
GeneralRe: Troll alert Pin
Jonathan [Darka]1-Aug-07 4:12
professionalJonathan [Darka]1-Aug-07 4:12 
AnswerYou definitely need help, but... Pin
CPallini1-Aug-07 4:27
mveCPallini1-Aug-07 4:27 
QuestionMethods not getting generated by wizard [modified] Pin
KASR11-Aug-07 0:16
KASR11-Aug-07 0:16 
AnswerRe: Methods not getting generated by wizard Pin
_Leviathan_1-Aug-07 4:42
_Leviathan_1-Aug-07 4:42 

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.