使用字符串变量作为文件路径从子目录获取文件-C ++

我的项目主目录中有一个子目录,称为“数据”。在此目录中,有一些csv文件以及一个文本文件,并且该文本文件包含一些我要从中读取数据的csv文件的名称。使用while循环,我想从文本文件“ infile”中获取每个文件名,将其存储到字符串“ files”中,并使用此字符串变量在子目录中打开每个文件。我只是不知道如何使用此字符串变量访问子目录。我在下面的代码中所做的是将要使用的文件移动到主目录中,并且可以按预期工作,但是我想通过访问子目录来实现相同的目的。有什么建议么?

    string files;

    ifstream infile("data\\met_index.txt"); //Open the text file that shows the csv files needed

    if(!infile) //Exits the program and outputs this message if the file is not found
    {

        cout << "File not found.";

        return -1;

    }

    Vector<string> headers; //A vector of type String to hold the headers for each column

    while(getline(infile, files))
    {

        ifstream datafile(files.c_str()); // How do I access sub directory here?
        if(!datafile) //Exits the program and outputs this message if the file is not found
        {

            cout << "File not found.";

            return -1;

        }
        cout << "File: " << files << endl;

}