Click here to Skip to main content
16,017,852 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionAdding a new image (img tag) to the document in Internet Explorer Pin
ajitatif angajetor4-Jun-07 1:30
ajitatif angajetor4-Jun-07 1:30 
QuestionHow to align toolbars? Pin
Anurag Gandhi4-Jun-07 1:13
professionalAnurag Gandhi4-Jun-07 1:13 
GeneralRe: How to align toolbars? Pin
Rajkumar R4-Jun-07 1:24
Rajkumar R4-Jun-07 1:24 
GeneralRe: How to align toolbars? Pin
Anurag Gandhi4-Jun-07 1:38
professionalAnurag Gandhi4-Jun-07 1:38 
AnswerRe: How to align toolbars? [modified] Pin
Rajkumar R4-Jun-07 3:21
Rajkumar R4-Jun-07 3:21 
GeneralRe: How to align toolbars? Pin
Anurag Gandhi4-Jun-07 5:24
professionalAnurag Gandhi4-Jun-07 5:24 
QuestionVector of Pointers Pin
Kevin Brydon4-Jun-07 0:35
Kevin Brydon4-Jun-07 0:35 
AnswerRe: Vector of Pointers Pin
Maximilien4-Jun-07 0:56
Maximilien4-Jun-07 0:56 
Me think your design suck; I don't think it's efficient (or doable) to keep reference to vector items.

create a struct/class for your coordinate.

make an base class called Geometry (or whatever you like), make a class Point, make a class Line both derived from the base class Geometry.

Create a vector of pointer to Geometry.

something like :

struct Coordinate { double x, y, z;};

class Geometry 
{ 
  void Draw()=0; 
};

class Point : public Geometry
{ 
  Coordinate m_Coordinate; 
  void Draw(){}; 
};
class Line : public Geometry 
{ 
  Coordinate m_Start, m_End; 
  void Draw();
};

std::vector < Geometry* > m_GeometryVector;





Maximilien Lincourt
Your Head A Splode - Strong Bad

AnswerRe: Vector of Pointers Pin
CPallini4-Jun-07 0:57
mveCPallini4-Jun-07 0:57 
GeneralRe: Vector of Pointers Pin
Rajkumar R4-Jun-07 1:19
Rajkumar R4-Jun-07 1:19 
GeneralRe: Vector of Pointers Pin
Kevin Brydon4-Jun-07 1:43
Kevin Brydon4-Jun-07 1:43 
GeneralRe: Vector of Pointers Pin
Matthew Faithfull4-Jun-07 2:09
Matthew Faithfull4-Jun-07 2:09 
GeneralRe: Vector of Pointers Pin
Kevin Brydon4-Jun-07 2:17
Kevin Brydon4-Jun-07 2:17 
GeneralRe: Vector of Pointers Pin
Matthew Faithfull4-Jun-07 2:38
Matthew Faithfull4-Jun-07 2:38 
GeneralRe: Vector of Pointers Pin
Kevin Brydon4-Jun-07 2:39
Kevin Brydon4-Jun-07 2:39 
GeneralRe: Vector of Pointers Pin
CPallini4-Jun-07 2:14
mveCPallini4-Jun-07 2:14 
GeneralRe: Vector of Pointers Pin
Kevin Brydon4-Jun-07 2:23
Kevin Brydon4-Jun-07 2:23 
GeneralRe: Vector of Pointers Pin
Maximilien4-Jun-07 3:05
Maximilien4-Jun-07 3:05 
AnswerRe: Vector of Pointers Pin
Rajkumar R4-Jun-07 3:41
Rajkumar R4-Jun-07 3:41 
GeneralRe: Vector of Pointers Pin
Kevin Brydon4-Jun-07 5:16
Kevin Brydon4-Jun-07 5:16 
GeneralRe: Vector of Pointers Pin
Stephen Hewitt4-Jun-07 15:04
Stephen Hewitt4-Jun-07 15:04 
GeneralRe: Vector of Pointers Pin
led mike3-Mar-08 6:32
led mike3-Mar-08 6:32 
GeneralRe: Vector of Pointers Pin
Stephen Hewitt4-Jun-07 15:01
Stephen Hewitt4-Jun-07 15:01 
AnswerRe: Vector of Pointers [modified] Pin
Rajkumar R4-Jun-07 18:49
Rajkumar R4-Jun-07 18:49 
GeneralRe: Vector of Pointers Pin
Stephen Hewitt4-Jun-07 19:00
Stephen Hewitt4-Jun-07 19:00 

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.