How to read file into class in C++?

I am reading File that contains

Boss,        level,    Specials,
"FireMen",   3,        "Flame,Thrower", Fire,Breath
"Medusa",    6,        "Snake,Poison"
"Hype",      10,       "One,punch,Knock", Fly,Kick, "Dragon,Breath"

I am trying to read it into class with objects boss, level and specials

I am having problem reading from file since I split each by words by comma but it read specials like Flame,Thrower as separate due to comma in between them. How can I combine specials rather then splitting by commas so that it read Flame Thrower rather then Flame and thrower separately. Also some specials are in quotation others are not.

I have been stuck at reading this rather complicated file. If anyone has time to read through my code and fix 10s of errors that I am getting would greatly be appreciated, Thank You

(What I did doesn’t make much sense since this is my one month into C++ so still newbie and progressing)

#include <iostream>
#include <string>
#include <vector>
#include <fstream>
#include <iomanip>
#include "Boss.h"

using namespace std;
vector <Boss*> Info;

Boss* parseLine(string str)
{
    vector<string> store;
    string smt = " ";
    Boss* values = nullptr;
    if (smt != "")
    {
        (store.push_back(smt));
    }
    for (int i = 0; i < (int)str.size(); i++)
    {
        char ch = str[i];
        if (ch != ',')
        {
            smt = smt + ch;
        }
        else
        {
            store.push_back(smt);
            smt = "";
        }
    }
    
    values = new Boss(store[0], stoi(store[1]), store[2]);
    Name = store[0];
    Level = store[1];
    Specials = store[2];
    
    return values;
}
bool readFile()
{
    std::ifstream myFile("Bosses.txt");
    if (!myFile.is_open())
    {
        cout << "fAILED" << "n";
        return false;
    }
    string str;

    int i = 0;
    while (std::getline(myFile, str))
    {
        cout << str << endl;
        if (str[0] != '/')
        {
            Boss* Boss = parseLine(str);
            result.push_back(Boss);
        }
    }
    return true;
}
int main()
{
    std::cout << "Read filen;";
    bool data = readFile();

    for (Boss* t : result)
{
 delete t;
}

And Class

#include <string>
#include <vector>

class Boss {
    std::string Name;
    int Level;
    std::vector<std::string> Specials;
    Boss(std::string Name, int Level, std::vector<std::string> Specials);
    ~Boss();
    Boss(Boss& b);
    void setName(std::string Name);
    void setLevel(int Level);

};
Boss::Boss(std::string Name, int Level, std::vector<std::string> Specials)
{
    this->Name= Name;
    this->Level = Level;
    this->Specials = Specials;
}

Boss::~Boss() {} 

Boss::Boss(Boss& b)
{
    Name = b.Name;
    Level = b.Level;
    Specials = b.Specials;
}
void Boss::setName(std::string Name) {
    this->Name = Name;
}
void Boss::setLevel(int Level)
{
    this->Level = Level;
}

Answer

This code reads your file and stores the data in the std::vector Info using stringstreams and other things to parse.

#include <iostream>
#include <string>
#include <vector>
#include <fstream>
#include <iomanip>
#include <sstream>


using namespace std;

class Boss {
    std::string Name;
    int Level;
    std::vector<std::string> Specials;
public:
    Boss(std::string n, int l, std::vector<std::string> s)
    {
        this->Name = n;
        this->Level = l;
        this->Specials = s;
    };
    ~Boss() {};
    Boss(const Boss& b) {
        this->Name = b.Name;
        this->Level = b.Level;
        this->Specials = b.Specials;
    };
    Boss() {};

    Boss operator= (Boss b) {
        this->Name = b.Name;
        this->Level = b.Level;
        this->Specials = b.Specials;
        return b;
    }

    void setName(std::string n) { Name = n; };
    void setLevel(int l) { Level = l; };
    void setSpecials(std::vector<std::string> s) {Specials = s;}

    std::string getName() const { return Name; }
    int getLevel() const { return Level; }
    std::vector<std::string> getSpecials() const { return Specials; }
};





vector <Boss> Info;

Boss parseLine(string str)
{
    vector<string> store;
    string smt;
    stringstream evaluator;
    Boss value;
    
    evaluator << str; //put our string into evaluator
    {
        char double_quote_remover;
        evaluator >> double_quote_remover; //remove the first double quote
        getline(evaluator, smt, '"'); //get the name until the next double quote
        char comma_remover;
        evaluator >> comma_remover; //remove the comma
    }
    value.setName(smt); //put smt into the Boss's name
    {
        int Level; 
        evaluator >> Level; //get an int from our string
        value.setLevel(Level); //put our int into our Boss
    }
    char curr;

    while (evaluator >> curr && curr != ','); //get the comma after the int
 
    smt = ""; //reset
    curr = ' '; //reset
 
        while (evaluator >> curr) { //while we read chars into curr
            if (isalpha(curr)) { evaluator.putback(curr); curr = ','; } //if the char is a letter, put it back
            if (curr == '"') getline(evaluator,smt,'"'); //if the char is a double quote, read until we reach another
            else if (curr == ',') getline(evaluator,smt,','); //if the char is a comma, read until we get another
            if (smt != "") //if the string is not null, put it in store
                store.push_back(smt);
            smt = ""; //reset
        }

        value.setSpecials(store); //put store into our Boss

        return value; //return our boss
    }

bool readFile()
{
    std::ifstream myFile("Bosses.txt");
    if (!myFile.is_open())
    {
        cout << "FAILED" << "n";
        return false;
    }
    string str;

    getline(myFile, str); //for the first line, which we don't need

    int i = 0;
    while (std::getline(myFile, str))
    {
        Boss Boss = parseLine(str);
        Info.push_back(Boss);
    }
    return true;
}

int main()
{
    bool data = readFile();
}

This should work. I have tested it thouroughly. Inform me of any errors.

Note: There was no need for pointers that were in your original code.