Home
|
Table of Contents
|
Overview Map
Comp 170 H1 - Spring 2015 - Steil
dsteil@harding.edu
dsteil@harding.edu
Home
>
Exam 3
>
Week 9
Previous
Next
Week 9
Monday
struct example for bible verse
intrensic types vs. complex or user-defined types
varibles vs. objects (instances of inrensic and complex types)
intrensic (int, float, bool, char, unsigned char, ...)
complex (string, ofstream, ifstream, any type you make)
struct methods
struct constructor
Tuesday
Text files contain text (.txt, .cpp, .html, .xml, .csv ...)
Binary file IO
fout.read
fout.write
std::ifstream fin(fileName, std::ios::binary);
//first argument must be an address (char*)
fin.read((char*)&fileHeader.fileSize,4);
Bitmap file format (headers and pixels)
Examples
Integer Array Binary File IO
Address Array Binary
File IO
Wednesday
c++ enum - can be accessed with our without the enum name and scope resolution operator
using notation like Suit::Spades is visual studio specific, other places it is just Spades
enum Gender
{
male = 0,
female
};
c++ regular expressions
Short circuit boolean expressions (Schaum's 3.7)
Thursday (Exam Review)
Friday (Exam)
Top
Dana Steil PhD - Harding University
Last updated:
3/26/2015