I had to think of a way of preventing him from following me around all morning.这里a way后面

问题描述:

I had to think of a way of preventing him from following me around all morning.这里a way后面
为什么用of ,用to可以吗

a way of 后面是加 doing,而a way to后面是加to do.
在这句中,既然preventing 是ing形式,那就应该是用of.