MapleStory Finger Point

๐Ÿ”ต C,C++,C# 28

C# ์ •๋ฆฌ

๊ฐ์ฒด์ง€ํ–ฅ ํ”„๋กœ๊ทธ๋žจ ์ด๋ž€? ๊ฐ์ฒด์ง€ํ–ฅ ๊ฐœ๋…(์บก์Šํ™”, ์ •๋ณด์€๋‹‰ ...) ํ”„๋กœ๊ทธ๋žจ ๋ถ„์„(๊ฐ๊ด€์‹) ์ž…์ถœ๋ ฅ(cin, cout) ํด๋ž˜์Šค(์ธ์Šคํ„ด์Šค) ๊ด€๊ณ„, ๊ตฌ์„ฑ ๊ฐ์ฒด (์‚ฌ์šฉ) ๋™์ ์ƒ์„ฑ/์ •์ ์ƒ์„ฑ ์ ‘๊ทผ์ œ์–ด (public, private, protected) ๋ฉค๋ฒ„ ๋ณ€์ˆ˜/ํ•จ์ˆ˜ ์™ธ๋ถ€์ •์˜ ์˜ค๋ฒ„๋กœ๋”ฉ(์ƒ์„ฑ์ž)/ ์˜ค๋ฒ„๋ผ์ด๋”ฉ UML ์ƒ์„ฑ์ž/์†Œ๋ฉธ์ž (์ˆœ์„œ) ๋ฉค๋ฒ„ ์ดˆ๊ธฐํ™”(์ƒ์ˆ˜ ์ดˆ๊ธฐํ™” , ์ดˆ๊ธฐํ™” ๋ฐฉ๋ฒ• 3๊ฐ€์ง€.) this ํฌ์ธํ„ฐ ์ •์ ๋ฉค๋ฒ„(static) ์ƒ์† ๋ถ€๋ชจ์ƒ์„ฑ์ž ๋ช…์‹œ์  ํ˜ธ์ถœ ๊ฐ์ฒด์ง€ํ–ฅ ํ”„๋กœ๊ทธ๋žจ ์ด๋ž€? ๋ฐ์ดํ„ฐ์™€ ํ•จ์ˆ˜๋ฅผ ํ•˜๋‚˜์˜ ๋ฉ์–ด๋ฆฌ๋กœ ๋ฌถ์–ด์„œ ์ƒ๊ฐํ•˜๋Š” ๋ฐฉ๋ฒ•์ด๋‹ค. ๋ฐ์ดํ„ฐ์™€ ํ•จ์ˆ˜๋ฅผ ๊ฐ์ฒด๋กœ ๋ฌถ๋Š” ๊ฒƒ์„ ์บก์Šํ™”(encapsulation)๋ผ๊ณ  ๋ถ€๋ฅธ๋‹ค. - ๋ฐ์ดํ„ฐ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ๋‘˜ ๋‹ค ์ค‘์š”ํ•ด์ง - ๋ฐ์ดํ„ฐ ์•Œ๊ณ ๋ฆฌ์ฆ˜์„ class๋กœ ๋ฌถ์–ด์„œ ๊ฐ์ฒด๋ผ๊ณ  ๋ถ€๋ฆ„ - ๊ฐ์ฒด =..

C++ ๊ธฐ์ดˆ ์ •๋ฆฌ

๋„ค์ž„์ŠคํŽ˜์ด์Šค namespace ์ด๋ฆ„์ด ๊ธฐ์–ต๋˜๋Š” ์˜์—ญ ํ‘œ์ค€ ๊ตฌ์„ฑ ์š”์†Œ์ธ ํด๋ž˜์Šค, ํ•จ์ˆ˜, ๋ณ€์ˆ˜๋Š” std ๋ผ๋Š” ์ด๋ฆ„ ๊ณต๊ฐ„์— ์ €์žฅ๋จ iostream ๋‚ด์˜ ์ •์˜๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๋ฉด std:: ์ ‘๋‘์–ด๋ฅผ ๋ถ™์—ฌ std๋ผ๋Š” ๋„ค์ž„์ŠคํŽ˜์ด์Šค์— ์žˆ๋‹ค๋Š” ๊ฒƒ์„ ์ปดํŒŒ์ผ๋Ÿฌ์—๊ฒŒ ์•Œ๋ ค์ค˜์•ผํ•œ๋‹ค. ๊ฐ„๋‹จํ•˜๊ฒŒ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” using namespace std; ๋ฅผ ์ž…๋ ฅํ•ด์„œ ์ ‘๋‘์–ด๋ฅผ ๋ถ™์ด์ง€ ์•Š์•„๋„ ์‹คํ–‰์‹œํ‚ฌ ์ˆ˜ ์žˆ๋‹ค. ์ฃผ์„ // ์™€ /* */ ์—ฌ๋Ÿฌ์ค„ ์ฃผ์„์€ ์ค‘์ฒฉํ•ด์„œ ์‚ฌ์šฉํ•˜๋ฉด ์•ˆ๋จ. Cout ๊ฐ์ฒด ๋‹ค์–‘ํ•œ ๋ฐ์ดํ„ฐ ์ถœ๋ ฅ ์ €์žฅํ• ๋ณ€์ˆ˜; C ํ‘œ์ค€์ž…์ถœ๋ ฅํ•จ์ˆ˜์™€ ์ฐจ์ด์  ๋ฐ์ดํ„ฐ ํ๋ฆ„์„ ์•Œ ์ˆ˜ ์žˆ์–ด์„œ ์ง๊ด€์ ์ด๊ณ  ์ž…์ถœ๋ ฅ๋ฐ์ดํ„ฐ ํƒ€์ž…์„ ์ž๋™๋ณ€ํ™˜ํ•˜๋ฏ€๋กœ ํŽธ๋ฆฌํ•˜๊ณ  ์•ˆ์ „ ๋ณ€์ˆ˜ ๋ณ€์ˆ˜์˜ ์„ ์–ธ : ๋ฉ”๋ชจ๋ฆฌ ๊ณต๊ฐ„์„ ํ• ๋‹น๋ฐ›๋Š” ํ–‰์œ„๋ฅผ ๋ณ€์ˆ˜์˜ ์„ ์–ธ ๋ณ€์ˆ˜ ์ดˆ๊ธฐํ™” : ๋ฉ”๋ชจ๋ฆฌ ๊ณต๊ฐ„์— ์“ฐ๋ ˆ๊ธฐ ๊ฐ’์ด ์žˆ์„ ..

C++ ์ •๋ฆฌ #์˜ˆ์™ธ์ฒ˜๋ฆฌ ~

1. ์˜ˆ์™ธ ์ฒ˜๋ฆฌ๊ฐ€ ๋ฌด์—‡์ธ๊ฐ€. ์˜ˆ์™ธ (exception) : ์ž˜๋ชป๋œ ์ฝ”๋“œ , ๋ถ€์ •ํ™•ํ•œ ๋ฐ์ดํ„ฐ , ์˜ˆ์™ธ์ ์ธ ์ƒํ™ฉ์— ์˜ํ•˜์—ฌ ๋ฐœ์ƒํ•˜๋Š” ์˜ค๋ฅ˜ (์˜ˆ) 0์œผ๋กœ ๋‚˜๋ˆ„๋Š” ๊ฒƒ๊ณผ ๊ฐ™์€ ์ž˜๋ชป๋œ ์—ฐ์‚ฐ์ด๋‚˜ ๋ฐฐ์—ด์˜ ์ธ๋ฑ์Šค๊ฐ€ ํ•œ๊ณ„๋ฅผ ๋„˜์„ ์ˆ˜ ๋„ ์žˆ๊ณ  , ๋””์Šคํฌ์—์„œ๋Š” ํ•˜๋“œ์›จ์–ด ์—๋Ÿฌ๊ฐ€ ๋ฐœ 2. ์˜ˆ์™ธ์ฒ˜๋ฆฌ ๋ฐฉ๋ฒ• ์˜ˆ์™ธ๋ถ€๋ถ„์„ ํ•˜๋‚˜ํ•˜๋‚˜ ์กฐ๊ฑด ์ฒ˜๋ฆฌํ•จ 3. ์˜ˆ์™ธ์ฒ˜๋ฆฌ ํƒ€์ž… try-catch ๋ธ”๋ก try : ์˜ˆ์™ธ๊ฐ€ ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ๋Š” ์œ„ํ—˜ํ•œ ์ฝ”๋“œ catch : ์˜ˆ์™ธ๋ฅผ ์ฒ˜๋ฆฌํ•˜๋Š” ์ฝ”๋“œ throw: ์˜ˆ์™ธ ์ƒํ™ฉ์ด ๋ฐœ์ƒํ•ญ๋ ธ์Œ์„ ์•Œ๋ฆด ๋•Œ ์‚ฌ์šฉํ•จ Copy //์˜ˆ์™ธ์ฒ˜๋ฆฌ๊ธฐ ๋งค๊ฐœ๋ณ€์ˆ˜ ๋ชจ๋“ ํƒ€์ž… ๊ฐ€๋Šฅํ•จ throw persons; catch (...) { } catch(TooSmallException e) { //TooSmallException๋งŒ ์žกํžŒ๋‹ค. } //์˜ˆ์™ธ์ฒ˜๋ฆฌ๊ธฐ ๋งค๊ฐœ..

์œ ๋‹ˆํ‹ฐ/VR ์ •๋ฆฌ #1

VR์ด๋ž€ ๊ฐ€์ƒํ˜„์‹ค์€ ์‹ค์ œ๊ฐ€ ์•„๋‹ˆ์ง€๋งŒ ์‹ค์ œ์™€ ๊ฐ™์ด ์ธ๊ณต์œผ๋กœ ๋งŒ๋“  ํ˜„์‹ค ์‹ค์ œ๋Š” ์•„๋‹ˆ์ง€๋งŒ ์‚ฌ์šฉ์ž์—๊ฒŒ ์‹ค์ œ์™€ ๊ฐ™์€ ๊ฒฝํ—˜์„ ์ œ๊ณตํ•˜๋Š” ๊ฒƒ์œผ๋กœ ๊ธฐ์ˆ ์˜ ๋ฐœ์ „์— ๋”ฐ๋ผ ์ ์  ๋” ์‚ฌ์‹ค์ ์ธ ๊ฒฝํ—˜์„ ์ถ”๊ตฌ VR์˜ ํŠน์ง• ์ž์œจ์„ฑ ์ƒํ˜ธ์ž‘์šฉ์„ฑ ํ˜„์กด๊ฐ VR์˜ ํ•ต์‹ฌ ๊ฐ€์ƒ์„ธ๊ณ„ ์ƒํ˜ธ์ž‘์šฉ ๋ชฐ์ž…๊ฐ VR์˜ ์ž…์ฒด ํšจ๊ณผ ๊ณต๊ฐ„๊ฐ๊ฐ (์™ผ์ชฝ์˜ค๋ฅธ์ชฝ ์‹œ์•ผ ๋‹ค๋ฅด๋‹ค) ์›๊ทผ๊ฐ ๊ฑฐ๋ฆฌ๊ฐ AR์ •์˜ ์‹ค์ œ์™€ ๊ฐ€์ƒ์˜ ๊ฒฐํ•ฉ ์‹ค์‹œ๊ฐ„ ์ƒํ˜ธ์ž‘์šฉ \*3D๋กœ ํ‘œ์‹œ) AR ์ด๋ž€ ์ฆ๊ฐ•ํ˜„์‹ค์ด๋ž€ ํ™•์žฅ๋œ ํ˜„์‹ค๋กœ 100% ๋ฏธ๋ฆฌ ์ œ์ž‘๋œ ํ™˜๊ฒฝ์—์„œ ํ”Œ๋ ˆ์ดํ•˜๋Š” ๊ฐ€์ƒํ˜„์‹ค ์ฝ˜ํ…์ธ ์™€ ๋‹ฌ๋ฆฌ, ๋ˆˆ์•ž์— ์žˆ๋Š” ํ˜„์‹ค์„ธ๊ณ„ ์œ„์— ์‹ค์‹œ๊ฐ„์œผ๋กœ ์ฝ˜ํ…์ธ  ์ œ์ž‘์ž๊ฐ€ ๋งŒ๋“  ๊ฐ€์ƒ์š”์†Œ๋ฅผ ๊ฒฐํ•จํ•˜์—ฌ ๋ณด๋‹ค ํ˜„์‹ค๊ฐ ๋„˜์น˜๋Š” ์ฝ˜ํ…์ธ  Meterial albedo : ์•Œ๋ฒ ๋„ ํŒŒ๋ผ๋ฏธํ„ฐ๋Š” ํ‘œ๋ฉด์˜ ๊ธฐ๋ณธ ์ƒ‰์ƒ์„ ์ œ์–ดํ•œ๋‹ค nomarl map : ์‹ค์ œ ๊ธฐํ•˜ํ•™์œผ๋กœ..

[C/Core C Programming] Chapter10.๊ตฌ์กฐ์ฒด

#include void make_lower(char a[], char b[]); typedef struct login { char a[10]; char b[10]; }LOGIN; int main() { LOGIN arr; printf("ID?"); gets(arr.a); printf("PASSWORD?"); gets(arr.b); make_lower(arr.a, arr.b); return 0; } void make_lower(char a[], char b[]) { int a1, b1; a1 = strlen(a); b1 = strlen(b); for (int i = 0; i < a1; i++) { if (islower(a[i])==0) a[i] = tolower(a[i]); } printf("ID: ")..

[C/Core C Programming] Chapter9.๋ฌธ์ž์—ด

#define _CRT_SECURE_NO_WARNINGS #include #define SIZE 50 int check_time_str(char phon[]); int main() { char phon[20]; check_time_str(phon); return 0; } int check_time_str(char phon[]) { char x[4] = "010"; while (1) { printf("์ „ํ™”๋ฒˆํ˜ธ ์ž…๋ ฅ(. ์ž…๋ ฅ์‹œ ์ข…๋ฃŒ)\n"); gets(phon); if (strlen(phon) == 11) { if (strncmp(phon, x, 3) == 0) { printf("%s ๋Š” ์œ ํšจํ•œ ์ „ํ™”๋ฒˆํ˜ธ ์ž…๋‹ˆ๋‹ค\n", phon); } } else if(strcmp(phon,".")==0){ break; } ..

[C] ์ฝ”๋“œ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ๋ชจ์Œ (20๋…„๋„)

[C] ๋ฉฑ์Šน ๊ตฌํ•˜๊ธฐ (while ๋ฌธ) #include int main(void) { int n; int x; int i = 1; printf("์ˆซ์ž๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š” "); scanf_s("%d", &x); printf("====================\n"); printf("n n์˜์ œ๊ณฑ\n"); printf("====================\n"); n = 1; while (n = 0 ) { printf("์ ์ˆ˜๋ฅผ ์ž…๋ ฅํ•˜์‹œ์˜ค \n"); scanf_s("%d", &jumsu); total += jumsu; i++; } total = total - jumsu; i--; average = total / i; printf("์ด์  = %.2f\n", total); printf("ํ‰๊ท  = %.2f\n", av..

[C/Core C Programming] Chapter7

//2 #include #include int main() { double a; double r; double n[10] = { 0, }; printf("์ฒซ๋ฒˆ์งธํ•ญ?"); scanf_s("%lf", &a); printf("๊ณต๋น„?"); scanf_s("%lf", &r); printf("๋“ฑ๋น„์ˆ˜์—ด"); for (int i =1; i < 10; i++) { n[0] = a; n[i] = n[i-1]* r; } for (int j = 0; j < 10; j++) { printf("%.1lf ", n[j]); } return 0; } //3 #include #include int main() { int n[10] = { 1,2,3,4,5,6,7,8,9,10 }; int i; int max = 0, min = 0; p..

[C/Core C Programming] Chapter6

//5 #include #include #define SIZE 100 int is_even(int a[], int size, int cu); int is_odd(int a[], int size,int cu); int main() { int a[SIZE]; int count=0; printf("์ •์ˆ˜๋ฅผ ๋นˆ์นธ์œผ๋กœ ๊ตฌ๋ถ„ํ•ด์„œ ์ž…๋ ฅํ•˜์„ธ์š” (๋งˆ์ง€๋ง‰์— 0)"); for (int i = 0; i < SIZE; i++) { scanf_s("%d", &a[i]); count = i; if (a[i] == 0) break; } printf("์ž…๋ ฅ๋ฐ›์€ ์ •์ˆ˜ ์ค‘ ์ง์ˆ˜๋Š” %d๊ฐœ ํ™€์ˆ˜๋Š” %d๊ฐœ ",is_even(a,SIZE, count), is_odd(a,SIZE, count)); return 0; } int is_even(int ..