You are missing the header file "string" which "getline" needs and also if you are using a "std::string" you will need this header file.
Line 7 defines a file stream and tries to open the file, but how do you know it is open?
You did not bother to mention what IDE you are using which makes it hard to tell where the current working directory is. This could also change depending on how and where you run the program from.
If you are using an input file please share it, or at least a good sample, so everyone can use the same information. This could also illuminate other problems with your code.
I changed the variable names. Try not to use single letter names as this is more confusing than helpful.
I have changed your code a bit and added some blank lines to make it easier to read. The blank lines help. See what you think.