Description: Implement and test a C++ struct that represents an error record. An error record contains teh following information:
Error code (ASCII text)
Priority (integer between 0 and 3 inclusive)
Hi, first off my name is Adrian and I'm a college student who needs to take this level of CS for my major. Unfortunately it's been 2 years since I've even opened up any IDE and programmed.
Here are the directions:
The struct must implement the following operator overloads:
1.) Overload functions for all relational operators ( ==, !=, <, <=, > , >=). The relational operators should evaluate each member of the error record in teh following order:
Priority: One error record is logically less than another if the first has a smaller priority.
Timestamp: given two error records with the same priority, one error record is logically less than another if the first has an earlier timestamp.
Error Code: Given two error records with the same priority and timestamp, one error record is logically less than another if the first has an error code that is alphabetically less than the second.
2.) Overload function for the insertion operator (<<).
3.) The struct will be a simple C-style struct. It will not define any member functions.
This is my header file ( ErrorType.h):
This is my cpp (ErrorType.cpp):
This is the professor's test file that tests my .cpp and .h
This is the .in file (error.in)
Here is a .zip of all the files for easy download and compile:
Ok, I hope I'm going the right way so far. I feel as though the directions weren't given very clearly. I and others asked in class and walked away thinking we knew what to do only to feel lost after getting past TimeType.
A.) I don't know if my logic is right or I did the operator overloading right. I just copied from my notes and based it off examples.
B.) What am I to do with Errortype? I need an example of what I should be doing inside those boolean functions.
C.) Maybe a little bit easier explanation of what I'm suppose to do.
If there is ANYTHING else I can give so that it might be more helpful for you to help me, please ask.
aim = limitx3m
yahoo = limitmaker
It might say I'm away, but I'm not.