getting_started:cplusplus
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
getting_started:cplusplus [2015/10/13 12:44] – [Using Constructors] graf | getting_started:cplusplus [2017/09/24 15:29] (current) – removed graf | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== C++ for Beginners ====== | ||
- | This is a very short introduction into a couple of concepts of C++. It should enable a beginner without knowledge in C++ to properly use EEROS in an own simple application. | ||
- | |||
- | ===== Namespaces ===== | ||
- | With namespaces you can group entities such as classes or enums under a choosen name. In this way the global scope can be split into subscopes with distinguished names. EEROS heavely uses namespaces. | ||
- | In order to use declarations from these namespaces we can either import such a namespace or use the scope operator '::' | ||
- | <code cpp> | ||
- | using namespace eeros:: | ||
- | int main(int argc, char **argv) { | ||
- | StreamLogWriter w(std:: | ||
- | Logger< | ||
- | Logger< | ||
- | |||
- | eeros:: | ||
- | |||
- | using eeros:: | ||
- | Gain<> | ||
- | </ | ||
- | With 'using namespace eeros:: | ||
- | The block ' | ||
- | The block ' | ||
- | |||
- | ===== Using Constructors ===== | ||
- | Constructors - as any other function - can be overloaded. | ||
getting_started/cplusplus.1444733044.txt.gz · Last modified: 2015/10/13 12:44 by graf