this way I can call virtual function?
class A
{
public:
virtual pure() = 0;
create () ;
}
a::create(){ ... pure(); ...}
A a;
a.create()??
this way what does the pure() do?
You mean I can instance it?
or I can instance it and just use the function it not include pure virtual function?
class A
{
public:
virtual pure() = 0;
create () ;
run () ;
}
A::create(){ ... pure(); ...}
A::run() {pintf ("test");}
A a;
So I can't call create(); I can call run()?
or I can instance it and just use the function it not include pure virtual function?
class A
{
public:
virtual pure() = 0;
create () ;
run () ;
}
A::create(){ ... pure(); ...}
A::run() {pintf ("test");}
A a;
So I can't call create(); I can call run()?
You can't call either. The class is incomplete & thus you won't be able to create any instances of it (also you didn't specify types for create() or run())
Erm does that answer the question?
Erm does that answer the question?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement