Constructors and strings

Sorry if this is really simple, I'm pretty new to coding. I'm trying to initialize an object through a constructor with a string as a parameter type and my program doesn't want to recognize the string argument I declare in the object as a string. Sorry if I worded it in a confusing way, my code will hopefully help clarify what I mean:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <iostream>
#include <string>

using namespace std;

class JayRideDrive
{
    public:
        JayRideDrive(string driveName, int tele, string car, double miles);

    private:
        string driver;
        int phone;
        string vehicle;
        double distance;
};
JayRideDrive::JayRideDrive(string driveName, int tele, string car, double miles)
{
    driver = driveName;
    phone = tele;
    vehicle = car;
    distance = miles;
}
int main()
{
    JayRideDrive one(Darth Vader, 3384737, TIE Fighter, 79);
}


I hope that's the only part of the code I need to post considering the actual code length is around 400 lines. The error I'm getting is "error: 'Darth' not declared in this scope". Is there any way to fix this? Thanks in advance!
1
2
// JayRideDrive one(Darth Vader, 3384737, TIE Fighter, 79);
JayRideDrive one( "Darth Vader", 3384737, "TIE Fighter", 79 );
Well, I feel like an idiot. Thank you so much.
Topic archived. No new replies allowed.