![]() |
#2
rjsp2021-04-09 14:16
|
[Error] 'f1' was not declared in this scope
该如何定义f1这个变量?代码如下:

#include<iostream>
using namespace std;
void func(int x,int y){
cout<<x<<" "<<y;
}
int main(){
auto f1=bind(func,_1,_2);
f1(3,6);
return 0;
}
using namespace std;
void func(int x,int y){
cout<<x<<" "<<y;
}
int main(){
auto f1=bind(func,_1,_2);
f1(3,6);
return 0;
}