Vectors and Class

So this is my first time using Vectors and i have only used class a few different times since i normally use structs. By the way this is a homework assignment, but the instructor gave us part of the code and its only missing one thing to get the base code to run and thats all i need help with.


class IntervalSet {
private:
std::vector<Interval> seq;
Publc:

};
-------------------------------
class Interval {
private:
double low;
double high;

public:

Interval (double l, double h);

....

};
----------------------------------
Interval::Interval (double l, double h)
: low(l), high(h)
{}
--------------------------------
IntervalSet highway(0.0, borderLength);
============================================
no matching function for call to 'IntervalSet::IntervalSet(double, double&)'|

candidates are:|
IntervalSet::IntervalSet()|
candidate expects 0 arguments, 2 provided|

IntervalSet::IntervalSet(const IntervalSet&)|
candidate expects 1 argument, 2 provided|
----------------------------------------------------
this is how i am confused, like i said this is my first time using vectors, but i was told they are similar to array's

so if you create an array of "Interval" class under "IntervalSet"
wouldnt creating highway just be like Intervalset -> Interval -> (double x,double y)?
You have not defined any IntervalSet constructor so it will only have one constructor, the default constructor, taking zero arguments, but you try to pass two arguments and that's why you get an error.
Okay thank you i fixed it, i just thought since the class had a vector of interval it would be kind of like a linked list in a way, but thank you for your help
Topic archived. No new replies allowed.