목록개발 공부/C++ 약점공략 (30)
음악, 삶, 개발
C++ this 포인터? 그럼 *this 는 뭐지? [C/C++] this 포인터 이해 및 활용 this 포인터 C++ this 포인터 this 포인터 [C++ 때려잡기] C++ 심화강의 5 this 포인터 [C++] this 포인터 [C++ 기본 공부정리] 14 -3.OOP - this 포인터 C++ this 포인터 C++ this포인터에 관하여 C++ this 포인터 [C++] 클래스 4.this 포인터 this 포인터 [C++] this 포인터 [C++의 특징-5] This 포인터와 Friend [c++] this 포인터
19. 임시객체 More Effect C++ 19장 임시 객체의 원류를 정확히 이해하자 임시객체의 origin 을 이해하자 Temporary Object 란? C++ 클래스의 임시객체 [C++] 임시 객체에 대하여... [C++ 심화] 3일차 - 1. 임시객체 임시객체란 C++ 임시객체 이야기 임시객체
외국) Stackoverflow : What are rvalues, lvalues, xvalues, glvalues, and prvalues? Understanding the meaning of lvalues and rvalues in C++ The Notion of Lvalues and Rvalues 국내) LValue RValue 임시객체 개념파악하기 [C++] lvalue와 rvalue Lvalue 와 Rvalue 정리 lvalue와 rvalue 질문드립니다.
참고자료 Const Correctness
24807 : Why is processing a sorted array faster than processing an unsorted array? 9086 : What is the ??->??operator in C++? 4242 : The Definitive C++ Book Guide and List 3338 : What are the differences between a pointer variable and a reference variable in C++? 3026 : How do I iterate over the words of a string? 2989 : What does the explicit keyword mean? 2719 : Why is ?쐕sing namespace std;??co..
참고자료 Programiz : C++ Functions Google C++ Style Guide : Functions C++ Core Guidelines : Functions (영문) C++ Core Guidelines : 함수 (한글) Stackoverflow : Should I return const objects? Stackoverflow : Purpose of returning by const value? Stackoverflow : What are the use cases for having a function return by const value for non-builtin type? Stackoverflow : Is the practice of returning a C++ reference..
요약 - 연산자별로 규칙과 주의사항이 틀리니, 다 따로 공부해야한다. - =, (), [ ], -> 연산자는 반드시 멤버 함수여야한다. - 멤버 함수일때는 한 개의 인자, 전역 함수일때는 2개의 인자가 필요하다. (3개 이상은 가질수없음) - + 연산자는 교환법칙이 성립해도록 (예 : myClass + 1 또는 1 + myClass) 멤버 함수, 전역 함수 둘다 정의되어야함. (코드 참조) - + 연산자는 좌측 피연산자, 우측 피연산자, return type 모두 읽기만 하기때문에 모두 const. 따라서 함수도 () const {} - + 연산자는 return type은 const, 인자는 const reference - 연산자 오버로딩 함수 구현시, 생성자를 활용한다. - 오버로딩 함수의 피연산자중 ..
https://stackoverflow.com/questions/2446142/how-to-differentiate-two-constructors-with-the-same-parameters http://tcpschool.com/cpp/cpp_conDestructor_defaultConstructor
juce 의 Random 클래스로 객체를 생성후 습관적으로 앞에 const 를 붙였더니, 아래와 같은 에러가 발생하였다. 에러 메세지 : "the object has type qualifiers that are not compatible with the member function" 즉, "이 객체의 type 지정자는 멤버 함수와 호환되지않습니다" 그래서, juce::Random 앞에 const 를 제거했더니, 정상적으로 컴파일 되었다. 이 부분에 대해 의문이 생겨, 위 에러 메세지로 stackoverflow 에 검색을 해보았더니, 역시나, 나와같은 궁금증을 가진 사람이 있었고, 아래와 같은 답변이 있었다. 핵심은.. "You cannot call a non-const method with a const..
https://www.sourcetrail.com/blog/const_friend_or_foe_in_cpp/ https://www.studytonight.com/cpp/const-keyword.php https://www.cprogramming.com/tutorial/const_correctness.html https://docs.microsoft.com/en-us/cpp/cpp/const-cpp?view=vs-2019 https://dydtjr1128.github.io/cpp/2020/01/08/Cpp-const.html https://www.cppkorea.org/CppCoreGuidelines/Const/ https://m.blog.naver.com/PostView.nhn?blogId=taeil34..