| | 186 | } |
| | 187 | |
| | 188 | int& IntLijst::operator[] (int index) |
| | 189 | { |
| | 190 | if (index > m_AantalElementen || index < 0) |
| | 191 | |
| | 192 | index = 0; |
| | 193 | return m_DynArrPtr[index]; |
| | 194 | } |
| | 195 | |
| | 196 | tstringstream& operator<<(tstringstream& stream, IntLijst& lijst) |
| | 197 | { |
| | 198 | for (int i=0;i<lijst.m_AantalElementen;++i) |
| | 199 | { |
| | 200 | stream << "[" << i << "]= " << lijst.m_DynArrPtr[i] << " \n "; |
| | 201 | |
| | 202 | } |
| | 203 | return stream; |
| | 204 | } |
| | 205 | tstring operator+(tstring string, IntLijst& lijst) |
| | 206 | { |
| | 207 | tstringstream temp; |
| | 208 | temp << string; |
| | 209 | temp << lijst; |
| | 210 | return temp.str(); |