Thanks in advance
1) I've been away a while and this has become more widespread... ::std::cout. Why the extra scope operator ( :: ) in front? Is it faster or safer? Is it just a precautionary measure incase for some reason you don't know if the programmer will override "std" so tell the compiler to look up one scope?
2) Does this exist anymore? It doesn't compile in my version of MinGW (GCC 3.4.5):
Should be equivalent to C#'s a.DoSomething<int>().Code:class A { public: template<typename T> void DoSomething() { // do something with datatype } }; int main() { A a; a.template DoSomething<int>(); }
Should I try "Testing: gcc-4.3.0-20080502-mingw32-alpha"?
3) Commonly DLL's will have one and only one method: GetInterface() (or something) which returns a pointer to an object (use GetProcAddress and casting). Would you suggest storing the result as a pointer, pointer to a pointer, or a reference? I guess the advantage of a pointer to a pointer is if the pointer is changed by the DLL, it would carry through to the applications. Is there an advantage to a reference (other than matching syntax)?