MAC icon indicating copy to clipboard operation
MAC copied to clipboard

There is a problem with the MAC installation

Open fanvanf opened this issue 2 years ago • 1 comments

There is a problem with the MAC installation when I use the recommended command g++ MAC2.0.cpp -o MAC2.0 The error shows:

MAC2.0.cpp: In function ‘Vi findNumbers(std::__cxx11::string&, Vi&)’:
MAC2.0.cpp:82:15: error: ‘i’ does not name a type
     for (auto i: inc) res.pb(numarr[i-1]);
               ^
MAC2.0.cpp:83:5: error: expected ‘;’ before ‘return’
     return res;
     ^
MAC2.0.cpp:83:5: error: expected primary-expression before ‘return’
MAC2.0.cpp:83:5: error: expected ‘;’ before ‘return’
MAC2.0.cpp:83:5: error: expected primary-expression before ‘return’
MAC2.0.cpp:83:5: error: expected ‘)’ before ‘return’
MAC2.0.cpp: In function ‘void buildContig()’:
MAC2.0.cpp:103:28: error: in C++98 ‘inc’ must be initialized by constructor, not by ‘{...}’
     Vi inc = {1,2,3,4,13,14};
                            ^
MAC2.0.cpp:103:28: error: could not convert ‘{1, 2, 3, 4, 13, 14}’ from ‘<brace-enclosed initializer list>’ to ‘Vi {aka std::vector<int>}’
MAC2.0.cpp:108:21: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
         gene.pb(Gene{min(align_info[2],align_info[3]), max(align_info[2],align_info[3]), min(align_info

But when I use g++ -std=c++11 -std=gnu++11 MAC2.0.cpp -o MAC2.0,it works.The MAC is available. So ,the recommended installation command can be replaced by g++ -std=c++11 -std=gnu++11 MAC2.0.cpp -o MAC2.0

fanvanf avatar Jul 28 '22 05:07 fanvanf

您的邮件我已收到,谢谢!

LiTang1013 avatar Jul 28 '22 05:07 LiTang1013