Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
class3.cpp
- Committer:
- Aagrus
- Date:
- 2020-10-13
- Revision:
- 2:7a0bae2281e8
- Parent:
- 1:c65875995efb
File content as of revision 2:7a0bae2281e8:
class MyClassC
{
private:
const int _a; // Zuweisung von Konstanten und Referenzen ist nur in der
int& _b; // Initialisierungsliste, nicht im Konstruktorrumpf zulässig.
int _c;
int _d;
public:
MyClassC(int& refB) : _b(refB), _a(2)
{
_c = 0;
_d = 0;
}
MyClassC(int& refB, int const a) : _b(refB), _a(a)
{
_c = 0;
_d = 0;
}
MyClassC(int& refB, int const a, int c, int d) : _b(refB), _a(a), _c(c), _d(d)
{
}
static int foo()
{
return 10;
}
int GetA(void) {return _a;}
//int GetB(void) {return _b;}
int GetC(void) {return _c;}
int GetD(void) {return _d;}
};