C
cppaddict
Hi,
I currently have a class in which I use all of the following a number
of times (nb: Point is custom class):
std::vector<Point>
std::vector<Point>&
const std::vector<Point>
const std::vector<Point>&
It would make things cleaner if I could use typedefs:
typedef std::vector<Point> Points
However, after making that declaration, I get warnings or errors if I
try things like this:
const Points&
Points&
....etc...
Does that mean I have to make a seperate typedef for each of the four
types generated by using the const and & symbols together with the
original type? If not, what can I do?
Thanks,
cpp
I currently have a class in which I use all of the following a number
of times (nb: Point is custom class):
std::vector<Point>
std::vector<Point>&
const std::vector<Point>
const std::vector<Point>&
It would make things cleaner if I could use typedefs:
typedef std::vector<Point> Points
However, after making that declaration, I get warnings or errors if I
try things like this:
const Points&
Points&
....etc...
Does that mean I have to make a seperate typedef for each of the four
types generated by using the const and & symbols together with the
original type? If not, what can I do?
Thanks,
cpp