목록cpp (30)
일상 코딩

Visual Studio에 헤더파일 추가하기 출처:https://hkhan.tistory.com/36 [C++] Visual Studio에 헤더파일 추가하기 알고리즘 문제를 풀 때, 필요한 헤더 파일들을 매번 include 해주는 과정이 귀찮게 느껴질 수 있다. 자주 쓰이는 헤더 파일들을 담은 stdc++.h 파일을 다운로드 받은 후, 코드 컴파일러의 include 파일 hkhan.tistory.com C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include 위 경로에서 "bits" 폴더 생성 후 "stdc++.h" 파일 넣는다. #include // include 신경쓰지 않고 코딩에만 집중 int ..

Visual Studio에 헤더파일 추가하기 출처:https://hkhan.tistory.com/36 [C++] Visual Studio에 헤더파일 추가하기 알고리즘 문제를 풀 때, 필요한 헤더 파일들을 매번 include 해주는 과정이 귀찮게 느껴질 수 있다. 자주 쓰이는 헤더 파일들을 담은 stdc++.h 파일을 다운로드 받은 후, 코드 컴파일러의 include 파일 hkhan.tistory.com C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include 위 경로에서 "bits" 폴더 생성 후 "stdc++.h" 파일 넣는다. #include // include 신경쓰지 않고 코딩에만 집중 int ..

Visual Studio에 헤더파일 추가하기 출처:https://hkhan.tistory.com/36 [C++] Visual Studio에 헤더파일 추가하기 알고리즘 문제를 풀 때, 필요한 헤더 파일들을 매번 include 해주는 과정이 귀찮게 느껴질 수 있다. 자주 쓰이는 헤더 파일들을 담은 stdc++.h 파일을 다운로드 받은 후, 코드 컴파일러의 include 파일 hkhan.tistory.com C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include 위 경로에서 "bits" 폴더 생성 후 "stdc++.h" 파일 넣는다. #include // include 신경쓰지 않고 코딩에만 집중 int ..
C++ 온라인 컴파일러 사이트 https://replit.com/~ https://www.onlinegdb.com/online_c++_compiler https://cpp.sh/ https://www.tutorialspoint.com/compile_cpp_online.php #include using namespace std; template T getMax(T x, T y) { return (x > y) ? x : y; } int main() { { cout
C++ 온라인 컴파일러 사이트 https://replit.com/~ https://www.onlinegdb.com/online_c++_compiler https://cpp.sh/ https://www.tutorialspoint.com/compile_cpp_online.php #include #include #include #include #include #include using namespace std; int main() { { vector container; for (int i = 0; i < 10; ++i) container.push_back(i); auto itr = std::min_element(container.begin(), container.end()); cout
C++ 온라인 컴파일러 사이트 https://replit.com/~ https://www.onlinegdb.com/online_c++_compiler https://cpp.sh/ https://www.tutorialspoint.com/compile_cpp_online.php #include #include #include #include #include using namespace std; int main() { vector container; for (int i = 0; i < 10; ++i) container.push_back(i); { // vector::iterator vector::const_iterator itr; itr = container.begin(); while (itr != conta..
#include #include #include #include #include #include #include #include using namespace std; void sequence_containers() { // vector { vector vec; for (int i=0; i < 10; ++i) // 뒤로만 추가 vec.push_back(i); for(auto & e : vec) cout
#include #include #include // std::min // Reference : http://thbecker.net/articles/auto_and_decltype/section_01.html using namespace std; class Examples { public: void ex1() { std::vector vect; for (std::vector::iterator itr = vect.begin(); itr != vect.end(); ++itr) cout m_x) m_x_type; // add references to L-values // with const typedef decltype((x)) x_with_parens_type; typedef decltype((cx)) cx..
#include #include #include // std::forward using namespace std; struct MyStruct {}; void func(MyStruct &s) { cout