在C++中用Python仿真函数导入
在python中,我可以执行以下操作: 从长到短,痛苦的导入仍然是长到短 在C++中,我被困:在C++中用Python仿真函数导入,c++,C++,在python中,我可以执行以下操作: 从长到短,痛苦的导入仍然是长到短 在C++中,我被困: using long::and::painful::stillWayToLong; ... //Code and Stuff stillWayToLong("Why must I type this so often?"); 我是不是错过了一些能让这更像蟒蛇的东西?怎么样 auto x = long::and::painful::stillWayToLong; // If this is an o
using long::and::painful::stillWayToLong;
... //Code and Stuff
stillWayToLong("Why must I type this so often?");
我是不是错过了一些能让这更像蟒蛇的东西?怎么样
auto x = long::and::painful::stillWayToLong; // If this is an object/function
x("Why must I type this so often?");
using X = typename long::and::painful::stillWayToLong; // If this is a type.
X bob;
让它更像是python,不,但是你也许不能使用很长的标识符。当然,不要尝试用C++中的标识符作为标识符。或者长的,或者相关的?为了完整性起见,使用x=long::And::pauld::stillWayToLong;如果stillWayTooLong是一个名称空间。