阅读背景:

C语言中结构多态的最佳方法

来源:互联网 

I'm writing a simple 2d vector object. It will have x and y components, and length, cross product, etc. methods. The thing is, I want to have the structure to have many possible types (char, int, float, double, etc.). I was wondering what would be the best choice, design wise, to interact with the object? Here's what I'm currently considering:I'm writing a simple 2d vector object. It will




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: