Image

Imageiyouboushi wrote in Imagecpp

Tracker Project

This project is seriously driving me insane. I've been working on it for awhile now, in conjunction with learning about the various parts of polymorhisim and inheritance. Yes, it's a project for class, but no I don't want you to help me solve it all. I'm really just looking for help getting past where I seem to be getting stuck. As it stands I haven't even gotten to the dynamic memory part because it won't read the "serial number" correctly and determine what type of vehicle it is. Ah, I guess this would be a good time to try and explain the project.

Basically it's supposed to be a simulation of a vehicle tracker, say like a toll booth or something, where it would "read" a serial number from a vehicle and then determine what type of vehicle it is, read in the passenger capacity, and then create the appropriate vehicle object. Some vehicles, like the truck, pass in more information and will have to be taken care of when it's created.

But my problem lies with reading the serial number from the vehicle. For simplisity, he left the serial number as "car" or "van" or "truck," etc. But first mine doesn't seem to "decode" that correctly, and then it doesn't want to exit the loop correctly (something that I SHOULD have a handle on by now). After a few tries it eventually goes into lala land. I guess this is way better than the access exception I was getting at first.. but I'm still quite aggrevated. I can't figure out what's going on.

The program will eventually be reading files, and in those files it'll have all of this information. For testing purposes I've left it as the std::cin for all of the inputs. The first thing it asks for is how many vehicles are passing by, which for testing I've always put 1. The second & third thing it'll ask for is the serial number (car) and passenger capacity (5). Since these were supposed to be temporary I didn't really label what it was asking for. Sorry.

I've zipped it, since it would be too much to just c/p in a journal entry. Tracker.zip (if the server won't let you download it that way, just go to http://iyou.cyberbotx.com/programs/ and click on the zip file. That should work.

I'm greatful in advance for any help that can get me past this problem I'm on so that I can actually get into the meat of the tracker.