- 我不是程序员
- 我想在 win32 中编译 Inkscape,偶然发现了这些错误消息:
ui/dialog/filedialogimpl-win32.cpp:1379: error: in C++98 'matrix' must be initialized by constructor, not by '{...}'
make[1]: *** [ui/dialog/filedialogimpl-win32.o] Error 1
filedialogimpl-win32.cpp
疑似代码:
... // Draw the image if(_preview_bitmap_image) // Is the image a pixbuf? { // Set the transformation const Matrix matrix = { scaleFactor, 0, 0, scaleFactor, svgX, svgY }; context->set_matrix (matrix); ...
那么C++98标准是怎么写的呢?
我已经用谷歌搜索了,但没有人遇到过这种情况,这可能是无关的吗?
最佳答案
代替
const 矩阵矩阵 = {
比例因子,0,
0,比例因子,
svgX, svgY };
应该是这样的:
常量矩阵矩阵(
比例因子,0,
0,比例因子,
svgX, svgY );
关于c++ - 在 C++98 中初始化矩阵的正确方法是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1833362/