i want to parse the content of a file and load into a map.

This is the file content format:

```
Movie-name   release-year   price  cast  ishd 

"DDLG" 2010 20.00 "shahrukh and Kajal" true
"Aamir" 2008 10.00 "abc, xyz and ijkl" false

```

Key for map will be the first word (Movie name).

class defition:

```
class movieInfo
{
        private:
        int releaseYear;
        double price;
        string cast;
        bool isHD;
};

```

This is the function i am trying to implement.

```
void fill_map_contents (map <string, movieInfo*> &mymap, ifstream& myfile)
{
    string line;
    string word;
    while (getline(myfile, line))
    {
        out << "inside while loop " << line << endl;
        stringstream tokenizer;
        tokenizer << line;
        movieInfo *temp = new movieInfo;
        while  (tokenizer >> word)
        {
            cout << " printing word :->"<< word << endl;
            //temp->releaseYear = atoi(word);
            //temp->price = 12.34;
            //temp->cast = "sahahrukh salman";
            //temp->isHD = false;   

            mymap[word] = temp;
        }
        delete temp;
    }
}

```

I am not getting any idea, after while (tokenizer >> word), how to fill object variable and assign it to map.

Any help will be highly appreciated.

Devesh