728x90

Languege 7

VS code에서 bits/stdc++.h 해더

*디렉토리는 다를수 있음 !! MinGW 에서 bits 폴더를 VS Code 폴더에 복사 C:\MinGW\lib\gcc\mingw32\6.3.0\include\c++\bits C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include stdc++.h 파일을 생성하고 bits폴더로 이동 C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\bits // C++ includes used for precompiling -*- C++ -*- // Copyright (C) 2003-2013 Free Soft..

Languege/C++ 2024.02.22

Object 합치기

💡 객체 합치는 4가지 방법 1. 반복문 2. Object.assign() 3. Spread Operator 4. lodash 라이브러리 반복문 const fruitA = { name: 'apple', color: 'red' }; const fruitB = { name: 'apple', color: 'green', price: 1000}; const fruit = {}; for(let a in fruitA) { fruit[a] = fruitA[a]; } for(let b in fruitB) { fruit[b] = fruitB[b]; } console.log(fruit); // { name: 'apple', color: 'green', price: 1000 } 다음 예시는 fruitA 객체에 fruitB ..

Languege/Javascript 2022.11.28
728x90