I don't know if this will help any, but what is being returned is the last member of the data file, no matter what I put in for search criteria.
Type: Posts; User: amdeffen
I don't know if this will help any, but what is being returned is the last member of the data file, no matter what I put in for search criteria.
Ok, I changed the main function so the for loop closes before the user can search. However, I'm still having the exact same problem. I think the problem is my search function, but I'm completely...
Ok, that didn't actually help much. It did the same thing, except this time, it printed out a long line of zeros afterwards. :confused: :confused:
Ok, I combined all the functions into one, and it's working pretty well...
#include <iostream>
#include <fstream>
using namespace std;
struct car{
string make;
string model;...
Actually, if "ANY" is criteria, shouldn't the program just disregard those criteria, and then just search the rest of them? Also, I don't really want to output the data for a car every time there's...
Ok, here is the way my code looks now
#include <iostream>
#include <fstream>
using namespace std;
struct car{
string make;
string model;
int year;
:p I just figured that out. I feel a bit silly now.
Ok, so I need to make val type 'car' correct? I've tried doing that, and I still get the same error message.
No one have any ideas? I'm really stuck here and it's due tomorrow. :(
Maybe you shouldn't declare state as a pointer, since the input is coming directly from the user. Though I might be wrong, my experience with enum is pretty green.
I don't know if this will help much, but I don't think you need to have the .h in #include <fstream.h>. I think that #include <fstream> works just as well.
Ok, here's my code as of now, along with the error messages I'm getting.
#include <iostream>
#include <fstream>
using namespace std;
struct car{
char make[50];
char...
Thanks. Can't believe I missed that. Just wondering, does anyone see anything that could go wrong in the future? Because I still have to write a couple search functions, and I'm worried that my...
Ok, here is my code:
#include <iostream>
#include <fstream>
using namespace std;
struct car{
char make[50];
char model[50];
int year;
Unless it is a pre-defined C++ function, no you cannot.
Hello all. I am working on a project for a college level C++ course, and have run into a big snag. Here is the text of the assignment:
1. For this assignment, you will be creating a car search...