25.09.2017 Views

cpp_tutorial

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

C++<br />

};<br />

if(index >= oc.a.size()) return false;<br />

if(oc.a[++index] == 0) return false;<br />

return true;<br />

}<br />

bool operator++(int) // Postfix version<br />

{<br />

return operator++();<br />

}<br />

// overload operator-><br />

Obj* operator->() const<br />

{<br />

if(!oc.a[index])<br />

{<br />

cout f(); // smart pointer call<br />

sp->g();<br />

} while(sp++);<br />

return 0;<br />

221

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!