전체 글 173

VSCode mac gcc bits/stdc++.h 헤더 추가

분명히 gcc임에도 #include 하면 오류가 난다. 간단히 해결해보자. cd /usr/local/include/bits 로 와서 아래 내용을 넣고 stdc++.h로 저장하자. 매우 간단ㅋ // C++ includes used for precompiling -*- C++ -*- // Copyright (C) 2003-2013 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as ..

Programming 2020.04.08

VSCode auto format 중괄호 문제

중괄호 문제는 아니고 사실은 그냥 취향 VSCode 기본 오토 포맷은 다음과 같다. if (condition ) { Hi(); } 상당히 거슬린다. 다음과 같이 바꾸고 싶다. if (condition ) { Hi(); } 세팅에 들어와서 [C_Cpp.clang_format_fallbackStyle] 검색 기존의 Visual Studio를 { BasedOnStyle: Google, IndentWidth: 3 }로 바꾼다. 이제 내가 원하는 대로 중괄호 포맷팅이 된다. 휴 편안 P.S. 저장 시 자동 포맷팅은 [Format On Save] 옵션에 체크하면 된다.

Programming 2020.04.08