Hi,
I am new to cpp
I have some programs and have a question about "identifiers at the end of the method name"
When and why are they necessary?
For example, Consider the following code
In other languages I will simply write something likeCode:class Table1D { ... bool Save(const char *name) const; ... }
(without the const identifier)Code:bool Save(const char *name)
Another example is here:
Why "const" goes to the end, and where should I put an identifier in the end?Code:float Triangle(const blob &p1, const blob &p2) const { return 0.5f*fabs((p1.x-x)*(p2.y-y)-(p1.y-y)*(p2.x-x)); }
Thanks.



LinkBack URL
About LinkBacks



