chore: use c++ 11
This commit is contained in:
parent
e7be1ed974
commit
11712ab019
2 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,7 @@ project(
|
|||
'cs010b-work',
|
||||
'cpp',
|
||||
version: '0.1',
|
||||
default_options: ['warning_level=3', 'cpp_std=c++23'],
|
||||
default_options: ['warning_level=3', 'cpp_std=c++11'],
|
||||
)
|
||||
|
||||
c_1_lab_1 = executable('c_1_lab_1', 'src/chapter_1/c_1_lab_1.cpp', install: true)
|
||||
|
|
|
@ -44,7 +44,7 @@ int main(int argc, char *argv[]) {
|
|||
input.close();
|
||||
|
||||
// Get integer average of all values read in.
|
||||
int sum = std::accumulate(values.begin(), values.end(), 0);
|
||||
int sum = std::accumulate(values.begin(), values.end(), 0, std::plus<int>());
|
||||
int average = sum / static_cast<int>(values.size());
|
||||
|
||||
// Convert each value within vector to be the difference between the original
|
||||
|
|
Loading…
Reference in a new issue