include stdio include algorithm class public int Method return std min

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdio.h>
#include <algorithm>
class A {
public:
int Method() { return std::min(kVar - 0, 1); }
// int Method() { return std::min(kVar, 1); }
private:
static const int kVar = 1000;
char arr[kVar];
};
//const int A::kVar;
int main(int argc, char **argv) {
A a;
fprintf(stderr, "%d\n", a.Method());
return 0;
}