什么是关联(association)和依赖(dependency)之间的区别?你能给出代码示例吗?类A和B之间有什么关系?
class A
{
B *b;
void f ()
{
b = new B ();
b->f();
delete b;
}
}