------ Build started: Project: Projects, Configuration: Debug Win32 ------
Compiling...
Cars.cpp
..\..\..\..\..\Desktop\Cars.cpp(43) : error C2039: 'car' : is not a member of 'std::basic_ifstream<_Elem,_Traits>'
with
[
_Elem=char,
_Traits=std::char_traits<char>
]
..\..\..\..\..\Desktop\Cars.cpp(43) : error C2660: 'GetCar' : function does not take 1 arguments
..\..\..\..\..\Desktop\Cars.cpp(48) : error C3861: 'Getcar': identifier not found
Build log was saved at "file://c:\Documents and Settings\Darren\My Documents\Visual Studio 2008\Projects\Projects\Projects\Debug\BuildLog.htm"
Projects - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I finally got it to run without any problems but there's still a problem when the screen opens. It won't let me write to it.....What should I do now????
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
Your program is written to read from a file, "cars.dat", and write to a file, "cars.out". I don't understand your question about allowing you to write to "it". I'm able to copy your source, compile, and run it successfully. Of course, I had to produce a cars.dat but that was pretty straight forward. BTW, in WriteCar, Purchashed should be Purchased.