次のように forloop for vector を構築しようとすると:
vector<int> v;
int a;
while (cin>>a){
if(i<=0 || i>=10)
cout << "Please enter int between 0 and 10:" << endl;
else
v.push_back(a);
}
int min;
int sum;
for (int &i: v){
if(v.empty())
min = i;
else(i<min){
min = i;
sum += i;
}
}
それは :expected initializer before â token を示しています
どこで間違ったのですか?本当にありがとう!
.bashrc:
これが私の.bashrcです:
# .bashrc
# User specific aliases and functions
export PATH=/usr/remote/gcc-4.8/bin:$PATH
export LD_LIBRARY_PATH=/usr/remote/gcc-4.8/lib:$LD_LIBRARY_PATH
alias g++='g++ -std=c++11'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fio9