전체 글340 🔥Ch01. Window Programming Fundamentals🔥(3/3) - MFC 01. MFC 기본 구조① 응용 프로그램 클래스 정의② 메인(프레임) 윈도우 클래스 정의(메인 윈도우와 프레임 윈도우는 엄밀히 다름. 이후 차이점 설명 예정)③ 응용 프로그램 객체 선언.④ 메시지 맵 선언.※ MFC 프로그램 특징 요약(1) WinMain() 함수 존재 x. 즉 프로그램 실행 시작점이 눈에 보이지 않는다. (2) 사용자가 함수를 직접 호출하기 보다 MFC 내부에 숨겨진 코드에서 사용자가 정의한 함수를 호출하는 경우가 많다. 가상 함수가 여기에 속한다. (3) 각 메시지에 대한 처리 코드를 함수 단위(message handler)로 따로 만든다. 해당 message와 message handler를 연결하기 위해 message map macro를 사용한다.01-1. MFC 예제: Window.. C, C++ Language/MFC Window Programming 2025. 10. 8. 🔥Ch01. Window Programming Fundamentals🔥(2/3) - SDK 01. SDK 프로그램 기본 구조 ① Window Class를 정의(초기화)하고 OS에 등록② Window를 생성하고 화면에 나타낸다.③ Message Loop를 구동한다.④ Window Procedure에서 메시지를 처리한다.01-1. SDK 예제: 윈도우를 최소화 혹은 최대화할 수 있으며, 마우스로 테두리 부분을 드래그하면 크기가 변경되는 프로그램. 화면에 표시된 Hello, SDK 문자열이 지워지지 않고 항상 클라이언트 영역의 일정한 위치에 표시. 또한 클라이언트 영역에서 마우스 왼쪽 버튼을 누르면 간단한 메시지 상자가 뜬다.: 코드#include // WinMain 함수에서 참조하므로 함수 원형을 선언한다.LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM.. C, C++ Language/MFC Window Programming 2025. 10. 7. 🔥Ch01. Window Programming Fundamentals🔥(1/3) - Intro 01. Window Programming 개요⭐ Window Programming이란, Window Operating System에서 구동되는 Application Program(응용 프로그램)을 만드는 것.01-1. Window Operating System의 특징① GUI 특징: 그래픽 사용자 인터페이스(GUI)는 도스(DOS; Disk Operating System) 같은 텍스트 기반 운영체제와 구분되는 외형적인 특징. 프로그래밍 관점에서 GUI 환경은 화면에 보이는 다양한 사용자 인터페이스 구성 요소(윈도우 버튼, 스크롤 바 , 대화 상자 등)를 다루는 방법을 알면 쉽다. : MFC는 사용자 인터페이스 구성 요소를 쉽게 다룰 수 있도록 C++ 라이브러리를 제공한다. ② 메시지 구동 구조: Wind.. C, C++ Language/MFC Window Programming 2025. 10. 6. 🌳Tree / Binary Tree / Binary Search Tree🌳 fundamentals🌳data structure에서 빼놓을 수 없는 핵심 자료구조 중 한 개인 'TREE'에 대해 배워볼 것이다. 사실, TREE는 매우 광범위한 모든 형태의 트리를 포함하는 용어로, 이번 포스팅에서는 tree 뿐 아니라 binary tree(이진 트리), 그리고 binary search tree(이진 검색 트리) 까지 이에 대한 정확한 용어 정의 및 관련 유형 & 코드에 대해서 다룰 것이다. ① TREE: 트리(tree)는 노드(node)와 엣지(edge)로 연결된 그래프의 특수한 형태로, 아래 특징을 지닌다. 즉, 그래프의 형태이기 때문에 그래프의 표현으로 tree 표현이 가능하다. ★ 단 1개의 root node가 존재하고, 각 node는 0개 이상의 child node를 가질 .. Computer Science/Data Structures 2025. 8. 10. 🥰 StrataScratch PythonPandas Easy I - 2 Solved 02002 Submission Types# Import your librariesimport pandas as pd# Start writing codeloans.head()refinance_user_ids = set(loans[(loans["type"] == "Refinance")]["user_id"])inschool_user_ids = set(loans[loans["type"] == "InSchool"]["user_id"])common_user_ids = list(refinance_user_ids & inschool_user_ids)common_user_ids 🥠 type이 Refinance도 있고 InSchool도 있는 user_id 찾는 문제* Refinance만 있는 dataframe과 InSc.. Data Science Fundamentals/Pandas&Numpy and Questions 2025. 3. 16. 🥰 StrataScratch PythonPandas Medium I - 18 Solved 02099 Election Results# Import your librariesimport pandas as pd# Start writing codevoting_results.head() #voter / candidate#boolean indexing - filtering voters who didn't votevoting_results = voting_results[~voting_results['candidate'].isna()] #boolean indexing(condiiton included)#voting_results = voting_results.dropna()#voter ratevoting_results['voter_rate'] = voting_results['voter'].apply(lam.. Data Science Fundamentals/Pandas&Numpy and Questions 2025. 3. 9. ✈️ SQL Programmers Level 3 - 19 Solved 001. 대장균들의 자식의 수 구하기SELECT A.ID, COUNT(B.ID) AS CHILD_COUNTFROM ECOLI_DATA AS A LEFT JOIN ECOLI_DATA AS B ON A.ID = B.PARENT_IDGROUP BY A.IDORDER BY A.ID ASC ✨(1) 한 테이블 내부에 ID와 PARENT_ID 모두 동일한 경우는 두 동일 테이블을 JOIN 해야 한다.: 왼쪽 A, 오른쪽 B라 했을 때 왼쪽 ID를 parent, 오른쪽 ID를 child로 설정해서 A.ID = B.PARENT_ID로 JOIN(2) A의 정보 ID 기준 JOIN이므로 LEFT JOIN(3) 자식의 수를 출력해야 하므로 GROUP BY A.ID로 A 기준 그룹화 (4) 개체의 ID에 대해 오름차순 정렬이.. Database/SQL 2025. 3. 8. 📍API / RESTful API 📍 API?📍 'Application Programming Interface'로 SW들이 서로 대화할 때 사용되는 수단. 📍 ex) 시청하고 있는 youtube를 시청하기 위한 컴퓨터, 폰. 시청하는 youtube 영상들은 server라는 컴퓨터에 저장되어 있음. 각 기기들은 server로부터 영상들과 관련 데이터를 받아와 재생함. 즉 server에는 sw의 주문을 받아 서빙하는 sw가 실행되고 있다. 즉, 폰에서 youtube 앱을 켜면 youtube 앱은 server에 설치된 sw에게 '최신 컨텐츠'들의 목록을 보내달라는 요청을 함. 이에 대한 응답으로 server에서 보내줌. 그 외에도 다양한 작업들이 sw간의 대화로 이루어짐. 📍 API는 server 역할을 하는 프로그램이 나눠준 메뉴.. Computer Science/Basics and Concepts 2025. 3. 2. 🪗 OOP Fundamentals (1) ❤️ OOP 이전: 중심이 컴퓨터. 컴퓨터가 사고하는 대로 프로그래밍. ❤️ OOP: 인간 중심적 프로그래밍 패러다임. 현실 세계를 프로그래밍으로 옮겨와 프로그래밍. 객체 지향의 가장 기본은 객체이며, 객체의 핵심은 기능을 제공하는 것. 실제로 객체를 정의할 때 사용하는 것은 객체가 제공해야 할 기능(오퍼레이션(Operation))이며, 객체가 내부적으로 어떤 데이터를 갖고 있는 지로는 정의되지 않는다. 즉, 객체는 오퍼레이션으로 정의된다. (1) 추상화) 현실 세계의 사물들을 객체라고 보고, 그 객체로부터 개발하고자 하는 APP에 필요한 특징들을 뽑아와 프로그래밍 진행. (2) 이미 작성한 코드에 대한 재사용성이 높다. 자주 사용되는 로직을 라이브러리로 만들어 두면 계속해서 사용 가능, 신뢰성 확보 (.. OOP/Fundamentals 2025. 3. 2. 😍 LeetCode Easy Collections III - 6 Problems 0231. Power of Two / 0118. Pascal's Triangleclass Solution: def isPowerOfTwo(self, n: int) -> bool: if n 😍 0231) 큰 problem을 2로 계속 나누며 sub-problem으로 잘게 쪼개며 계속 문제를 풀어나가는 방식은 Recursion을 사용해야 함을 직관적으로 알 수 있다. 먼저 n == 1 / n%2 == 1 base case를 생각하고 / 그렇지 않다면 pot(n//2)로 잘게 쪼개어 문제를 풀어가면 OKclass Solution: def generate(self, numRows: int) -> List[List[int]]: ans = [[1]] .. PS - LeetCode/Easy 2025. 1. 29. 🥪Array 1. Fundamentals★ Stores items(C/C++) or their references(Python) at contiguous locations / a linear data structure that stores similar elements in contiguous memory locations. ★(1) Random Access: i-th item can be accessed in O(1) Time as we have the base address and every item or reference is of same size(2) Cache Friendliness: since items/references are stored at contiguous locations, we get th.. Computer Science/Data Structures 2025. 1. 17. ★Topology Sort Advanced - 2 Solved★ ★ 2252 줄 세우기 ★import sysinput=sys.stdin.readlinefrom collections import dequeN,M=map(int,input().split())indegree = [0] * (N+1)graph = [[] for _ in range(N+1)]for _ in range(M): A,B=map(int,input().split()) graph[A].append(B) indegree[B] += 1result = []queue = deque()#1for i in range(1,N+1): if indegree[i] == 0: queue.append(i)#2while queue: node = queue.popleft() result.. PS - BOJ/🥇 2024. 12. 29. 🧑🏻💻 LeetCode Medium Collections 3 - 19 Problems 0003. Longest Substring Without Repeating Characters / 0221. Maximal Square#---------------- (1)class Solution: def lengthOfLongestSubstring(self, s: str) -> int: ans = 0 hashmap = dict() for i in range(len(s)): if s[i] in hashmap.keys(): needs_to_be_deleted_keys = set() for key in hashmap: if hashmap[key] int: .. PS - LeetCode/Medium 2024. 12. 9. (C++) ★Binary Search Intermediate I - 1 Solved★ ★ 1920 수 찾기 ★//1920#include #include #include #include #include #include #include #include #include #include using namespace std;int binary_search(vector &arr, int target){ int start, end; start = 0; end = arr.size()-1; int mid; while(start> N; vector arr1(N); for(int i=0;i> x; arr1[i]=x; } cin >> M; vector arr2(M); for(int i=0;i> y; arr2[i]=y; }.. C, C++ Language/🥈 BOJ 2024. 11. 15. (C++) ★DP Upper-Intermediate I - 2 Solved★ ★ 2579 계단 오르기 ★//2579#include #include #include #include #include #include #include #include #include #include using namespace std;int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int N, stair,tmp; cin >> N; tmp = N; vector dp(N+1, 0); vector stairs = {0}; while(tmp--){ cin >> stair; stairs.push_back(stair); } dp[1]=stai.. C, C++ Language/🥈 BOJ 2024. 11. 15. (C++) ★Backtracking Intermediate I - 3 Solved★ ★ 15649 N과 M (1) ★//15649#include #include #include #include #include #include #include #include #include #include using namespace std;int N,M;vector ans;void track(){ if((int)ans.size()==M){ for(int i=0;i> N >> M; track(); return 0;}🙃 track() 백트래킹 재귀 함수 돌리기(1) 조건 충족 시, 충족된 vector 배열 내용 출력(2) 조건 미충족 시, 1부터 N까지의 자연수 일일이 돌리면서 ans 배열이 비었거나 해당 자연수가 ans 배열에 없거나 두 조건 중 한 개를 충족하면 push_bac.. C, C++ Language/🥈 BOJ 2024. 11. 15. (C++) ★Set/Map Upper-Intermediate I - 1 Solved★ ★ 20920 영단어 암기는 괴로워 ★//20920#include #include #include #include #include #include #include #include #include #include using namespace std;int N,M;string word;map freq;vector vocas;bool compare(string a, string b){ if(freq[a] != freq[b]){ return freq[a] > freq[b]; } else{ if(a.size() != b.size()){ return a.size() > b.size(); } else{ retur.. C, C++ Language/🥈 BOJ 2024. 11. 15. (C++) ★Stack & Queue & Deque Intermediate I - 4 Solved★ ★ 28278 스택 2 ★//28278#include #include #include #include #include #include #include #include #include #include using namespace std;int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int N, order, num; cin >> N; stack s; while(N--){ cin>>order; if (order==1){ cin>>num; s.push(num); } else if(orde.. C, C++ Language/🥈 BOJ 2024. 11. 15. (C++) ★Number Theory Intermediate I - 2 Solved★ ★ 1929 소수 구하기 ★//1929#include #include #include #include #include #include #include #include using namespace std;int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int M, N; cin >> M >> N; vector sieve(N+1, true); for(int i=2;i👳🏻♀️ vector sieve 가변 배열을 만든다. (N+1, true)를 뒤에 붙이면 총 N+1개의 자리가 있고 모두 true로 initialization. 👳🏻♀️자연수 N까지의 모든 소수 구하기 (에라토.. C, C++ Language/🥈 BOJ 2024. 11. 15. (C++) ★Set/Map Intermediate I - 5 Solved★ ★ 10815 숫자 카드 ★//10815#include #include #include #include #include #include #include using namespace std;int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int N,M,card,judge; vector cards; vector judges; map Map; cin >> N; while(N--){ cin >> card; Map.insert({card, true}); } cin >> M; while(M--){ cin >> judge; .. C, C++ Language/🥈 BOJ 2024. 11. 14. (C++) ★Sorting Intermediate I - 5 Solved★ ★ 1427 소트인사이드 ★//1427#include #include #include #include #include #include using namespace std;int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); string N; cin >> N; sort(N.begin(), N.end(), greater()); cout 🚀 내림차순은 sort()의 세번째 인자에 greater를 넣는다. 이 때, 문자열의 각 문자를 내림차순으로 정렬한다면 greater. 만약에 int형 변수가 들어간 array를 내림차순 정렬한다면 greater를 sort()의 세번째 인자로 넣는다... C, C++ Language/🥈 BOJ 2024. 11. 14. (C++)★Sorting Upper-Beginner I - 1 Solved★ ★ 2750 수 정렬하기 ★//1436#include #include #include #include #include #include using namespace std;int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int N; cin >> N; vector arr{}; while(N--){ int x; cin >> x; arr.push_back(x); } sort(arr.begin(),arr.end()); for(int x=0;x 👯♂️ vector arr{}로 가변 배열 만들고 push_back()으로 업데이트. 이.. C, C++ Language/🥉 BOJ 2024. 11. 14. (C++)★BF Intermediate I - 1 Solved★ ★ 1436 영화감독 숌 ★//1436#include #include #include #include #include #include using namespace std;int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int N, n = 666, cnt = 1; string n_string; bool found = false; cin >> N; while(true){ n_string = to_string(n); found = false; for(int x = 0; x 🧕🏼 주어진 숫자를 문자열 string으로 바꾸는 to_stri.. C, C++ Language/🥈 BOJ 2024. 11. 14. (C++)★Math & Geometry Upper-Beginner I - 1 Solved★ ★ 14215 세 막대 ★//14215#include #include #include #include #include #include using namespace std;int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int arr[3]; cin >> arr[0] >> arr[1] >> arr[2]; sort(arr, arr+3); if((arr[0]+arr[1]) 🤙 sort(arr, arr+3)로 주어진 배열의 길이를 sorting할 수 있다. 🤙 cin >> arr[0] >> arr[1] >> arr[2]로 직접 입력한 숫자 자체를 바로 배열에 넣을 수 있다. .. C, C++ Language/🥉 BOJ 2024. 11. 14. (C++) ★Number Theory Upper-Beginner I - 3 Solved★ ★ 9506 약수들의 합 ★//9506#include #include #include #include #include using namespace std;int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n,total; while(1){ cin >> n; if(n==-1){ break; } total = 1; vector numbers = {}; for(int x=2;x 🧚♂️ 가변 배열 vector numbers = {} 만들어 놓고, 약수일 때 numbers.push_back(x); 사용.. C, C++ Language/🥉 BOJ 2024. 11. 14. (C++) ★Implementation&Simulation Intermediate I - 2 Solved★ ★ 2941 크로아티아 알파벳 ★//2941#include #include #include #include using namespace std;int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); string S; int x; cin >> S; vector arr = {"c=","c-","dz=","d-","lj","nj","s=","z="}; for(int i =0 ; i 🤝 vector으로 문자열이 들어간 배열을 생성(#include ) 🤝 find() 함수 안에 크로아티아 변경된 알파벳 문자열을 넣으면, 해당 문자열이 들어가는 위치를 index로 알 수 있다... C, C++ Language/🥈 BOJ 2024. 11. 14. (C++) ★Implementation Upper-Beginner I - 8 Solved★ ★ 10811 바구니 뒤집기 ★#include #include using namespace std;void swap(int *a, int *b){ int tmp = *a; *a = *b; *b = tmp;}int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int N, M; cin >> N >> M; int* basket = new int[N]; for(int x = 0; x > i >> j; for(int a = 0; a 🤝 바구니 i부터 바구니 j까지 역순으로 넣는 방법은, iterator x가 바구니 i부터 (i+j)/2까지 돌며 양 옆(x와 을.. C, C++ Language/🥉 BOJ 2024. 11. 13. 이전 1 2 3 4 ··· 13 다음