Search:

Type: Posts; User: mrpringle

Search: Search took 0.00 seconds.

  1. Replies
    3
    Views
    2,391

    Returning object by value or smart pointer

    If I had the following two options, which would be more desirable or generally accepted.

    1. Creating an object on the stack and returning it by value.
    2. Creating an object on the heap, storing...
  2. Replies
    9
    Views
    5,898

    Thanks for the help. I will need to read up on...

    Thanks for the help. I will need to read up on how iterators work.
  3. Replies
    9
    Views
    5,898

    How is something like this done?

    How is something like this done?
  4. Replies
    9
    Views
    5,898

    I'll try and simplify my example. Let's say...

    I'll try and simplify my example.

    Let's say there is a class Canvas which has a vector of shapes.



    class Canvas
    {
    public:
    addShape(const Shape &shape);
  5. Replies
    9
    Views
    5,898

    Iterating over private vector

    Hi,
    I'm trying to learn how to use C++ properly and I've run into a dilemma.

    If I have a class which has a private vector and I want to allow a client of this class to iterate over the objects in...
Results 1 to 5 of 5