std_lib_facilities

std_lib_facilities - /* simple ENGN112 course header to be...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
/* simple ENGN112 course header to be used for the first few weeks It provides the most common standard headers (in the global namespace) and minimal exception/error support. a Students: please don't try to understand the details of headers just yet. All will be explained. This header is primarily used so that you don't have to understand every concept all at once. */ * #ifndef H112 #define H112 200803L # #include<iostream> #include<fstream> #include<sstream> #include<cmath> #include<cstdlib> #include<string> #include<vector> #include<algorithm> #include<stdexcept> using namespace std; u { ostringstream os; os << t; return os.str(); } struct Range_error : out_of_range { // enhanced vector range error reporting int index; Range_error(int i) :out_of_range("Range error: "+to_string(i)), index(i) { } }; } // trivially range-checked vector (no iterator checking): template< class T> struct Vector : public std::vector<T> {
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/26/2011 for the course ECE 112 taught by Professor Doraty during the Spring '11 term at Texas A&M.

Page1 / 3

std_lib_facilities - /* simple ENGN112 course header to be...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online