2 c++ xcode compiler-errors class visual-studio
这是C++类的一个赋值,它在Windows上的Visual Studio 2013中编译和运行完美,但我主要在Vim或Xcode中的OSX上编码.
XCode立即向我显示错误"行中没有用于初始化'Vector'的匹配构造函数",当我尝试使用Makefile和终端进行编译时也是如此.
Vektor C = A + B; // !!! no matching constructor for initialization of 'Vector'
Run Code Online (Sandbox Code Playgroud)
然而,
Vektor B = A;
A + B;
Run Code Online (Sandbox Code Playgroud)
在OSX和Windows上都能完美运行.
我没有尝试导出/导入项目文件,它是每个环境中的全新文件.
完整的代码:http://pastebin.com/xabY0w08
这是一个已知的问题,如果是这样,为什么会发生这种问题,有没有办法让它发挥作用?
归档时间: |
|
查看次数: |
673 次 |
最近记录: |