13.07.2015 Views

BABAR C++ Course Running the Examples - HEPHY

BABAR C++ Course Running the Examples - HEPHY

BABAR C++ Course Running the Examples - HEPHY

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Use of private keywordInitializing a class objectWe have• <strong>the</strong> following compiles• <strong>the</strong> following does not compile• this is called data hidingclass Hep3VectorF {public:float mag();float x();float dummy;// member functionsprivate:float fx, fy, fz;};Hep3VectorF x(1.0, 0.0, 0.0);cout

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

Saved successfully!

Ooh no, something went wrong!