My problem is I need to read from a txt and using 3 files that are 2 cpps and 1 header file to read that data in the txt into class variables that are private and then sort and sort and output them into seperate txts based on if their prices is greater then 40000. any advice or help would be greatly appreciated the code below is simple as was just trying to get one value to output so far.
Car.h
I assume the make is the "one value" you're trying to output as a test.
The string make is initialized as an empty string when you create your Car object (main.cpp line 7).
Then, you call getmake and print out that empty string.
You need to
(1) call setmake somewhere in your calling code, before you call getmake.
(2) get rid of your global variable ifstream lis. It's only going to cause you trouble. Are you sure that you want to be opening a file inside of setmake? It seems like it would be better to open that in main, and then call the appropriate set methods.