Turnin setup: perl /export/home/public/spiegel/turnin.pl 402 source ~/.bash_profile Do the above once only, from your root directory... Test turnin: turnin402 ________ _______ _________ - wild cards are okay, directories not. -------------------------------------------------------- Forum URL: https://acad.kutztown.edu/phpBB3/ ----------------------------------------------------- Significant changes owing to the upgrade of g++ from pre-2011 versions to version 8.3: 1. The argument to the fstream (and subclasses) open() command can be a string 2. Inclusion of new libraries like --------------------------------------------------- Printing a C-string void printcStr(char *str) { for (int idx=0;str[idx]!='\0';idx++) // '\0' is the char representation of the null terminator (ASCII value 0) cout << str[idx]; cout << endl; } Print a C-string with no indexing: void print(char *str]) // Precondition: str is null terminated { while (*str) { cout << *str; str++; } cout << endl; } void print(char *str) // Precondition: str is null terminated { for( ; *str ; str++) cout << *str; cout << endl; } Note: Assignment of C-strings using the equality (=) operator assigns their addresses. --------------------------------------------------- Fundamental Rule of Data Structures - Any data structure can be broken down into its constituent simple types. --------------------------------------------------- Inheritance notes: How members are inherited public - visible everywhere including subclasses* protected - visible in class and all subclasses* private - visible only in same class* *unless mode in declaration precludes it Inheritance mode given in declaration of subclass states maximum access to inherited attributes from parent. - if private, nothing from parent is accessible. Functions can be overwritten Overwriting vs overloading - overload has same name but different signature - overwrite has identical signature in subclass A pointer or reference to a superclass X may be referred or pointed at any subclass of X. Polymorphism - keyword virtual used in C++ * to be inherited, function must be declared virtual - In Java an overwritten function is automatically handled via polymorphism Keyword virtual causes binding of calls to be deferred until run-time.