friend 키워드에 이어서 explicit 키워드에 대해서도 간략하게 정리하고 넘어가보려 한다. (틀린 부분이 있다면 말씀해주세요.) 해당 키워드는 어떤 모호한 타입이 들어왔을 때 자동으로 형변환이 된다면, 해당 타입으로 변환을 해주는 것이다. 간략한 예시를 바탕으로 설명해보겠다. #include class MyData { public: int my_int_data; MyData(int md): my_int_data(md) {} ~MyData(){}; int get_data() const {return my_int_data;} }; void increament_and_show(MyData md) { int tmp=md.get_data(); std::cout
friend keyword에 대해서 간단하게 내용을 정리하고 넘어가려 합니다. 클래스 멤버 중에는 private로 선언된 멤버들이 있을 겁니다. 하지만 클래스 외부에서는 권한이 없으므로 해당 멤버에 접근하지 못합니다.. 이 때 클래스 외부에서 해당 private member들을 접근할 수 있도록 해주는 것이 바로 friend 키워드입니다. 해당 키워드는 아래의 방법처럼 사용이 가능합니다. 간단한 예시도 함께 보겠습니다. #include class Information { public: int updateValue(int newValue) { int oldValue=value; value=newValue; return oldValue; } private: friend void friendAccess(); ..
- Total
- Today
- Yesterday
- convolution
- ScientificReports
- LossFunction
- separable
- Focal loss
- PCA
- AdamOptimizer
- logitadjustment
- classimbalance
- depthwise
- imbalanceddata
- MobileNet
- tensorflow
- MGFA
- eigenvector
- 다중세밀도
- 경량화 모델
- 선형대수
- 특징융합
- Example
- DeepLearning
- code
- Optimizer
- fisherconsistency
- CriticV
- GradientScaling
- 논문리뷰
- vlm
- 딥러닝
- GradientDescent
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |