void add(int register, int& acc)
{
acc += register;
}
main.cpp:124: error: expected primary-expression before 'register'
wth is wrong right there?
“ register ”是C ++中的关键字(主要是C天的宿醉)
register
is a C++ keyword, rename this to something else. It's used to qualify variables as a hint to the compiler to optimize the variable's storage directly to a CPU register rather than RAM - see here .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.