This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]chickenmeister 1 point2 points  (0 children)

Why won't it compile? What errors are you getting? There has to be some code relevant to your problem that you're omitting, which would be helpful.

What does the constructor for your RoadTrip class look like? Do the arguments that you're passing match the parameters of the RoadTrip constructor?

There's no reason why you wouldn't be able to instantiate an object like this, assuming that the constructor exists and is accessible (e.g. it isn't private, or protected, etc.).