gurus,
i am trying to understand virtual functions.
Why does the line "A s = B()" in the code below not
compile (error C2259: 'A' : can not instiante abstract class)
but the line A* t = new B() works perfectly ok.
I would prefer not to use pointers as memory leaks
tend to occur.
I am using visual studio 2005.

class A
{
public:
virtual void func() = 0;
};

class B : public A
{
public:
virtual void func();
};

void B::func()
{

}

int main()
{
A* t = new B(); // compiles perfectly ok
A s = B(); // error C2259
return 1;
}

thank you