|
Boost Users : |
From: Ãkos Maróy (akos_at_[hidden])
Date: 2008-07-21 06:57:14
Hi,
This is probably a lame question, but I have some open issues I don't
know how are handled in contemporary C++ style, for example with using
boost coding convetions. I've been using the CamelCase naming convention
from Java recently, where the issues below are non-issues actually. for
example:
- how do I create an instance of the same name as its type?
in CamelCase:
class Foo;
Foo foo;
in C++:
class foo;
foo foo; // won't compile
what's the solution here? add some prefix to the instance's name?
- how do I declare accessor functions to private members?
in Java / CamelCase:
class Foo {
private int bar;
public int getBar() { return bar; }
};
in C++:
class foo {
private:
int bar;
public:
int bar() const { return bar; } // won't compile
};
should I put some prefix to the private member's name?
Sorry for the lame questions :) But I just want to follow the guideline
of 'in Rome, do as the Romans do' :)
Akos
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net