2010-07-18 2 views

답변

7

예외 모드의 참조를 리턴 할 수 있으며, 예를 들어 0으로 설정되고 : 그것은 BTW

void set_exception_mode(uint v) { mode = v; }; 

:

unsigned int& exception_mode() { return mode; }; 

따라서, 두 번째 행에 해당 될 정말 못 생겼어! 내가 할 수있는 한이 문법을 피할 것이다.

3

이 함수는 아마도 int에 대한 참조를 반환합니다.

unsigned int exceptionMode; // Declared somewhere 
// ... 
unsigned int& cimg::exception_mode() { return exceptionMode; } 
// ... 
cimg::exception_mode() = 0; // Equivalent to exceptionMode = 0; 

이는 리터 값 역할 리턴 어떤 수있다. 이 경우 참조 된 int을 0으로 설정합니다.

관련 문제