c 2b 2b compare contents of two arrays

Solutions on MaxInterview for c 2b 2b compare contents of two arrays by the best coders in the world

showing results for - "c 2b 2b compare contents of two arrays"
Nele
09 Jan 2017
1std::array<int, 5> iar1 {1,2,3,4,5};
2std::array<int, 5> iar2 {1,2,3,4,5};
3
4if( iar1 == iar2 ) {
5  // arrays contents are the same
6
7} else {
8  // not the same
9
10}
11