I made a class with this sort of structure...
class A
{
public:
// funcs
private:
class A_Impl;
A_Impl* impl_;
};
and in the implementation file....
class A::A_Impl
{
// A's implementation
}
Now I believe this is right and it compiles fine but in classview instead...
I have been using C++ lately rather than C. In C we have no namespaces so defining a global variable in one translation unit and declaring it as extern in another is fine. I know I can also do that in C++ but what I am trying to do instead is to have a namespace scoped variable extern'ed. Can it...
Hi. I have been programming for windows in C for a few years now but would like in future to use C++. I originally learnt API programming with Petzold's excellent 4th edition of programming windows. Now when I program in C++ at the moment im really only using it as a better C and not fully OOP...
On the whole I understand virtual functions but there is one thing I cant fathom....
virtuality.h
#include <iostream>
using std::cout;
using std::endl;
class A
{
public:
virtual ~A() {}
virtual void f() { cout << "A::f()" << endl; }
};
class B : public A
{...
On the whole I understand virtual functions but there is one thing I cant fathom....
virtuality.h
#include <iostream>
using std::cout;
using std::endl;
class A
{
public:
virtual ~A() {}
virtual void f() { cout << "A::f()" << endl; }
};
class B : public A
{...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.