C++ 14 program -doubt?
I am new CLion. I am testing a C++ 14 program. I am getting following error as an screen shot. I am using Widnows with MinGW 3.20
Not sure, why it is not compling and giving error
#include<iostream>
#include <complex>
using namespace std;
int main() {
// Store a generalized lambda, that squares a number, in a variable
auto func = [ ](auto input) {
return input * input; };
// Usage examples:
// square of an int
std::cout
<< func(
10)
<< std::endl;
// square of a double
std::cout
<< func(
2.345)
<< std::endl;
// square of a complex number
std::cout
<< func(
std::complex<
double>(
3, -
2))
<< std::endl;
return 0;
}
Many Thanks,
Chandra
请先登录再写评论。
Any suggestions Welcome....waiting to solve this issue :|