Level 0. 옹알이 (1) 정규 표현식을 이용하여 해결했다. regex_replace 시에 마지막에 regex_constants::format_first_only 파라미터를 주면 첫 번째 매치만 교체할 수 있다. 일치된 문자열을 길이만큼 '_'로 바꾼 후 모든 문자가 '_'로 바뀌었는지 확인하였다. #include #include #include using namespace std; int solution(vector babbling) { int answer = 0; for (string s : babbling) { size_t length = s.length(); vector words = {"aya", "ye", "woo", "ma"}; for (string word : words) s = reg..
Unreal Engine: Ultimate Survival Horror Course Starter Content의 SM_Door는 기본적으로 Collision이 적용되어 있지 않다. Collision - Add Box Simplified Collision을 클릭해 Box Collision을 추가해준다. 좌측 상단 메뉴를 통해 탑뷰, Wireframe 모드 등으로 설정이 가능하다. Details 창 Collision - Primitives - Boxes - 0에서 Box Collision의 위치와 크기를 지정해준다. E 버튼으로 상호작용 가능한 액터인 BP_Interaction의 자식으로 문 Blueprint Class를 만든다. 문 프레임을 위한 Static Mesh와 Material을 설정한다. 문 몸..
코딩 테스트를 위한 자료 구조와 알고리즘 with C++ 임의 접근 반복자(Randon Access Iterator) 특정 위치의 원소에 바로 접근할 수 있는 반복자 vector, array 등에서 사용된다. 순방향 반복자(Forward Iterator) 한 쪽 방향으로만 진행하고 증가 연산만 가능한 반복자 forward_list에서 사용된다. 양방향 반복자(Bidirectional Iterator) 양쪽 방향으로 진행 가능하고 증감 연산을 지원하는 반복자 대부분의 STL 컨테이너에서 지원한다. 반복자의 성능 vector, array에서 next(), prev()는 O(1)에 수행된다. forward_list, list에서 next(), prev()는 선형 시간이 소요된다. std::iterator 앞에..
Unreal Engine: Ultimate Survival Horror Course 에셋을 다음과 같이 관리하면 좋다. 원본 파일 경로 : RawContent/Textures/Crosshair.png 에셋 경로 : Content/Textures/Crosshair 크로스헤어 이미지를 임포트한다. 이미지를 UI용으로 설정한다. Compression - Compression Settings: UserInterface2D (RGBA) Level Of Detail - Texture Group: UI 크로스헤어용 Widget Blueprint를 만든다. Fill Screen을 Desired on Screen으로 변경하고 Size Box, Image를 추가해준다. Size Box의 크기를 설정해준다. Image를 설..
Visual Commander 확장을 설치한다. Visual Studio를 끄고 설치해야 한다. Visual Commander - Modern alternative to Visual Studio macros Visual Commander The freemium Visual Commander extension lets you automate repetitive tasks in Visual Studio 2022/2019/2017 and SSMS 17/2016. You can reuse existing Visual Studio macros from previous versions of the IDE and create new commands and extensio vlasovstudio.com ue4_smar..