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;
}


CLion_2.PNG
Clion_1.PNG

Many Thanks,
Chandra

1 comment
Comment actions Permalink

Any suggestions Welcome....waiting to solve this issue :|

0

Please sign in to leave a comment.