본문 바로가기
반응형

해결34

Effective C++ 항목11 : operator에서는 자기대입에 대한 처리가 빠지지 않도록 하자 Effective C++ 항목11 operator에서는 자기대입에 대한 처리가 빠지지 않도록 하자 선 요약 operator=함수를 구현할 때, 자기대입을 제대로 처리하도록 하자. 객체간의 주소 비교 호출 순서를 적절히 조절 "복사 후 맞바꾸기" 기법 두 개 이상의 객체에 대해 동작하는 함수가 있다면, 이 함수에 넘겨지는 객체들이 사실 같은 객체인지 정확하게 체크하자. class Widget{ ... } Widget w; ... w = w // 자기에 대한 대입 위와 같이 C++에서는 자기 자신을 대입하는 자기대입이 적법(legal)하다. 자기대입은 여러 곳에서 하나의 객체를 참조하는 상태, 즉 중복참조라고도 불린다. 중복참조란? class Base { ... } class Derived { ... } v.. 2023. 2. 18.
xcode firebase sdk 적용 방법 xcode firebase sdk 적용 방법 mac os 환경에서 앱을 빌드할 때, 구글 firebase관련하여 의존성 문제가 생기곤 한다. 이 문제는 firebase sdk를 인식하지 못하는 문제로서 필요한 plist파일 등록 및 리빌드하면 된다. 해결 방법 순서 Firebase console에 접속 iOS앱에 Firebase추가 진입 후, GoogleService-info.plist 다운로드 xcode프로젝트에 GoogleService-info.plist 추가 후 리빌드 빌드 성공 확인 2023. 1. 21.
[Git] remote: Support for password authentication was removed. Please use a personal access token instead. fatal: Authentication failed for ~ [Git] remote: Support for password authentication was removed. Please use a personal access token instead. fatal: Authentication failed for ~ 문제 상황 깃허브에 git push를 할 때, 아이디와 패스워드를 입력하니 인증 실패 메시지가 나오며 푸쉬에 실패한다. 해결 방법 깃헙 설정 페이지에서 personal access token을 받아서 비밀번호로 입력하면 푸쉬에 성공한다. 경로 : 깃허브 설정 > Settings > Personal access tokens > 신규 토큰 발행 해당 토큰을 깃 푸쉬할 때 비밀번호로 입력하면 끝. 2023. 1. 20.
[ios] Unhandled Exception: [core/not-initialized] Firebase has not been correctly initialized [ios] Unhandled Exception: [core/not-initialized] Firebase has not been correctly initialized 문제 상황 빌드할 때 에러 메시지와 함께 실패한다. Unhandled Exception: [core/not-initialized] Firebase has not been correctly initialized 해결 방법 1. 구글 파이어베이스 콘솔에서 GoogleServices-Info.plist를 생성하여 플러터 프로젝트에 포함시킨다. 해당 파일은 Info.plist와 같은 디렉터리에 복사해주면 된다. 2. main()함수에서 await Firebase.initializeApp(); 을 호출한다. 아래 참고! Future main() a.. 2023. 1. 14.
반응형