16 15 C:\Users\86137\Desktop\未命??.cpp [Error] unable to find numeric literal operator 'operator""m'
时间: 2023-09-10 19:11:01 浏览: 95
Visual Studio创建Qt项目时“Unable to find a Qt build”错误的解决方法1
This error message indicates that the compiler is unable to find a user-defined numeric literal operator for the 'm' suffix. This operator is typically used to define custom units of measure in C++ programs.
To resolve this error, you may need to define a numeric literal operator for the 'm' suffix in your code. This can be done using the following syntax:
```
constexpr long double operator"" m(long double value) {
return value * 1000.0; // convert meters to millimeters
}
```
In this example, the operator converts a value in meters to millimeters. You can modify the implementation of the operator to suit your specific needs.
Once you have defined the operator, you should be able to use the 'm' suffix in your code without encountering the error message.
阅读全文