Closed howsiwei closed 4 years ago
Noted, which cpp files got that? I remember using a few like this but it shouldn't be that many and can be fixed easily.
I spotted SuffixArray _T max_flow _V so far will fix them
the _x and _y for points (ch7) should be ok I guess
$ rg -tcpp '\b_[A-Z]'
ch8/maxflow.cpp
68: max_flow(int _V) : V(_V) {
ch2/ourown/segmenttree_ds.cpp
71: SegmentTree(const vi &_A) : SegmentTree((int)_A.size()) {
72: A = _A;
152:// SegmentTree(const vi &_A) : SegmentTree((int)_A.size()) {
153:// A = _A;
ch6/sa_lcp.cpp
71: SuffixArray(const char* _T, const int _n) : T(_T), n(_n) {
ch9/SparseTable.cpp
13: SparseTable(vi &_A) : A(_A) { // pre-processing routine
36: SpT[i][j] = _A[x] <= _A[y] ? x : y;
ch9/mcmf.cpp
68: min_cost_max_flow(int _V) : V(_V), total_cost(0) {
Thanks, all fixed on my side and in the body text, will push these updates in a few minutes.
Apparently this _ thingy only appear in class construction when I have same variable name between internal variable and the parameter of the constructor ...
This repository has a few C++ code that uses variable with name that begins with an underscore followed by an uppercase letter. However, this is technically undefined behavior in C++.
According to https://en.cppreference.com/w/cpp/language/identifiers,