-
as seen on Stack Overflow
- Search for 'Stack Overflow'
i wonder if one should create a helper function in a class as a static function or just have it declared as a procedural function?
i tend to think that a static helper function is the right way to go cause then i can see what kind of helper function it is eg. Database::connect(), File::create().
what…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm looking at a member function
int funct(int x) const;
And I'm wondering if
static int funct(int x);
would be better.
If a member function doesn't use any of the member variables should it be static. Are there any things that would discourage this?
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
We're currently converting a Delphi 2007 project to Delphi 2010. We were already using Unicode (via WideStrings and TNT Unicode Controls).
I was expecting to replace all Wide functions, e.g. WideUpperCase, with their equivalent, e.g. UpperCase, but they do not work the same way. For example, WideUpperCase…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I know this question might be frowned upon, but actionscript is a dynamic language similar to javascript and in javascript I can take an object from a library written by someone else and dynamically (at runtime) add/remove/modify functions, properties, prototypes etc. this is kind of like dynamically…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Sorry for long winded title, this makes a lot more sense with an example.
Suppose we have a class A:
class A {
public:
void someFunction();
void someOtherFunction();
};
And another class that privately inherits from A. However, we re-declare one of the inherited functions as…
>>> More