Hi,
I have a deque of Point class,. Point class have two fields x, and y.
Now I want another class Character should point to a portion of the
deque, and allow iteration only on the portion.
Thus a deque<Character will point on the deque<Pointover different
ranges.
Both are dynamic in the sense, new character, and hence new point gets
added, while old character and old points get removed.
My question is, what the Character will store as pointer to
deque<Point>? Two size_t / or int as start and past end pointer, or two
iterator? With iterator, I am facing problem is that they are not
default construct able. Like Character class can point to another
deque<Pointwhic h stores some modified set of points, and are
available only after performing some computation.
In general, I need different views on same set of data. Say the
deque<Pointcan be viewed as Page = Character =Point. or even Page
=Stroke =Point or something else.
Thanks for help
abir
I have a deque of Point class,. Point class have two fields x, and y.
Now I want another class Character should point to a portion of the
deque, and allow iteration only on the portion.
Thus a deque<Character will point on the deque<Pointover different
ranges.
Both are dynamic in the sense, new character, and hence new point gets
added, while old character and old points get removed.
My question is, what the Character will store as pointer to
deque<Point>? Two size_t / or int as start and past end pointer, or two
iterator? With iterator, I am facing problem is that they are not
default construct able. Like Character class can point to another
deque<Pointwhic h stores some modified set of points, and are
available only after performing some computation.
In general, I need different views on same set of data. Say the
deque<Pointcan be viewed as Page = Character =Point. or even Page
=Stroke =Point or something else.
Thanks for help
abir
Comment