请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:TMS320F28335 工具/软件:Code Composer Studio
您好!
是否可以在 GUI Composer v1中绑定 CPP 对象? 如果是、如何操作?
谢谢、
斯蒂芬
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
工具/软件:Code Composer Studio
您好!
是否可以在 GUI Composer v1中绑定 CPP 对象? 如果是、如何操作?
谢谢、
斯蒂芬
尊敬的 Stephen:
它的工作方式与 C 项目相同、将希望 GC 绑定的对象声明为全局对象。
例如:
类矩形{
内部宽度、高度;
公共:
void set_values (int、int);
int area(){return width*height;}
;
void Rectangle::set_values (int x, int y){
width = x;
height = y;
}
Rectangle rect;
int main (){
rect.set_values (3,4);
cout <<"area:"<< rect.area();
return 0;
}
您应该能够将 rect.width 绑定到 GC 中的小部件。
此致、
Patrick