Call by reference of bool types
How can I change this piece of code to a working one?! #include <iostream> void foo( bool &b ) // ERROR in passing argument 1 of ‘void foo(bool&)’ { std::cout << b <<...
stackoverflow.com
// 이렇게는 사용할 수 없다 ! !
void foo(bool& b);
// const를 붙이면 가능하다.
void foo(const bool& b);
'자료구조 & 알고리즘 > 기타' 카테고리의 다른 글
증가하는 시퀀스로 값 채우기 (0) | 2023.03.31 |
---|---|
set.insert()의 반환 값 (0) | 2023.03.23 |
std::replace (0) | 2023.03.14 |
unique()를 활용한 연속된 값의 제거 (0) | 2023.03.04 |
문자열에서 문자를 검색하는 strchr() (0) | 2023.03.04 |