Review Topics for Exam 1
- Using Visual C++
Two types of applications: Console based & MFC Appwizzard
- Making Dialog Boxes
- Buttons
- Button ID, Caption
- Event Handler
- Edit Boxes
- Box ID, Styles (multi-line, want return...)
- Event Handler
- member variables
- types: int, float, CString
- Reading from an edit box
UpdateData(true)
- Writing to an edit box
UpdateData(false)
- control variables
Enabling and dissabling buttons and exit boxes
- CString data type
- "+" operation - concatenates
- "+=" operation - appends
- "+" allowed between a CString and character array
- "\r\n" - inserting new lines
- Character arrays
Cannot be added - "+" not allowed
- Converting integers to character arrays
itoa(interger to convert,char array,base)
- Files
- include file - fstream.h
- input and output file variable types - ifstream, ofstream
- Functions:
- open(filename,mode) mode = ios::in,
ios::out,
ios::trunc,
ios::app
- close()
- Reading:
- infile >> variable;
- infile.getline(char array, Maxsize, termination character);
- ch = infile.get() - Reads one character
- Checking for end of file:
infile.eof() - returns true if end-of-file
has been read.
- Writing:
outfile << data or variables to write
- Binary number representation of integers
- size of a short int
- size of an int
- size of a long int