Assignment 1: FAQ (and answers)
FAQs
"How do I create binary data files?"
Sample ascii data files and an ascii->binary data file converter
are provided in /u/course/cs564/assigns/assign1/data.
Use this to create your own binary data files for testing.
(Look at README in that directory for more info)
"How do I initialize the const data members of my objects?"
Here is an example:
class PinkFloyd {
public:
PinkFloyd(int the_world) : they_rule(the_world) {}
private:
const int they_rule;
};
For more info, lookup "constant data members" in your favorite C++ book!
"How do I pass the INT/STR argument to the RecSpec constructor?"
Field_type is defined within the scope of RecSpec.
If you are outside this scope, you must specify to C++ that you want
the field_type in the RecSpec scope (ie, RecSpec::INT, not INT).
Lookup the scope operator (::) in your least disliked C++ book for
more info.
"Where is the solution?"
~cs564-1/assigns/assign1/sample/
(Note, the current TAs did not write the solution.)
|