From 1cfd3bbb5646bcb8424f95e803507a420ed65f8e Mon Sep 17 00:00:00 2001 From: Antigravity Agent Date: Sun, 5 Jul 2026 00:10:59 +0900 Subject: [PATCH] =?UTF-8?q?docs(10=5FWiki):=20=EC=9C=84=ED=82=A4=20?= =?UTF-8?q?=EA=B5=AC=EC=A1=B0=20=EC=A0=95=EB=A6=AC=20=E2=80=94=20=EC=96=B8?= =?UTF-8?q?=EC=96=B4=20=ED=8A=9C=ED=86=A0=EB=A6=AC=EC=96=BC=20=EC=B9=B4?= =?UTF-8?q?=ED=85=8C=EA=B3=A0=EB=A6=AC=20=ED=8F=B4=EB=8D=94=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0=20+=20=EC=8B=A0=EA=B7=9C=20=EC=9E=90=EC=82=B0=20?= =?UTF-8?q?=EB=8F=99=EA=B8=B0=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Topic_CSS/Topic_HTML/Topic_JavaScript/Topic_Prompt/Topic_Comfyui 등 기존 카테고리 폴더를 정리하고, Topic_Graphic/Dev 등 신규 산출물과 Topics 내부 세션/메모리 기록을 동기화. --- 10_Wiki/Dev/.DS_Store | Bin 0 -> 6148 bytes .../Architecture/AstraAI_아키텍처_개요.md | 0 .../VSCode_확장_구조와_생명주기.md | 0 .../동시성_제어_Lock_Queue_Transaction.md | 0 .../의존성_주입과_서비스_인터페이스.md | 0 .../Architecture/이벤트_소싱_스토어_패턴.md | 0 .../Conventions/코딩_컨벤션과_주석_철학.md | 0 .../Conventions/프롬프트_엔지니어링_패턴.md | 0 .../ADR/ADR-0001_이벤트_소싱_채택.md | 0 .../ADR/ADR-0002_5계층_메모리_분리.md | 0 ...R-0003_단일작성자_다중역할_멀티에이전트.md | 0 .../ADR/ADR-0004_순차_디스패치_채택.md | 0 .../ADR/ADR-0005_파일_기반_저장_채택.md | 0 ...-0006_수동_의존성주입_인터페이스_서비스.md | 0 .../ADR-0007_하이브리드_검색_결정론_우선.md | 0 .../ADR-0008_로컬우선_LLM_클라우드_폴백.md | 0 .../ADR-0009_결정론_항상_LLM검증_조건부.md | 0 .../ADR-0010_오케스트레이터_골격_모듈추출.md | 0 .../AI_Training/AITRAIN_RAG_검색.md | 0 .../AI_Training/AITRAIN_검증_레이어.md | 0 .../AI_Training/AITRAIN_동시성_제어.md | 0 .../AI_Training/AITRAIN_메모리_시스템.md | 0 .../AITRAIN_에이전트_오케스트레이션.md | 0 .../AI_Training/AITRAIN_이벤트소싱_저장.md | 0 .../AI_Training/AITRAIN_프로바이더_추상화.md | 0 .../교훈_라이브러리_Lessons_Learned.md | 0 .../디버깅_플레이북.md | 0 .../리팩토링_플레이북.md | 0 .../아키텍처_휴리스틱.md | 0 .../안티패턴_카탈로그.md | 0 .../엔지니어링_트레이드오프_분석.md | 0 .../소프트웨어_실패_라이브러리.md | 0 .../프로젝트_독립_설계_원칙.md | 0 .../Language/TypeScript_고급_타입.md | 0 .../Language/TypeScript_기초와_타입_시스템.md | 0 .../Language/모듈_시스템과_프로젝트_구성.md | 0 .../비동기_프로그래밍_Promise_async_await.md | 0 .../Language/에러_처리와_커스텀_에러.md | 0 .../00_패턴_카탈로그_인덱스.md | 0 .../AI/Agent_Orchestration_Pattern.md | 0 .../Pattern_Catalog/AI/Critic_Pattern.md | 0 .../Pattern_Catalog/AI/Memory_Pattern.md | 0 .../Pattern_Catalog/AI/RAG_Pattern.md | 0 .../Pattern_Catalog/AI/Reflection_Pattern.md | 0 .../AI/Tool_Calling_Pattern.md | 0 .../Architecture_Separation_Pattern.md | 0 .../Async_Concurrency_Pattern.md | 0 .../Cross_Cutting/Caching_Pattern.md | 0 .../Cross_Cutting/Data_Flow_Pattern.md | 0 .../Cross_Cutting/Error_Handling_Pattern.md | 0 .../Cross_Cutting/State_Management_Pattern.md | 0 .../Desktop/Background_Worker_Pattern.md | 0 .../Desktop/Command_Pattern.md | 0 .../Desktop/Event_Bus_Pattern.md | 0 .../Pattern_Catalog/Desktop/IPC_Pattern.md | 0 .../Desktop/Plugin_Architecture_Pattern.md | 0 .../Mobile/Background_Task_Pattern.md | 0 .../Mobile/Local_Storage_Pattern.md | 0 .../Mobile/Navigation_Pattern.md | 0 .../Mobile/Offline_Sync_Pattern.md | 0 .../Mobile/Push_Notification_Pattern.md | 0 .../Pattern_Catalog/Web/API_Client_Pattern.md | 0 .../Web/Infinite_Scroll_Pattern.md | 0 .../Web/JWT_Authentication_Pattern.md | 0 .../Web/React_State_Pattern.md | 0 .../Pattern_Catalog/Web/Repository_Pattern.md | 0 .../00_플랫폼_개발_가이드_인덱스.md | 0 .../AI_에이전트_개발_가이드.md | 0 .../데스크탑_앱_개발_가이드.md | 0 .../Platform_Guides/모바일_개발_가이드.md | 0 .../Platform_Guides/백엔드_API_개발_가이드.md | 0 .../Platform_Guides/웹_개발_가이드.md | 0 .../Subsystems/5계층_메모리_시스템.md | 0 .../Subsystems/Agent_오케스트레이터_분해.md | 0 .../Subsystems/Intelligence_검증_레이어.md | 0 .../Subsystems/LLM_프로바이더_추상화.md | 0 .../Subsystems/RAG_검색_파이프라인.md | 0 .../Subsystems/TFIDF_이중언어_스코어링.md | 0 10_Wiki/Dev/Topic_C/00_INDEX.md | 191 ++++++++ 10_Wiki/Dev/Topic_C/C_Arrays.md | 72 ++++ 10_Wiki/Dev/Topic_C/C_Arrays_Loop.md | 69 +++ 10_Wiki/Dev/Topic_C/C_Arrays_Multi.md | 74 ++++ 10_Wiki/Dev/Topic_C/C_Arrays_RealLife.md | 73 ++++ 10_Wiki/Dev/Topic_C/C_Arrays_Size.md | 67 +++ 10_Wiki/Dev/Topic_C/C_Bitwise_Operators.md | 73 ++++ 10_Wiki/Dev/Topic_C/C_Booleans.md | 70 +++ 10_Wiki/Dev/Topic_C/C_Booleans_RealLife.md | 70 +++ 10_Wiki/Dev/Topic_C/C_Break_Continue.md | 79 ++++ 10_Wiki/Dev/Topic_C/C_Comments.md | 67 +++ 10_Wiki/Dev/Topic_C/C_Conditions.md | 71 +++ 10_Wiki/Dev/Topic_C/C_Conditions_Else.md | 70 +++ 10_Wiki/Dev/Topic_C/C_Conditions_ElseIf.md | 72 ++++ 10_Wiki/Dev/Topic_C/C_Conditions_Logical.md | 74 ++++ 10_Wiki/Dev/Topic_C/C_Conditions_Nested.md | 75 ++++ 10_Wiki/Dev/Topic_C/C_Conditions_RealLife.md | 73 ++++ .../Dev/Topic_C/C_Conditions_Short_Hand.md | 66 +++ 10_Wiki/Dev/Topic_C/C_Constants.md | 68 +++ 10_Wiki/Dev/Topic_C/C_Data_Types.md | 69 +++ .../Dev/Topic_C/C_Data_Types_Characters.md | 70 +++ 10_Wiki/Dev/Topic_C/C_Data_Types_Dec.md | 68 +++ 10_Wiki/Dev/Topic_C/C_Data_Types_Extended.md | 71 +++ 10_Wiki/Dev/Topic_C/C_Data_Types_Numbers.md | 68 +++ 10_Wiki/Dev/Topic_C/C_Data_Types_RealLife.md | 67 +++ 10_Wiki/Dev/Topic_C/C_Data_Types_Sizeof.md | 69 +++ 10_Wiki/Dev/Topic_C/C_Date_Time.md | 72 ++++ 10_Wiki/Dev/Topic_C/C_Debugging.md | 75 ++++ 10_Wiki/Dev/Topic_C/C_Do_While_Loop.md | 70 +++ 10_Wiki/Dev/Topic_C/C_Enums.md | 73 ++++ 10_Wiki/Dev/Topic_C/C_Error_Handling.md | 78 ++++ 10_Wiki/Dev/Topic_C/C_Errors.md | 69 +++ 10_Wiki/Dev/Topic_C/C_Files.md | 70 +++ 10_Wiki/Dev/Topic_C/C_Files_Read.md | 76 ++++ 10_Wiki/Dev/Topic_C/C_Files_Write.md | 68 +++ 10_Wiki/Dev/Topic_C/C_Fixed_Width_Ints.md | 72 ++++ 10_Wiki/Dev/Topic_C/C_For_Loop.md | 71 +++ 10_Wiki/Dev/Topic_C/C_For_Loop_Nested.md | 73 ++++ 10_Wiki/Dev/Topic_C/C_For_Loop_RealLife.md | 69 +++ 10_Wiki/Dev/Topic_C/C_Functions.md | 74 ++++ 10_Wiki/Dev/Topic_C/C_Functions_Callback.md | 75 ++++ 10_Wiki/Dev/Topic_C/C_Functions_Decl.md | 83 ++++ 10_Wiki/Dev/Topic_C/C_Functions_Inline.md | 72 ++++ 10_Wiki/Dev/Topic_C/C_Functions_Parameters.md | 77 ++++ 10_Wiki/Dev/Topic_C/C_Functions_Pointers.md | 78 ++++ 10_Wiki/Dev/Topic_C/C_Functions_Recursion.md | 72 ++++ 10_Wiki/Dev/Topic_C/C_Get_Started.md | 71 +++ 10_Wiki/Dev/Topic_C/C_Input_Validation.md | 75 ++++ 10_Wiki/Dev/Topic_C/C_Intro.md | 69 +++ 10_Wiki/Dev/Topic_C/C_Macros.md | 73 ++++ 10_Wiki/Dev/Topic_C/C_Math.md | 69 +++ 10_Wiki/Dev/Topic_C/C_Memory_Access.md | 68 +++ 10_Wiki/Dev/Topic_C/C_Memory_Address.md | 66 +++ 10_Wiki/Dev/Topic_C/C_Memory_Allocate.md | 73 ++++ 10_Wiki/Dev/Topic_C/C_Memory_Deallocate.md | 77 ++++ 10_Wiki/Dev/Topic_C/C_Memory_Management.md | 71 +++ 10_Wiki/Dev/Topic_C/C_Memory_RealLife.md | 81 ++++ 10_Wiki/Dev/Topic_C/C_Memory_Reallocate.md | 72 ++++ 10_Wiki/Dev/Topic_C/C_Memory_Struct.md | 76 ++++ 10_Wiki/Dev/Topic_C/C_Newline.md | 68 +++ 10_Wiki/Dev/Topic_C/C_Null.md | 71 +++ 10_Wiki/Dev/Topic_C/C_Operators.md | 65 +++ 10_Wiki/Dev/Topic_C/C_Operators_Arithmetic.md | 71 +++ 10_Wiki/Dev/Topic_C/C_Operators_Assignment.md | 67 +++ 10_Wiki/Dev/Topic_C/C_Operators_Comparison.md | 67 +++ 10_Wiki/Dev/Topic_C/C_Operators_Logical.md | 68 +++ 10_Wiki/Dev/Topic_C/C_Operators_Precedence.md | 66 +++ 10_Wiki/Dev/Topic_C/C_Organize_Code.md | 76 ++++ 10_Wiki/Dev/Topic_C/C_Output.md | 71 +++ 10_Wiki/Dev/Topic_C/C_Pointer_To_Pointer.md | 69 +++ 10_Wiki/Dev/Topic_C/C_Pointers.md | 70 +++ 10_Wiki/Dev/Topic_C/C_Pointers_Arithmetic.md | 75 ++++ 10_Wiki/Dev/Topic_C/C_Pointers_Arrays.md | 71 +++ 10_Wiki/Dev/Topic_C/C_Random_Numbers.md | 78 ++++ 10_Wiki/Dev/Topic_C/C_Scope.md | 79 ++++ 10_Wiki/Dev/Topic_C/C_Statements.md | 67 +++ 10_Wiki/Dev/Topic_C/C_Storage_Classes.md | 76 ++++ 10_Wiki/Dev/Topic_C/C_Strings.md | 73 ++++ 10_Wiki/Dev/Topic_C/C_Strings_Esc.md | 66 +++ 10_Wiki/Dev/Topic_C/C_Strings_Functions.md | 71 +++ 10_Wiki/Dev/Topic_C/C_Structs.md | 80 ++++ 10_Wiki/Dev/Topic_C/C_Structs_Nested.md | 79 ++++ 10_Wiki/Dev/Topic_C/C_Structs_Padding.md | 70 +++ 10_Wiki/Dev/Topic_C/C_Structs_Pointers.md | 77 ++++ 10_Wiki/Dev/Topic_C/C_Switch.md | 77 ++++ 10_Wiki/Dev/Topic_C/C_Syntax.md | 71 +++ 10_Wiki/Dev/Topic_C/C_Type_Conversion.md | 73 ++++ 10_Wiki/Dev/Topic_C/C_Typedef.md | 80 ++++ 10_Wiki/Dev/Topic_C/C_Unions.md | 77 ++++ 10_Wiki/Dev/Topic_C/C_User_Input.md | 71 +++ 10_Wiki/Dev/Topic_C/C_Variables.md | 69 +++ 10_Wiki/Dev/Topic_C/C_Variables_Change.md | 69 +++ 10_Wiki/Dev/Topic_C/C_Variables_Format.md | 70 +++ 10_Wiki/Dev/Topic_C/C_Variables_Multiple.md | 67 +++ 10_Wiki/Dev/Topic_C/C_Variables_Names.md | 69 +++ 10_Wiki/Dev/Topic_C/C_Variables_RealLife.md | 68 +++ 10_Wiki/Dev/Topic_C/C_While_Loop.md | 70 +++ 10_Wiki/Dev/Topic_C/C_While_Loop_RealLife.md | 71 +++ 10_Wiki/Dev/Topic_CPP/00_INDEX.md | 223 ++++++++++ .../Dev/Topic_CPP/CPP_Access_Specifiers.md | 76 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Algorithms.md | 86 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Arrays.md | 69 +++ 10_Wiki/Dev/Topic_CPP/CPP_Arrays_Loop.md | 68 +++ 10_Wiki/Dev/Topic_CPP/CPP_Arrays_Multi.md | 76 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Arrays_Omit.md | 69 +++ 10_Wiki/Dev/Topic_CPP/CPP_Arrays_RealLife.md | 70 +++ 10_Wiki/Dev/Topic_CPP/CPP_Arrays_Size.md | 70 +++ 10_Wiki/Dev/Topic_CPP/CPP_Auto.md | 78 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Booleans.md | 71 +++ .../Dev/Topic_CPP/CPP_Booleans_Expressions.md | 68 +++ .../Dev/Topic_CPP/CPP_Booleans_RealLife.md | 70 +++ 10_Wiki/Dev/Topic_CPP/CPP_Break.md | 75 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Class_Methods.md | 78 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Classes.md | 80 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Comments.md | 65 +++ 10_Wiki/Dev/Topic_CPP/CPP_Conditions.md | 70 +++ 10_Wiki/Dev/Topic_CPP/CPP_Conditions_Else.md | 70 +++ .../Dev/Topic_CPP/CPP_Conditions_ElseIf.md | 72 ++++ .../Dev/Topic_CPP/CPP_Conditions_Logical.md | 74 ++++ .../Dev/Topic_CPP/CPP_Conditions_Nested.md | 75 ++++ .../Dev/Topic_CPP/CPP_Conditions_RealLife.md | 71 +++ .../Dev/Topic_CPP/CPP_Conditions_Shorthand.md | 70 +++ 10_Wiki/Dev/Topic_CPP/CPP_Constructors.md | 80 ++++ .../Topic_CPP/CPP_Constructors_Overloading.md | 81 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Data_Structures.md | 78 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Data_Types.md | 67 +++ 10_Wiki/Dev/Topic_CPP/CPP_Data_Types_Bool.md | 66 +++ 10_Wiki/Dev/Topic_CPP/CPP_Data_Types_Char.md | 67 +++ .../Dev/Topic_CPP/CPP_Data_Types_Numeric.md | 69 +++ .../Dev/Topic_CPP/CPP_Data_Types_RealLife.md | 64 +++ .../Dev/Topic_CPP/CPP_Data_Types_String.md | 65 +++ 10_Wiki/Dev/Topic_CPP/CPP_Date.md | 77 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Debugging.md | 70 +++ 10_Wiki/Dev/Topic_CPP/CPP_Deque.md | 80 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Do_While_Loop.md | 71 +++ 10_Wiki/Dev/Topic_CPP/CPP_Encapsulation.md | 77 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Enum.md | 71 +++ 10_Wiki/Dev/Topic_CPP/CPP_Errors.md | 67 +++ 10_Wiki/Dev/Topic_CPP/CPP_Exceptions.md | 78 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Files.md | 74 ++++ 10_Wiki/Dev/Topic_CPP/CPP_For_Loop.md | 69 +++ 10_Wiki/Dev/Topic_CPP/CPP_For_Loop_Foreach.md | 74 ++++ 10_Wiki/Dev/Topic_CPP/CPP_For_Loop_Nested.md | 72 ++++ .../Dev/Topic_CPP/CPP_For_Loop_RealLife.md | 68 +++ 10_Wiki/Dev/Topic_CPP/CPP_Friend_Function.md | 72 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Function_Array.md | 71 +++ 10_Wiki/Dev/Topic_CPP/CPP_Function_Default.md | 70 +++ .../Dev/Topic_CPP/CPP_Function_Multiple.md | 69 +++ .../Dev/Topic_CPP/CPP_Function_Overloading.md | 76 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Function_Param.md | 70 +++ .../Dev/Topic_CPP/CPP_Function_RealLife.md | 70 +++ .../Dev/Topic_CPP/CPP_Function_Reference.md | 76 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Function_Return.md | 73 ++++ .../Dev/Topic_CPP/CPP_Function_Structures.md | 76 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Functions.md | 76 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Functions_Lambda.md | 75 ++++ .../Dev/Topic_CPP/CPP_Functions_Recursion.md | 72 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Get_Started.md | 70 +++ 10_Wiki/Dev/Topic_CPP/CPP_Inheritance.md | 78 ++++ .../Dev/Topic_CPP/CPP_Inheritance_Access.md | 71 +++ .../Topic_CPP/CPP_Inheritance_Multilevel.md | 72 ++++ .../Dev/Topic_CPP/CPP_Inheritance_Multiple.md | 77 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Input_Validation.md | 74 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Intro.md | 63 +++ 10_Wiki/Dev/Topic_CPP/CPP_Iterators.md | 85 ++++ 10_Wiki/Dev/Topic_CPP/CPP_List.md | 81 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Maps.md | 82 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Math.md | 67 +++ .../Dev/Topic_CPP/CPP_Memory_Management.md | 70 +++ .../Topic_CPP/CPP_Memory_Management_New.md | 75 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Namespaces.md | 73 ++++ 10_Wiki/Dev/Topic_CPP/CPP_New_Lines.md | 69 +++ 10_Wiki/Dev/Topic_CPP/CPP_OOP.md | 62 +++ 10_Wiki/Dev/Topic_CPP/CPP_Operators.md | 65 +++ .../Dev/Topic_CPP/CPP_Operators_Arithmetic.md | 71 +++ .../Dev/Topic_CPP/CPP_Operators_Assignment.md | 67 +++ .../Dev/Topic_CPP/CPP_Operators_Comparison.md | 67 +++ .../Dev/Topic_CPP/CPP_Operators_Logical.md | 65 +++ .../Dev/Topic_CPP/CPP_Operators_Precedence.md | 66 +++ 10_Wiki/Dev/Topic_CPP/CPP_Output.md | 70 +++ 10_Wiki/Dev/Topic_CPP/CPP_Output_Numbers.md | 64 +++ 10_Wiki/Dev/Topic_CPP/CPP_Pointers.md | 66 +++ .../Dev/Topic_CPP/CPP_Pointers_Dereference.md | 65 +++ 10_Wiki/Dev/Topic_CPP/CPP_Pointers_Modify.md | 65 +++ 10_Wiki/Dev/Topic_CPP/CPP_Polymorphism.md | 74 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Queues.md | 80 ++++ 10_Wiki/Dev/Topic_CPP/CPP_References.md | 68 +++ .../Dev/Topic_CPP/CPP_References_Memory.md | 65 +++ 10_Wiki/Dev/Topic_CPP/CPP_Scope.md | 75 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Sets.md | 80 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Stacks.md | 80 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Statements.md | 66 +++ 10_Wiki/Dev/Topic_CPP/CPP_Strings.md | 65 +++ 10_Wiki/Dev/Topic_CPP/CPP_Strings_Access.md | 68 +++ 10_Wiki/Dev/Topic_CPP/CPP_Strings_Concat.md | 68 +++ 10_Wiki/Dev/Topic_CPP/CPP_Strings_Cstyle.md | 65 +++ 10_Wiki/Dev/Topic_CPP/CPP_Strings_Esc.md | 65 +++ 10_Wiki/Dev/Topic_CPP/CPP_Strings_Input.md | 68 +++ 10_Wiki/Dev/Topic_CPP/CPP_Strings_Length.md | 66 +++ .../Dev/Topic_CPP/CPP_Strings_Namespace.md | 70 +++ 10_Wiki/Dev/Topic_CPP/CPP_Strings_Numbers.md | 71 +++ 10_Wiki/Dev/Topic_CPP/CPP_Structs.md | 77 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Switch.md | 76 ++++ 10_Wiki/Dev/Topic_CPP/CPP_Syntax.md | 71 +++ 10_Wiki/Dev/Topic_CPP/CPP_Templates.md | 82 ++++ 10_Wiki/Dev/Topic_CPP/CPP_User_Input.md | 70 +++ 10_Wiki/Dev/Topic_CPP/CPP_Variables.md | 71 +++ .../Dev/Topic_CPP/CPP_Variables_Constants.md | 64 +++ .../Topic_CPP/CPP_Variables_Identifiers.md | 66 +++ .../Dev/Topic_CPP/CPP_Variables_Multiple.md | 65 +++ .../Dev/Topic_CPP/CPP_Variables_RealLife.md | 67 +++ 10_Wiki/Dev/Topic_CPP/CPP_Vectors.md | 84 ++++ .../Dev/Topic_CPP/CPP_Virtual_Functions.md | 81 ++++ 10_Wiki/Dev/Topic_CPP/CPP_While_Loop.md | 68 +++ .../Dev/Topic_CPP/CPP_While_Loop_RealLife.md | 70 +++ 10_Wiki/{ => Dev}/Topic_CSS/00_INDEX.md | 0 .../{ => Dev}/Topic_CSS/CSS_2D_Transforms.md | 0 .../Topic_CSS/CSS_2D_Transforms_Scale.md | 0 .../Topic_CSS/CSS_2D_Transforms_Skew.md | 0 .../{ => Dev}/Topic_CSS/CSS_3D_Transforms.md | 0 .../{ => Dev}/Topic_CSS/CSS_Accessibility.md | 0 .../{ => Dev}/Topic_CSS/CSS_Add_External.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Add_Inline.md | 0 .../{ => Dev}/Topic_CSS/CSS_Add_Internal.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Animations.md | 0 .../Topic_CSS/CSS_Animations_Properties.md | 0 .../Topic_CSS/CSS_Animations_Timing.md | 0 .../Topic_CSS/CSS_Attribute_Selectors.md | 0 .../CSS_Attribute_Selectors_Advanced.md | 0 .../Topic_CSS/CSS_Background_Attachment.md | 0 .../Topic_CSS/CSS_Background_Clip.md | 0 .../Topic_CSS/CSS_Background_Color.md | 0 .../Topic_CSS/CSS_Background_Image.md | 0 .../Topic_CSS/CSS_Background_Origin.md | 0 .../Topic_CSS/CSS_Background_Repeat.md | 0 .../Topic_CSS/CSS_Background_Shorthand.md | 0 .../Topic_CSS/CSS_Background_Size.md | 0 .../{ => Dev}/Topic_CSS/CSS_Border_Color.md | 0 .../{ => Dev}/Topic_CSS/CSS_Border_Images.md | 0 .../Topic_CSS/CSS_Border_Shorthand.md | 0 .../{ => Dev}/Topic_CSS/CSS_Border_Sides.md | 0 .../{ => Dev}/Topic_CSS/CSS_Border_Style.md | 0 .../{ => Dev}/Topic_CSS/CSS_Border_Width.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Box_Model.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Box_Shadow.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Box_Sizing.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Buttons.md | 0 .../{ => Dev}/Topic_CSS/CSS_Buttons_Groups.md | 0 .../{ => Dev}/Topic_CSS/CSS_Buttons_Hover.md | 0 .../{ => Dev}/Topic_CSS/CSS_Center_Align.md | 0 .../{ => Dev}/Topic_CSS/CSS_Clear_Clearfix.md | 0 .../{ => Dev}/Topic_CSS/CSS_Color_Keywords.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Colors.md | 0 .../{ => Dev}/Topic_CSS/CSS_Colors_CSS3.md | 0 .../{ => Dev}/Topic_CSS/CSS_Combinators.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Counters.md | 0 .../Topic_CSS/CSS_Counters_Nested.md | 0 .../{ => Dev}/Topic_CSS/CSS_Custom_Fonts.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Display.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Dropdowns.md | 0 .../Topic_CSS/CSS_Dropdowns_Advanced.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Flexbox.md | 0 .../{ => Dev}/Topic_CSS/CSS_Flexbox_Align.md | 0 .../Topic_CSS/CSS_Flexbox_Container.md | 0 .../{ => Dev}/Topic_CSS/CSS_Flexbox_Items.md | 0 .../Topic_CSS/CSS_Flexbox_Justify.md | 0 .../Topic_CSS/CSS_Flexbox_Responsive.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Float.md | 0 .../{ => Dev}/Topic_CSS/CSS_Float_Examples.md | 0 .../{ => Dev}/Topic_CSS/CSS_Font_Fallbacks.md | 0 .../{ => Dev}/Topic_CSS/CSS_Font_Family.md | 0 .../{ => Dev}/Topic_CSS/CSS_Font_Google.md | 0 .../{ => Dev}/Topic_CSS/CSS_Font_Pairings.md | 0 .../{ => Dev}/Topic_CSS/CSS_Font_Shorthand.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Font_Size.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Font_Style.md | 0 .../{ => Dev}/Topic_CSS/CSS_Font_Web_Safe.md | 0 .../{ => Dev}/Topic_CSS/CSS_Form_Elements.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Form_Focus.md | 0 .../Topic_CSS/CSS_Gradients_Conic.md | 0 .../Topic_CSS/CSS_Gradients_Linear.md | 0 .../Topic_CSS/CSS_Gradients_Radial.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Grid.md | 0 .../{ => Dev}/Topic_CSS/CSS_Grid_12Column.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Grid_Align.md | 0 .../{ => Dev}/Topic_CSS/CSS_Grid_Container.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Grid_Gaps.md | 0 .../Topic_CSS/CSS_Grid_Item_Align.md | 0 .../Topic_CSS/CSS_Grid_Item_Named.md | 0 .../Topic_CSS/CSS_Grid_Item_Order.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Grid_Items.md | 0 .../{ => Dev}/Topic_CSS/CSS_Grid_Tracks.md | 0 .../Topic_CSS/CSS_Grouping_Selectors.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_HEX.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_HSL.md | 0 .../{ => Dev}/Topic_CSS/CSS_Height_Width.md | 0 .../Topic_CSS/CSS_Horizontal_Align.md | 0 .../Topic_CSS/CSS_Horizontal_Navbar.md | 0 .../Topic_CSS/CSS_Icons_Bootstrap.md | 0 .../Topic_CSS/CSS_Icons_Font_Awesome.md | 0 .../{ => Dev}/Topic_CSS/CSS_Icons_Google.md | 0 .../Topic_CSS/CSS_Image_Centering.md | 0 .../{ => Dev}/Topic_CSS/CSS_Image_Effects.md | 0 .../{ => Dev}/Topic_CSS/CSS_Image_Filters.md | 0 .../{ => Dev}/Topic_CSS/CSS_Image_Gallery.md | 0 .../{ => Dev}/Topic_CSS/CSS_Image_Hover.md | 0 .../{ => Dev}/Topic_CSS/CSS_Image_Modal.md | 0 .../{ => Dev}/Topic_CSS/CSS_Image_Shapes.md | 0 .../{ => Dev}/Topic_CSS/CSS_Image_Sprites.md | 0 .../{ => Dev}/Topic_CSS/CSS_Image_Styling.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Important.md | 0 .../{ => Dev}/Topic_CSS/CSS_Inheritance.md | 0 .../{ => Dev}/Topic_CSS/CSS_Inline_Block.md | 0 .../{ => Dev}/Topic_CSS/CSS_Introduction.md | 0 .../{ => Dev}/Topic_CSS/CSS_Link_Buttons.md | 0 .../Topic_CSS/CSS_Margin_Collapse.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Margins.md | 0 .../Topic_CSS/CSS_Masking_Gradients.md | 0 .../{ => Dev}/Topic_CSS/CSS_Masking_PNG.md | 0 .../{ => Dev}/Topic_CSS/CSS_Masking_SVG.md | 0 .../{ => Dev}/Topic_CSS/CSS_Math_Functions.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Max_Width.md | 0 .../{ => Dev}/Topic_CSS/CSS_Media_Queries.md | 0 .../Topic_CSS/CSS_Media_Queries_Examples.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Min_Max.md | 0 .../Topic_CSS/CSS_Multiple_Backgrounds.md | 0 .../Topic_CSS/CSS_Multiple_Columns.md | 0 .../Topic_CSS/CSS_Multiple_Columns_Rules.md | 0 .../Topic_CSS/CSS_Multiple_Style_Sheets.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Navbar.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Object_Fit.md | 0 .../Topic_CSS/CSS_Object_Position.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Opacity.md | 0 .../{ => Dev}/Topic_CSS/CSS_Optimization.md | 0 .../{ => Dev}/Topic_CSS/CSS_Outline_Color.md | 0 .../{ => Dev}/Topic_CSS/CSS_Outline_Offset.md | 0 .../Topic_CSS/CSS_Outline_Shorthand.md | 0 .../{ => Dev}/Topic_CSS/CSS_Outline_Style.md | 0 .../{ => Dev}/Topic_CSS/CSS_Outline_Width.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Overflow.md | 0 .../{ => Dev}/Topic_CSS/CSS_Overflow_XY.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Padding.md | 0 .../Topic_CSS/CSS_Padding_Box_Sizing.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Pagination.md | 0 .../Topic_CSS/CSS_Pagination_Styles.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Position.md | 0 .../Topic_CSS/CSS_Position_Fixed_Absolute.md | 0 .../Topic_CSS/CSS_Position_Offsets.md | 0 .../Topic_CSS/CSS_Position_Sticky.md | 0 .../{ => Dev}/Topic_CSS/CSS_Property_Rule.md | 0 .../{ => Dev}/Topic_CSS/CSS_Pseudo_Classes.md | 0 .../CSS_Pseudo_Classes_Interactive.md | 0 .../CSS_Pseudo_Classes_Structural.md | 0 .../Topic_CSS/CSS_Pseudo_Elements.md | 0 .../Topic_CSS/CSS_Pseudo_Elements_Content.md | 0 .../Topic_CSS/CSS_Pseudo_Elements_Text.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_RGB.md | 0 .../{ => Dev}/Topic_CSS/CSS_RWD_Grid_View.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_RWD_Images.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_RWD_Intro.md | 0 .../Topic_CSS/CSS_RWD_Media_Queries.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_RWD_Videos.md | 0 .../{ => Dev}/Topic_CSS/CSS_RWD_Viewport.md | 0 .../Topic_CSS/CSS_Rounded_Borders.md | 0 .../Topic_CSS/CSS_Rounded_Corners.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Selectors.md | 0 .../{ => Dev}/Topic_CSS/CSS_Shadow_Text.md | 0 .../{ => Dev}/Topic_CSS/CSS_Specificity.md | 0 .../Topic_CSS/CSS_Specificity_Hierarchy.md | 0 .../{ => Dev}/Topic_CSS/CSS_Style_Forms.md | 0 .../{ => Dev}/Topic_CSS/CSS_Style_Inputs.md | 0 .../{ => Dev}/Topic_CSS/CSS_Styling_Links.md | 0 .../{ => Dev}/Topic_CSS/CSS_Styling_Lists.md | 0 .../{ => Dev}/Topic_CSS/CSS_Supports_Rule.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Syntax.md | 0 .../Topic_CSS/CSS_Table_Alignment.md | 0 .../{ => Dev}/Topic_CSS/CSS_Table_Borders.md | 0 .../Topic_CSS/CSS_Table_Responsive.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Table_Size.md | 0 .../{ => Dev}/Topic_CSS/CSS_Table_Styling.md | 0 .../{ => Dev}/Topic_CSS/CSS_Text_Alignment.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Text_Color.md | 0 .../Topic_CSS/CSS_Text_Decoration.md | 0 .../Topic_CSS/CSS_Text_Decoration_Styles.md | 0 .../{ => Dev}/Topic_CSS/CSS_Text_Effects.md | 0 .../{ => Dev}/Topic_CSS/CSS_Text_Shadow.md | 0 .../{ => Dev}/Topic_CSS/CSS_Text_Spacing.md | 0 .../Topic_CSS/CSS_Text_Transformation.md | 0 .../{ => Dev}/Topic_CSS/CSS_Tooltip_Arrows.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Tooltips.md | 0 .../{ => Dev}/Topic_CSS/CSS_Transitions.md | 0 .../Topic_CSS/CSS_Transitions_Timing.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Units.md | 0 .../{ => Dev}/Topic_CSS/CSS_Units_Absolute.md | 0 .../{ => Dev}/Topic_CSS/CSS_Units_Relative.md | 0 .../{ => Dev}/Topic_CSS/CSS_User_Interface.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Variables.md | 0 .../Topic_CSS/CSS_Variables_JavaScript.md | 0 .../Topic_CSS/CSS_Variables_MediaQueries.md | 0 .../Topic_CSS/CSS_Variables_Overriding.md | 0 .../{ => Dev}/Topic_CSS/CSS_Vertical_Align.md | 0 .../Topic_CSS/CSS_Vertical_Navbar.md | 0 .../Topic_CSS/CSS_Visibility_Hide.md | 0 .../{ => Dev}/Topic_CSS/CSS_Website_Layout.md | 0 10_Wiki/{ => Dev}/Topic_CSS/CSS_Z_Index.md | 0 10_Wiki/Dev/Topic_CSharp/00_INDEX.md | 158 +++++++ 10_Wiki/Dev/Topic_CSharp/CSharp_Abstract.md | 86 ++++ .../Topic_CSharp/CSharp_Access_Modifiers.md | 83 ++++ 10_Wiki/Dev/Topic_CSharp/CSharp_Arrays.md | 77 ++++ .../Dev/Topic_CSharp/CSharp_Arrays_Loop.md | 75 ++++ .../Dev/Topic_CSharp/CSharp_Arrays_Multi.md | 80 ++++ .../Dev/Topic_CSharp/CSharp_Arrays_Sort.md | 73 ++++ 10_Wiki/Dev/Topic_CSharp/CSharp_Booleans.md | 81 ++++ 10_Wiki/Dev/Topic_CSharp/CSharp_Break.md | 78 ++++ .../Dev/Topic_CSharp/CSharp_Class_Members.md | 87 ++++ 10_Wiki/Dev/Topic_CSharp/CSharp_Classes.md | 76 ++++ .../Dev/Topic_CSharp/CSharp_Classes_Multi.md | 78 ++++ 10_Wiki/Dev/Topic_CSharp/CSharp_Comments.md | 71 +++ 10_Wiki/Dev/Topic_CSharp/CSharp_Conditions.md | 70 +++ .../Topic_CSharp/CSharp_Conditions_Else.md | 71 +++ .../Topic_CSharp/CSharp_Conditions_ElseIf.md | 77 ++++ .../CSharp_Conditions_Shorthand.md | 72 ++++ .../Dev/Topic_CSharp/CSharp_Constructors.md | 84 ++++ 10_Wiki/Dev/Topic_CSharp/CSharp_Data_Types.md | 75 ++++ 10_Wiki/Dev/Topic_CSharp/CSharp_Enums.md | 80 ++++ 10_Wiki/Dev/Topic_CSharp/CSharp_Exceptions.md | 94 ++++ 10_Wiki/Dev/Topic_CSharp/CSharp_Files.md | 71 +++ 10_Wiki/Dev/Topic_CSharp/CSharp_For_Loop.md | 81 ++++ .../Dev/Topic_CSharp/CSharp_Foreach_Loop.md | 68 +++ .../Dev/Topic_CSharp/CSharp_Get_Started.md | 92 ++++ .../Dev/Topic_CSharp/CSharp_Inheritance.md | 85 ++++ 10_Wiki/Dev/Topic_CSharp/CSharp_Interface.md | 84 ++++ .../Topic_CSharp/CSharp_Interface_Multi.md | 72 ++++ 10_Wiki/Dev/Topic_CSharp/CSharp_Intro.md | 63 +++ 10_Wiki/Dev/Topic_CSharp/CSharp_Math.md | 74 ++++ .../Topic_CSharp/CSharp_Method_Overloading.md | 78 ++++ .../Topic_CSharp/CSharp_Method_Parameters.md | 74 ++++ .../CSharp_Method_Parameters_Default.md | 74 ++++ .../CSharp_Method_Parameters_Named_Args.md | 72 ++++ .../CSharp_Method_Parameters_Return.md | 77 ++++ 10_Wiki/Dev/Topic_CSharp/CSharp_Methods.md | 79 ++++ 10_Wiki/Dev/Topic_CSharp/CSharp_OOP.md | 63 +++ 10_Wiki/Dev/Topic_CSharp/CSharp_Operators.md | 70 +++ .../CSharp_Operators_Assignment.md | 68 +++ .../CSharp_Operators_Comparison.md | 68 +++ .../Topic_CSharp/CSharp_Operators_Logical.md | 69 +++ 10_Wiki/Dev/Topic_CSharp/CSharp_Output.md | 70 +++ .../Dev/Topic_CSharp/CSharp_Polymorphism.md | 77 ++++ 10_Wiki/Dev/Topic_CSharp/CSharp_Properties.md | 85 ++++ 10_Wiki/Dev/Topic_CSharp/CSharp_Strings.md | 68 +++ .../Dev/Topic_CSharp/CSharp_Strings_Access.md | 70 +++ .../Dev/Topic_CSharp/CSharp_Strings_Chars.md | 72 ++++ .../Dev/Topic_CSharp/CSharp_Strings_Concat.md | 70 +++ .../Topic_CSharp/CSharp_Strings_Interpol.md | 68 +++ 10_Wiki/Dev/Topic_CSharp/CSharp_Switch.md | 78 ++++ 10_Wiki/Dev/Topic_CSharp/CSharp_Syntax.md | 80 ++++ .../Dev/Topic_CSharp/CSharp_Type_Casting.md | 75 ++++ 10_Wiki/Dev/Topic_CSharp/CSharp_User_Input.md | 71 +++ 10_Wiki/Dev/Topic_CSharp/CSharp_Variables.md | 75 ++++ .../CSharp_Variables_Constants.md | 65 +++ .../Topic_CSharp/CSharp_Variables_Display.md | 71 +++ .../CSharp_Variables_Identifiers.md | 69 +++ .../Topic_CSharp/CSharp_Variables_Multiple.md | 69 +++ 10_Wiki/Dev/Topic_CSharp/CSharp_While_Loop.md | 78 ++++ 10_Wiki/Dev/Topic_HOWTO/00_INDEX.md | 408 ++++++++++++++++++ .../Dev/Topic_HOWTO/HOWTO_CSS_About_Page.md | 70 +++ .../Topic_HOWTO/HOWTO_CSS_Alert_Buttons.md | 73 ++++ .../Topic_HOWTO/HOWTO_CSS_Animate_Buttons.md | 59 +++ .../Dev/Topic_HOWTO/HOWTO_CSS_Aspect_Ratio.md | 76 ++++ .../Topic_HOWTO/HOWTO_CSS_Block_Buttons.md | 67 +++ .../Topic_HOWTO/HOWTO_CSS_Browser_Window.md | 59 +++ .../Dev/Topic_HOWTO/HOWTO_CSS_Button_Group.md | 73 ++++ .../HOWTO_CSS_Button_Group_Vertical.md | 70 +++ .../Topic_HOWTO/HOWTO_CSS_Button_On_Image.md | 69 +++ .../Dev/Topic_HOWTO/HOWTO_CSS_Button_Split.md | 68 +++ .../Topic_HOWTO/HOWTO_CSS_Center_Button.md | 74 ++++ .../Dev/Topic_HOWTO/HOWTO_CSS_Center_List.md | 70 +++ .../Topic_HOWTO/HOWTO_CSS_Center_Vertical.md | 79 ++++ .../Topic_HOWTO/HOWTO_CSS_Center_Website.md | 67 +++ 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Clearfix.md | 72 ++++ .../Topic_HOWTO/HOWTO_CSS_Div_Full_Height.md | 68 +++ .../Topic_HOWTO/HOWTO_CSS_Download_Button.md | 67 +++ .../Dev/Topic_HOWTO/HOWTO_CSS_Equal_Height.md | 70 +++ .../Topic_HOWTO/HOWTO_CSS_Fading_Buttons.md | 59 +++ .../Dev/Topic_HOWTO/HOWTO_CSS_Fixed_Footer.md | 70 +++ .../Dev/Topic_HOWTO/HOWTO_CSS_Fixed_Menu.md | 73 ++++ .../Topic_HOWTO/HOWTO_CSS_Fixed_Sidebar.md | 77 ++++ .../Dev/Topic_HOWTO/HOWTO_CSS_Four_Columns.md | 69 +++ .../Dev/Topic_HOWTO/HOWTO_CSS_Full_Page.md | 73 ++++ .../Dev/Topic_HOWTO/HOWTO_CSS_Icon_Buttons.md | 69 +++ .../HOWTO_CSS_Images_Side_By_Side.md | 71 +++ .../Topic_HOWTO/HOWTO_CSS_Loading_Buttons.md | 69 +++ .../Topic_HOWTO/HOWTO_CSS_Mixed_Columns.md | 71 +++ .../Dev/Topic_HOWTO/HOWTO_CSS_More_Button.md | 67 +++ .../HOWTO_CSS_Notification_Button.md | 70 +++ .../Topic_HOWTO/HOWTO_CSS_Outline_Buttons.md | 66 +++ .../Dev/Topic_HOWTO/HOWTO_CSS_Pill_Button.md | 66 +++ .../HOWTO_CSS_Responsive_Floats.md | 67 +++ .../Topic_HOWTO/HOWTO_CSS_Round_Buttons.md | 64 +++ .../Topic_HOWTO/HOWTO_CSS_Search_Button.md | 65 +++ .../Topic_HOWTO/HOWTO_CSS_Sidenav_Buttons.md | 74 ++++ .../HOWTO_CSS_Social_Media_Buttons.md | 73 ++++ .../Dev/Topic_HOWTO/HOWTO_CSS_Split_Screen.md | 71 +++ .../Topic_HOWTO/HOWTO_CSS_Sticky_Element.md | 66 +++ .../Dev/Topic_HOWTO/HOWTO_CSS_Table_Center.md | 65 +++ .../Topic_HOWTO/HOWTO_CSS_Table_Full_Width.md | 64 +++ .../Dev/Topic_HOWTO/HOWTO_CSS_Text_Buttons.md | 71 +++ .../Topic_HOWTO/HOWTO_CSS_Three_Columns.md | 69 +++ .../Dev/Topic_HOWTO/HOWTO_CSS_Two_Columns.md | 72 ++++ .../Topic_HOWTO/HOWTO_CSS_Vertical_Line.md | 70 +++ .../Topic_HOWTO/HOWTO_CSS_Zig_Zag_Layout.md | 70 +++ 10_Wiki/{ => Dev}/Topic_HTML/00_INDEX.md | 0 .../Topic_HTML/HTML_Accessibility.md | 0 .../{ => Dev}/Topic_HTML/HTML_Attributes.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Audio.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Basic.md | 0 .../Topic_HTML/HTML_Block_and_Inline.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Buttons.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_CSS.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Canvas.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Charsets.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Classes.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Colors.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Comments.md | 0 .../{ => Dev}/Topic_HTML/HTML_Computercode.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Div.md | 0 .../Topic_HTML/HTML_Drag_and_Drop.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Editors.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Elements.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Emojis.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Entities.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Favicon.md | 0 .../{ => Dev}/Topic_HTML/HTML_File_Paths.md | 0 .../Topic_HTML/HTML_Form_Attributes.md | 0 .../Topic_HTML/HTML_Form_Elements.md | 0 .../{ => Dev}/Topic_HTML/HTML_Formatting.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Forms.md | 0 .../{ => Dev}/Topic_HTML/HTML_Geolocation.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Head.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Headings.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Id.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Iframes.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Images.md | 0 .../Topic_HTML/HTML_Input_Attributes.md | 0 .../Topic_HTML/HTML_Input_Form_Attributes.md | 0 .../{ => Dev}/Topic_HTML/HTML_Input_Types.md | 0 .../{ => Dev}/Topic_HTML/HTML_Introduction.md | 0 .../{ => Dev}/Topic_HTML/HTML_JavaScript.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Layout.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Links.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Lists.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Media.md | 0 .../{ => Dev}/Topic_HTML/HTML_Page_Title.md | 0 .../{ => Dev}/Topic_HTML/HTML_Paragraphs.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Plugins.md | 0 .../{ => Dev}/Topic_HTML/HTML_Quotations.md | 0 .../{ => Dev}/Topic_HTML/HTML_Responsive.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_SSE.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_SVG.md | 0 .../{ => Dev}/Topic_HTML/HTML_Semantics.md | 0 .../{ => Dev}/Topic_HTML/HTML_Style_Guide.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Styles.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Symbols.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Tables.md | 0 .../{ => Dev}/Topic_HTML/HTML_URL_Encode.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Video.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_Web_APIs.md | 0 .../{ => Dev}/Topic_HTML/HTML_Web_Storage.md | 0 .../{ => Dev}/Topic_HTML/HTML_Web_Workers.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_YouTube.md | 0 10_Wiki/{ => Dev}/Topic_HTML/HTML_vs_XHTML.md | 0 10_Wiki/Dev/Topic_Java/00_INDEX.md | 210 +++++++++ 10_Wiki/Dev/Topic_Java/Java_Abstraction.md | 77 ++++ .../Dev/Topic_Java/Java_Advanced_Sorting.md | 76 ++++ 10_Wiki/Dev/Topic_Java/Java_Algorithms.md | 75 ++++ 10_Wiki/Dev/Topic_Java/Java_Annotations.md | 74 ++++ 10_Wiki/Dev/Topic_Java/Java_Anonymous.md | 75 ++++ 10_Wiki/Dev/Topic_Java/Java_ArrayList.md | 83 ++++ 10_Wiki/Dev/Topic_Java/Java_Arrays.md | 75 ++++ 10_Wiki/Dev/Topic_Java/Java_Arrays_Loop.md | 75 ++++ 10_Wiki/Dev/Topic_Java/Java_Arrays_Multi.md | 77 ++++ .../Dev/Topic_Java/Java_Arrays_Real_Life.md | 76 ++++ 10_Wiki/Dev/Topic_Java/Java_Booleans.md | 70 +++ .../Dev/Topic_Java/Java_Booleans_Real_Life.md | 77 ++++ 10_Wiki/Dev/Topic_Java/Java_Booleans_Type.md | 63 +++ 10_Wiki/Dev/Topic_Java/Java_Break_Continue.md | 79 ++++ 10_Wiki/Dev/Topic_Java/Java_BufferedReader.md | 72 ++++ 10_Wiki/Dev/Topic_Java/Java_BufferedWriter.md | 73 ++++ 10_Wiki/Dev/Topic_Java/Java_Characters.md | 71 +++ .../Dev/Topic_Java/Java_Class_Attributes.md | 73 ++++ 10_Wiki/Dev/Topic_Java/Java_Class_Methods.md | 77 ++++ 10_Wiki/Dev/Topic_Java/Java_Classes.md | 76 ++++ 10_Wiki/Dev/Topic_Java/Java_Collections.md | 62 +++ 10_Wiki/Dev/Topic_Java/Java_Comments.md | 67 +++ .../Java_Conditions_Logical_Operators.md | 75 ++++ .../Topic_Java/Java_Conditions_Real_Life.md | 79 ++++ .../Dev/Topic_Java/Java_Constants_Final.md | 66 +++ 10_Wiki/Dev/Topic_Java/Java_Constructors.md | 78 ++++ .../Dev/Topic_Java/Java_Data_Structures.md | 71 +++ 10_Wiki/Dev/Topic_Java/Java_Data_Types.md | 70 +++ .../Topic_Java/Java_Data_Types_Real_Life.md | 66 +++ 10_Wiki/Dev/Topic_Java/Java_Date.md | 76 ++++ 10_Wiki/Dev/Topic_Java/Java_Debugging.md | 71 +++ 10_Wiki/Dev/Topic_Java/Java_Do_While_Loop.md | 69 +++ 10_Wiki/Dev/Topic_Java/Java_Else.md | 69 +++ 10_Wiki/Dev/Topic_Java/Java_Else_If.md | 72 ++++ 10_Wiki/Dev/Topic_Java/Java_Encapsulation.md | 76 ++++ .../Dev/Topic_Java/Java_Enum_Constructor.md | 79 ++++ 10_Wiki/Dev/Topic_Java/Java_Enums.md | 75 ++++ 10_Wiki/Dev/Topic_Java/Java_Errors.md | 72 ++++ .../Topic_Java/Java_Exceptions_Multiple.md | 73 ++++ .../Dev/Topic_Java/Java_FileInputStream.md | 75 ++++ .../Dev/Topic_Java/Java_FileOutputStream.md | 74 ++++ 10_Wiki/Dev/Topic_Java/Java_Files.md | 66 +++ 10_Wiki/Dev/Topic_Java/Java_Files_Create.md | 75 ++++ 10_Wiki/Dev/Topic_Java/Java_Files_Delete.md | 68 +++ 10_Wiki/Dev/Topic_Java/Java_Files_Read.md | 76 ++++ 10_Wiki/Dev/Topic_Java/Java_Files_Write.md | 73 ++++ 10_Wiki/Dev/Topic_Java/Java_For_Each_Loop.md | 67 +++ 10_Wiki/Dev/Topic_Java/Java_For_Loop.md | 71 +++ .../Dev/Topic_Java/Java_For_Loop_Nested.md | 72 ++++ .../Dev/Topic_Java/Java_For_Loop_Real_Life.md | 74 ++++ 10_Wiki/Dev/Topic_Java/Java_Generics.md | 77 ++++ 10_Wiki/Dev/Topic_Java/Java_HashMap.md | 74 ++++ 10_Wiki/Dev/Topic_Java/Java_HashSet.md | 76 ++++ 10_Wiki/Dev/Topic_Java/Java_IO_Streams.md | 61 +++ 10_Wiki/Dev/Topic_Java/Java_Identifiers.md | 66 +++ 10_Wiki/Dev/Topic_Java/Java_If_Else.md | 79 ++++ 10_Wiki/Dev/Topic_Java/Java_If_Shorthand.md | 70 +++ 10_Wiki/Dev/Topic_Java/Java_Inheritance.md | 80 ++++ 10_Wiki/Dev/Topic_Java/Java_Inner_Classes.md | 75 ++++ 10_Wiki/Dev/Topic_Java/Java_Interface.md | 81 ++++ 10_Wiki/Dev/Topic_Java/Java_Intro.md | 78 ++++ 10_Wiki/Dev/Topic_Java/Java_Iterator.md | 75 ++++ 10_Wiki/Dev/Topic_Java/Java_Lambda.md | 72 ++++ 10_Wiki/Dev/Topic_Java/Java_LinkedHashMap.md | 70 +++ 10_Wiki/Dev/Topic_Java/Java_LinkedHashSet.md | 71 +++ 10_Wiki/Dev/Topic_Java/Java_LinkedList.md | 70 +++ 10_Wiki/Dev/Topic_Java/Java_List.md | 62 +++ 10_Wiki/Dev/Topic_Java/Java_Map.md | 61 +++ 10_Wiki/Dev/Topic_Java/Java_Math.md | 75 ++++ 10_Wiki/Dev/Topic_Java/Java_Methods.md | 77 ++++ .../Topic_Java/Java_Methods_Overloading.md | 75 ++++ 10_Wiki/Dev/Topic_Java/Java_Methods_Param.md | 73 ++++ 10_Wiki/Dev/Topic_Java/Java_Methods_Return.md | 73 ++++ 10_Wiki/Dev/Topic_Java/Java_Modifiers.md | 67 +++ .../Dev/Topic_Java/Java_Multiple_Variables.md | 67 +++ 10_Wiki/Dev/Topic_Java/Java_Nested_If.md | 76 ++++ .../Topic_Java/Java_Non_Access_Modifiers.md | 75 ++++ 10_Wiki/Dev/Topic_Java/Java_Numbers.md | 75 ++++ 10_Wiki/Dev/Topic_Java/Java_OOP.md | 62 +++ 10_Wiki/Dev/Topic_Java/Java_Operators.md | 60 +++ .../Topic_Java/Java_Operators_Arithmetic.md | 75 ++++ .../Dev/Topic_Java/Java_Operators_Assign.md | 66 +++ .../Topic_Java/Java_Operators_Comparison.md | 68 +++ .../Dev/Topic_Java/Java_Operators_Logical.md | 69 +++ .../Topic_Java/Java_Operators_Precedence.md | 65 +++ 10_Wiki/Dev/Topic_Java/Java_Output.md | 65 +++ 10_Wiki/Dev/Topic_Java/Java_Packages.md | 77 ++++ 10_Wiki/Dev/Topic_Java/Java_Polymorphism.md | 70 +++ 10_Wiki/Dev/Topic_Java/Java_Print_Numbers.md | 63 +++ .../Dev/Topic_Java/Java_Print_Variables.md | 74 ++++ 10_Wiki/Dev/Topic_Java/Java_Projects.md | 72 ++++ 10_Wiki/Dev/Topic_Java/Java_Recursion.md | 76 ++++ 10_Wiki/Dev/Topic_Java/Java_RegEx.md | 74 ++++ 10_Wiki/Dev/Topic_Java/Java_Scope.md | 73 ++++ 10_Wiki/Dev/Topic_Java/Java_Set.md | 63 +++ 10_Wiki/Dev/Topic_Java/Java_Sort_List.md | 72 ++++ 10_Wiki/Dev/Topic_Java/Java_Statements.md | 68 +++ 10_Wiki/Dev/Topic_Java/Java_Strings.md | 78 ++++ 10_Wiki/Dev/Topic_Java/Java_Strings_Concat.md | 69 +++ .../Dev/Topic_Java/Java_Strings_Numbers.md | 70 +++ .../Topic_Java/Java_Strings_Special_Chars.md | 68 +++ 10_Wiki/Dev/Topic_Java/Java_Super_Keyword.md | 76 ++++ 10_Wiki/Dev/Topic_Java/Java_Switch.md | 78 ++++ 10_Wiki/Dev/Topic_Java/Java_Syntax.md | 74 ++++ 10_Wiki/Dev/Topic_Java/Java_This_Keyword.md | 76 ++++ 10_Wiki/Dev/Topic_Java/Java_Threads.md | 79 ++++ 10_Wiki/Dev/Topic_Java/Java_TreeMap.md | 70 +++ 10_Wiki/Dev/Topic_Java/Java_TreeSet.md | 73 ++++ 10_Wiki/Dev/Topic_Java/Java_Try_Catch.md | 75 ++++ .../Topic_Java/Java_Try_Catch_Resources.md | 73 ++++ 10_Wiki/Dev/Topic_Java/Java_Type_Casting.md | 71 +++ 10_Wiki/Dev/Topic_Java/Java_User_Input.md | 73 ++++ 10_Wiki/Dev/Topic_Java/Java_Var_Keyword.md | 74 ++++ 10_Wiki/Dev/Topic_Java/Java_Variables.md | 77 ++++ .../Topic_Java/Java_Variables_Real_Life.md | 67 +++ 10_Wiki/Dev/Topic_Java/Java_While_Loop.md | 71 +++ .../Topic_Java/Java_While_Loop_Real_Life.md | 71 +++ .../Dev/Topic_Java/Java_Wrapper_Classes.md | 70 +++ .../{ => Dev}/Topic_JavaScript/00_INDEX.md | 0 .../Topic_JavaScript/JavaScript_Arithmetic.md | 0 .../JavaScript_Array_Const.md | 0 .../JavaScript_Array_Iteration.md | 0 .../JavaScript_Array_Methods.md | 0 .../JavaScript_Array_Search.md | 0 .../Topic_JavaScript/JavaScript_Array_Sort.md | 0 .../Topic_JavaScript/JavaScript_Arrays.md | 0 .../JavaScript_Arrow_Function.md | 0 .../Topic_JavaScript/JavaScript_Assignment.md | 0 .../Topic_JavaScript/JavaScript_Async.md | 0 .../JavaScript_Async_Await.md | 0 .../JavaScript_Async_Callbacks.md | 0 .../JavaScript_Async_Debug.md | 0 .../JavaScript_Async_Fetch.md | 0 .../JavaScript_Async_Timeouts.md | 0 .../JavaScript_Asynchronous.md | 0 .../Topic_JavaScript/JavaScript_BigInt.md | 0 .../Topic_JavaScript/JavaScript_Bitwise.md | 0 .../Topic_JavaScript/JavaScript_Booleans.md | 0 .../Topic_JavaScript/JavaScript_Break.md | 0 .../JavaScript_Class_Inheritance.md | 0 .../JavaScript_Class_Static.md | 0 .../Topic_JavaScript/JavaScript_Classes.md | 0 .../JavaScript_Code_Blocks.md | 0 .../Topic_JavaScript/JavaScript_Comments.md | 0 .../JavaScript_Comparisons.md | 0 .../JavaScript_Conditional_Operators.md | 0 .../Topic_JavaScript/JavaScript_Const.md | 0 .../Topic_JavaScript/JavaScript_Continue.md | 0 .../JavaScript_Control_Flow.md | 0 .../JavaScript_DOM_Animations.md | 0 .../Topic_JavaScript/JavaScript_DOM_CSS.md | 0 .../JavaScript_DOM_Elements.md | 0 .../Topic_JavaScript/JavaScript_DOM_HTML.md | 0 .../JavaScript_DOM_Methods.md | 0 .../Topic_JavaScript/JavaScript_Data_Types.md | 0 .../JavaScript_Date_Formats.md | 0 .../Topic_JavaScript/JavaScript_Date_Get.md | 0 .../JavaScript_Date_Methods.md | 0 .../Topic_JavaScript/JavaScript_Date_Set.md | 0 .../Topic_JavaScript/JavaScript_Dates.md | 0 .../JavaScript_Destructuring.md | 0 .../JavaScript_Error_Object.md | 0 .../Topic_JavaScript/JavaScript_Errors.md | 0 .../JavaScript_Errors_Intro.md | 0 .../JavaScript_Errors_Silent.md | 0 .../JavaScript_Event_Listener.md | 0 .../Topic_JavaScript/JavaScript_Events.md | 0 .../JavaScript_Function_Arguments.md | 0 .../JavaScript_Function_Expressions.md | 0 .../JavaScript_Function_Intro.md | 0 .../JavaScript_Function_Invocation.md | 0 .../JavaScript_Function_Parameters.md | 0 .../JavaScript_Function_Return.md | 0 .../Topic_JavaScript/JavaScript_Functions.md | 0 .../Topic_JavaScript/JavaScript_Generators.md | 0 .../Topic_JavaScript/JavaScript_HTML_DOM.md | 0 .../Topic_JavaScript/JavaScript_Hoisting.md | 0 .../Topic_JavaScript/JavaScript_If.md | 0 .../Topic_JavaScript/JavaScript_If_Else.md | 0 .../JavaScript_Introduction.md | 0 .../Topic_JavaScript/JavaScript_Iterables.md | 0 .../Topic_JavaScript/JavaScript_Iterators.md | 0 .../Topic_JavaScript/JavaScript_JSON.md | 0 .../JavaScript_JSON_Arrays.md | 0 .../JavaScript_JSON_Data_Types.md | 0 .../JavaScript_JSON_Objects.md | 0 .../Topic_JavaScript/JavaScript_JSON_Parse.md | 0 .../JavaScript_JSON_Stringify.md | 0 .../JavaScript_JSON_Syntax.md | 0 .../JavaScript_JSON_vs_XML.md | 0 .../Topic_JavaScript/JavaScript_Let.md | 0 .../Topic_JavaScript/JavaScript_Logical.md | 0 .../Topic_JavaScript/JavaScript_Loop_For.md | 0 .../Topic_JavaScript/JavaScript_Loop_While.md | 0 .../Topic_JavaScript/JavaScript_Loops.md | 0 .../JavaScript_Map_Methods.md | 0 .../Topic_JavaScript/JavaScript_Maps.md | 0 .../Topic_JavaScript/JavaScript_Math.md | 0 .../Topic_JavaScript/JavaScript_NaN.md | 0 .../JavaScript_Number_Methods.md | 0 .../JavaScript_Number_Properties.md | 0 .../Topic_JavaScript/JavaScript_Numbers.md | 0 .../JavaScript_Object_Constructors.md | 0 .../JavaScript_Object_Data_Types.md | 0 .../JavaScript_Object_Display.md | 0 .../JavaScript_Object_Methods.md | 0 .../JavaScript_Object_Properties.md | 0 .../JavaScript_Object_This.md | 0 .../Topic_JavaScript/JavaScript_Objects.md | 0 .../Topic_JavaScript/JavaScript_Operators.md | 0 .../Topic_JavaScript/JavaScript_Output.md | 0 .../JavaScript_Primitive_Data.md | 0 .../Topic_JavaScript/JavaScript_Promise.md | 0 .../Topic_JavaScript/JavaScript_Random.md | 0 .../Topic_JavaScript/JavaScript_RegExp.md | 0 .../Topic_JavaScript/JavaScript_Scope.md | 0 .../Topic_JavaScript/JavaScript_Set_Logic.md | 0 .../JavaScript_Set_Methods.md | 0 .../Topic_JavaScript/JavaScript_Sets.md | 0 .../Topic_JavaScript/JavaScript_Statements.md | 0 .../JavaScript_Strict_Mode.md | 0 .../JavaScript_String_Methods.md | 0 .../JavaScript_String_Search.md | 0 .../JavaScript_String_Templates.md | 0 .../Topic_JavaScript/JavaScript_Strings.md | 0 .../Topic_JavaScript/JavaScript_Switch.md | 0 .../Topic_JavaScript/JavaScript_Symbols.md | 0 .../Topic_JavaScript/JavaScript_Syntax.md | 0 .../Topic_JavaScript/JavaScript_Ternary.md | 0 .../JavaScript_Type_Coercion.md | 0 .../JavaScript_Type_Conversion.md | 0 .../Topic_JavaScript/JavaScript_Types.md | 0 .../JavaScript_Var_Let_Const.md | 0 .../Topic_JavaScript/JavaScript_Variables.md | 0 .../Topic_JavaScript/JavaScript_Where_To.md | 0 .../JavaScript_toLocaleString.md | 0 .../Topic_JavaScript/JavaScript_toString.md | 0 .../Topic_JavaScript/JavaScript_typeof.md | 0 .../Topic_JavaScript/JavaScript_undefined.md | 0 10_Wiki/Dev/Topic_PHP/00_INDEX.md | 219 ++++++++++ 10_Wiki/Dev/Topic_PHP/PHP_AJAX_Database.md | 74 ++++ 10_Wiki/Dev/Topic_PHP/PHP_AJAX_Intro.md | 61 +++ 10_Wiki/Dev/Topic_PHP/PHP_AJAX_Live_Search.md | 69 +++ 10_Wiki/Dev/Topic_PHP/PHP_AJAX_PHP.md | 79 ++++ 10_Wiki/Dev/Topic_PHP/PHP_AJAX_Poll.md | 75 ++++ 10_Wiki/Dev/Topic_PHP/PHP_AJAX_XML.md | 73 ++++ 10_Wiki/Dev/Topic_PHP/PHP_Arrays.md | 66 +++ 10_Wiki/Dev/Topic_PHP/PHP_Arrays_Access.md | 72 ++++ 10_Wiki/Dev/Topic_PHP/PHP_Arrays_Add.md | 73 ++++ .../Dev/Topic_PHP/PHP_Arrays_Associative.md | 70 +++ 10_Wiki/Dev/Topic_PHP/PHP_Arrays_Create.md | 73 ++++ 10_Wiki/Dev/Topic_PHP/PHP_Arrays_Functions.md | 65 +++ 10_Wiki/Dev/Topic_PHP/PHP_Arrays_Indexed.md | 71 +++ .../Topic_PHP/PHP_Arrays_Multidimensional.md | 75 ++++ 10_Wiki/Dev/Topic_PHP/PHP_Arrays_Remove.md | 73 ++++ 10_Wiki/Dev/Topic_PHP/PHP_Arrays_Sort.md | 72 ++++ 10_Wiki/Dev/Topic_PHP/PHP_Arrays_Update.md | 71 +++ .../Dev/Topic_PHP/PHP_Callback_Functions.md | 70 +++ 10_Wiki/Dev/Topic_PHP/PHP_Casting.md | 80 ++++ 10_Wiki/Dev/Topic_PHP/PHP_Comments.md | 68 +++ .../Dev/Topic_PHP/PHP_Comments_Multiline.md | 66 +++ 10_Wiki/Dev/Topic_PHP/PHP_Constants.md | 71 +++ 10_Wiki/Dev/Topic_PHP/PHP_Cookies.md | 82 ++++ 10_Wiki/Dev/Topic_PHP/PHP_Data_Types.md | 82 ++++ 10_Wiki/Dev/Topic_PHP/PHP_Date.md | 72 ++++ 10_Wiki/Dev/Topic_PHP/PHP_Echo_Print.md | 67 +++ 10_Wiki/Dev/Topic_PHP/PHP_Error_Handling.md | 80 ++++ 10_Wiki/Dev/Topic_PHP/PHP_Exception.md | 84 ++++ 10_Wiki/Dev/Topic_PHP/PHP_Exceptions.md | 82 ++++ 10_Wiki/Dev/Topic_PHP/PHP_File.md | 62 +++ 10_Wiki/Dev/Topic_PHP/PHP_File_Create.md | 72 ++++ 10_Wiki/Dev/Topic_PHP/PHP_File_Open.md | 73 ++++ 10_Wiki/Dev/Topic_PHP/PHP_File_Upload.md | 78 ++++ 10_Wiki/Dev/Topic_PHP/PHP_Filter.md | 74 ++++ 10_Wiki/Dev/Topic_PHP/PHP_Filter_Advanced.md | 72 ++++ 10_Wiki/Dev/Topic_PHP/PHP_Form_Complete.md | 68 +++ 10_Wiki/Dev/Topic_PHP/PHP_Form_Required.md | 70 +++ 10_Wiki/Dev/Topic_PHP/PHP_Form_URL_Email.md | 69 +++ 10_Wiki/Dev/Topic_PHP/PHP_Form_Validation.md | 75 ++++ 10_Wiki/Dev/Topic_PHP/PHP_Forms.md | 72 ++++ 10_Wiki/Dev/Topic_PHP/PHP_Functions.md | 82 ++++ 10_Wiki/Dev/Topic_PHP/PHP_If_Else.md | 67 +++ 10_Wiki/Dev/Topic_PHP/PHP_If_Else_If.md | 71 +++ 10_Wiki/Dev/Topic_PHP/PHP_If_Nested.md | 70 +++ 10_Wiki/Dev/Topic_PHP/PHP_If_Operators.md | 68 +++ 10_Wiki/Dev/Topic_PHP/PHP_If_Shorthand.md | 66 +++ 10_Wiki/Dev/Topic_PHP/PHP_Includes.md | 71 +++ 10_Wiki/Dev/Topic_PHP/PHP_Install.md | 63 +++ 10_Wiki/Dev/Topic_PHP/PHP_Intro.md | 64 +++ 10_Wiki/Dev/Topic_PHP/PHP_Iterables.md | 73 ++++ 10_Wiki/Dev/Topic_PHP/PHP_JSON.md | 72 ++++ 10_Wiki/Dev/Topic_PHP/PHP_Looping.md | 61 +++ 10_Wiki/Dev/Topic_PHP/PHP_Looping_Break.md | 68 +++ 10_Wiki/Dev/Topic_PHP/PHP_Looping_Continue.md | 68 +++ 10_Wiki/Dev/Topic_PHP/PHP_Looping_Do_While.md | 69 +++ 10_Wiki/Dev/Topic_PHP/PHP_Looping_For.md | 71 +++ 10_Wiki/Dev/Topic_PHP/PHP_Looping_Foreach.md | 75 ++++ 10_Wiki/Dev/Topic_PHP/PHP_Looping_While.md | 73 ++++ 10_Wiki/Dev/Topic_PHP/PHP_Magic_Constants.md | 74 ++++ 10_Wiki/Dev/Topic_PHP/PHP_Match.md | 74 ++++ 10_Wiki/Dev/Topic_PHP/PHP_Math.md | 71 +++ 10_Wiki/Dev/Topic_PHP/PHP_MySQL_Connect.md | 74 ++++ 10_Wiki/Dev/Topic_PHP/PHP_MySQL_Create_DB.md | 71 +++ .../Dev/Topic_PHP/PHP_MySQL_Create_Table.md | 71 +++ 10_Wiki/Dev/Topic_PHP/PHP_MySQL_Delete.md | 67 +++ 10_Wiki/Dev/Topic_PHP/PHP_MySQL_Insert.md | 69 +++ .../Dev/Topic_PHP/PHP_MySQL_Insert_Last_ID.md | 71 +++ .../Topic_PHP/PHP_MySQL_Insert_Multiple.md | 73 ++++ 10_Wiki/Dev/Topic_PHP/PHP_MySQL_Intro.md | 61 +++ .../PHP_MySQL_Prepared_Statements.md | 72 ++++ 10_Wiki/Dev/Topic_PHP/PHP_MySQL_Select.md | 75 ++++ .../Dev/Topic_PHP/PHP_MySQL_Select_Limit.md | 67 +++ .../Topic_PHP/PHP_MySQL_Select_Order_By.md | 62 +++ .../Dev/Topic_PHP/PHP_MySQL_Select_Where.md | 68 +++ 10_Wiki/Dev/Topic_PHP/PHP_MySQL_Update.md | 67 +++ 10_Wiki/Dev/Topic_PHP/PHP_Namespaces.md | 75 ++++ 10_Wiki/Dev/Topic_PHP/PHP_Numbers.md | 74 ++++ .../Dev/Topic_PHP/PHP_OOP_Access_Modifiers.md | 76 ++++ .../Dev/Topic_PHP/PHP_OOP_Classes_Abstract.md | 74 ++++ .../Dev/Topic_PHP/PHP_OOP_Classes_Objects.md | 77 ++++ 10_Wiki/Dev/Topic_PHP/PHP_OOP_Constants.md | 70 +++ 10_Wiki/Dev/Topic_PHP/PHP_OOP_Constructor.md | 71 +++ 10_Wiki/Dev/Topic_PHP/PHP_OOP_Destructor.md | 74 ++++ 10_Wiki/Dev/Topic_PHP/PHP_OOP_Inheritance.md | 84 ++++ 10_Wiki/Dev/Topic_PHP/PHP_OOP_Interfaces.md | 76 ++++ .../Dev/Topic_PHP/PHP_OOP_Static_Methods.md | 79 ++++ .../Topic_PHP/PHP_OOP_Static_Properties.md | 75 ++++ 10_Wiki/Dev/Topic_PHP/PHP_OOP_Traits.md | 75 ++++ 10_Wiki/Dev/Topic_PHP/PHP_OOP_What_Is.md | 62 +++ 10_Wiki/Dev/Topic_PHP/PHP_Operators.md | 70 +++ 10_Wiki/Dev/Topic_PHP/PHP_RegEx.md | 68 +++ 10_Wiki/Dev/Topic_PHP/PHP_RegEx_Functions.md | 74 ++++ 10_Wiki/Dev/Topic_PHP/PHP_Sessions.md | 75 ++++ .../Dev/Topic_PHP/PHP_String_Concatenate.md | 68 +++ 10_Wiki/Dev/Topic_PHP/PHP_String_Escape.md | 65 +++ 10_Wiki/Dev/Topic_PHP/PHP_String_Functions.md | 71 +++ 10_Wiki/Dev/Topic_PHP/PHP_String_Modify.md | 72 ++++ 10_Wiki/Dev/Topic_PHP/PHP_String_Slicing.md | 69 +++ 10_Wiki/Dev/Topic_PHP/PHP_Strings.md | 68 +++ 10_Wiki/Dev/Topic_PHP/PHP_Superglobals.md | 66 +++ 10_Wiki/Dev/Topic_PHP/PHP_Superglobals_Get.md | 68 +++ .../Dev/Topic_PHP/PHP_Superglobals_Globals.md | 74 ++++ .../Dev/Topic_PHP/PHP_Superglobals_Post.md | 76 ++++ .../Dev/Topic_PHP/PHP_Superglobals_Request.md | 69 +++ .../Dev/Topic_PHP/PHP_Superglobals_Server.md | 66 +++ 10_Wiki/Dev/Topic_PHP/PHP_Switch.md | 82 ++++ 10_Wiki/Dev/Topic_PHP/PHP_Syntax.md | 71 +++ 10_Wiki/Dev/Topic_PHP/PHP_Variables.md | 70 +++ 10_Wiki/Dev/Topic_PHP/PHP_Variables_Scope.md | 76 ++++ 10_Wiki/Dev/Topic_PHP/PHP_XML_DOM.md | 74 ++++ 10_Wiki/Dev/Topic_PHP/PHP_XML_Parser_Expat.md | 76 ++++ 10_Wiki/Dev/Topic_PHP/PHP_XML_Parsers.md | 60 +++ .../Dev/Topic_PHP/PHP_XML_SimpleXML_Get.md | 72 ++++ .../Dev/Topic_PHP/PHP_XML_SimpleXML_Read.md | 73 ++++ .../{ => Dev}/Topic_Programming/00_INDEX.md | 0 .../Architecture/AstraAI_아키텍처_개요.md | 104 +++++ .../VSCode_확장_구조와_생명주기.md | 122 ++++++ .../동시성_제어_Lock_Queue_Transaction.md | 129 ++++++ .../의존성_주입과_서비스_인터페이스.md | 128 ++++++ .../Architecture/이벤트_소싱_스토어_패턴.md | 135 ++++++ .../Conventions/코딩_컨벤션과_주석_철학.md | 110 +++++ .../Conventions/프롬프트_엔지니어링_패턴.md | 110 +++++ .../ADR/ADR-0001_이벤트_소싱_채택.md | 84 ++++ .../ADR/ADR-0002_5계층_메모리_분리.md | 79 ++++ ...R-0003_단일작성자_다중역할_멀티에이전트.md | 82 ++++ .../ADR/ADR-0004_순차_디스패치_채택.md | 77 ++++ .../ADR/ADR-0005_파일_기반_저장_채택.md | 80 ++++ ...-0006_수동_의존성주입_인터페이스_서비스.md | 78 ++++ .../ADR-0007_하이브리드_검색_결정론_우선.md | 77 ++++ .../ADR-0008_로컬우선_LLM_클라우드_폴백.md | 77 ++++ .../ADR-0009_결정론_항상_LLM검증_조건부.md | 78 ++++ .../ADR-0010_오케스트레이터_골격_모듈추출.md | 77 ++++ .../AI_Training/AITRAIN_RAG_검색.md | 46 ++ .../AI_Training/AITRAIN_검증_레이어.md | 46 ++ .../AI_Training/AITRAIN_동시성_제어.md | 46 ++ .../AI_Training/AITRAIN_메모리_시스템.md | 46 ++ .../AITRAIN_에이전트_오케스트레이션.md | 46 ++ .../AI_Training/AITRAIN_이벤트소싱_저장.md | 46 ++ .../AI_Training/AITRAIN_프로바이더_추상화.md | 46 ++ .../교훈_라이브러리_Lessons_Learned.md | 102 +++++ .../디버깅_플레이북.md | 100 +++++ .../리팩토링_플레이북.md | 87 ++++ .../아키텍처_휴리스틱.md | 91 ++++ .../안티패턴_카탈로그.md | 117 +++++ .../엔지니어링_트레이드오프_분석.md | 100 +++++ .../소프트웨어_실패_라이브러리.md | 120 ++++++ .../프로젝트_독립_설계_원칙.md | 120 ++++++ .../Language/TypeScript_고급_타입.md | 142 ++++++ .../Language/TypeScript_기초와_타입_시스템.md | 113 +++++ .../Language/모듈_시스템과_프로젝트_구성.md | 122 ++++++ .../비동기_프로그래밍_Promise_async_await.md | 131 ++++++ .../Language/에러_처리와_커스텀_에러.md | 150 +++++++ .../00_패턴_카탈로그_인덱스.md | 62 +++ .../AI/Agent_Orchestration_Pattern.md | 71 +++ .../Pattern_Catalog/AI/Critic_Pattern.md | 63 +++ .../Pattern_Catalog/AI/Memory_Pattern.md | 63 +++ .../Pattern_Catalog/AI/RAG_Pattern.md | 66 +++ .../Pattern_Catalog/AI/Reflection_Pattern.md | 65 +++ .../AI/Tool_Calling_Pattern.md | 65 +++ .../Architecture_Separation_Pattern.md | 67 +++ .../Async_Concurrency_Pattern.md | 69 +++ .../Cross_Cutting/Caching_Pattern.md | 69 +++ .../Cross_Cutting/Data_Flow_Pattern.md | 66 +++ .../Cross_Cutting/Error_Handling_Pattern.md | 68 +++ .../Cross_Cutting/State_Management_Pattern.md | 67 +++ .../Desktop/Background_Worker_Pattern.md | 68 +++ .../Desktop/Command_Pattern.md | 67 +++ .../Desktop/Event_Bus_Pattern.md | 67 +++ .../Pattern_Catalog/Desktop/IPC_Pattern.md | 69 +++ .../Desktop/Plugin_Architecture_Pattern.md | 70 +++ .../Mobile/Background_Task_Pattern.md | 68 +++ .../Mobile/Local_Storage_Pattern.md | 68 +++ .../Mobile/Navigation_Pattern.md | 65 +++ .../Mobile/Offline_Sync_Pattern.md | 66 +++ .../Mobile/Push_Notification_Pattern.md | 67 +++ .../Pattern_Catalog/Web/API_Client_Pattern.md | 72 ++++ .../Web/Infinite_Scroll_Pattern.md | 66 +++ .../Web/JWT_Authentication_Pattern.md | 65 +++ .../Web/React_State_Pattern.md | 65 +++ .../Pattern_Catalog/Web/Repository_Pattern.md | 66 +++ .../00_플랫폼_개발_가이드_인덱스.md | 52 +++ .../AI_에이전트_개발_가이드.md | 60 +++ .../데스크탑_앱_개발_가이드.md | 60 +++ .../Platform_Guides/모바일_개발_가이드.md | 59 +++ .../Platform_Guides/백엔드_API_개발_가이드.md | 60 +++ .../Platform_Guides/웹_개발_가이드.md | 59 +++ .../Subsystems/5계층_메모리_시스템.md | 110 +++++ .../Subsystems/Agent_오케스트레이터_분해.md | 113 +++++ .../Subsystems/Intelligence_검증_레이어.md | 127 ++++++ .../Subsystems/LLM_프로바이더_추상화.md | 124 ++++++ .../Subsystems/RAG_검색_파이프라인.md | 115 +++++ .../Subsystems/TFIDF_이중언어_스코어링.md | 121 ++++++ .../docs/records/Topic_Programming/README.md | 0 .../Topic_Programming/chronicle.config.json | 0 .../Topic_Programming/project-profile.md | 0 .../records/Topic_Programming/timeline.md | 0 10_Wiki/Dev/Topic_Python/00_INDEX.md | 225 ++++++++++ .../Dev/Topic_Python/Python_Args_Kwargs.md | 84 ++++ 10_Wiki/Dev/Topic_Python/Python_Arguments.md | 80 ++++ 10_Wiki/Dev/Topic_Python/Python_Arrays.md | 78 ++++ .../Python_Assign_Multiple_Values.md | 71 +++ 10_Wiki/Dev/Topic_Python/Python_Booleans.md | 85 ++++ 10_Wiki/Dev/Topic_Python/Python_Bytearray.md | 71 +++ 10_Wiki/Dev/Topic_Python/Python_Bytes.md | 69 +++ 10_Wiki/Dev/Topic_Python/Python_Casting.md | 71 +++ .../Topic_Python/Python_Class_Init_Method.md | 74 ++++ .../Dev/Topic_Python/Python_Class_Methods.md | 80 ++++ .../Topic_Python/Python_Class_Properties.md | 83 ++++ .../Python_Class_Self_Parameter.md | 77 ++++ 10_Wiki/Dev/Topic_Python/Python_Classes.md | 73 ++++ 10_Wiki/Dev/Topic_Python/Python_Comments.md | 77 ++++ 10_Wiki/Dev/Topic_Python/Python_Data_Types.md | 75 ++++ 10_Wiki/Dev/Topic_Python/Python_Dates.md | 70 +++ 10_Wiki/Dev/Topic_Python/Python_Decorators.md | 88 ++++ .../Dev/Topic_Python/Python_Delete_Files.md | 70 +++ .../Dev/Topic_Python/Python_Dictionaries.md | 73 ++++ .../Python_Dictionaries_Access.md | 77 ++++ .../Topic_Python/Python_Dictionaries_Add.md | 64 +++ .../Python_Dictionaries_Change.md | 64 +++ .../Topic_Python/Python_Dictionaries_Copy.md | 65 +++ .../Topic_Python/Python_Dictionaries_Loop.md | 70 +++ .../Python_Dictionaries_Methods.md | 75 ++++ .../Python_Dictionaries_Nested.md | 86 ++++ .../Python_Dictionaries_Remove.md | 74 ++++ 10_Wiki/Dev/Topic_Python/Python_Elif.md | 77 ++++ 10_Wiki/Dev/Topic_Python/Python_Else.md | 71 +++ .../Dev/Topic_Python/Python_Encapsulation.md | 86 ++++ .../Dev/Topic_Python/Python_File_Handling.md | 65 +++ 10_Wiki/Dev/Topic_Python/Python_For_Loops.md | 87 ++++ 10_Wiki/Dev/Topic_Python/Python_Frozenset.md | 66 +++ 10_Wiki/Dev/Topic_Python/Python_Functions.md | 76 ++++ 10_Wiki/Dev/Topic_Python/Python_Generators.md | 87 ++++ .../Topic_Python/Python_Global_Variables.md | 74 ++++ .../Dev/Topic_Python/Python_If_Shorthand.md | 71 +++ .../Dev/Topic_Python/Python_If_Statement.md | 70 +++ .../Dev/Topic_Python/Python_Inheritance.md | 81 ++++ .../Dev/Topic_Python/Python_Inner_Classes.md | 83 ++++ 10_Wiki/Dev/Topic_Python/Python_Intro.md | 72 ++++ 10_Wiki/Dev/Topic_Python/Python_Iterators.md | 97 +++++ 10_Wiki/Dev/Topic_Python/Python_JSON.md | 79 ++++ 10_Wiki/Dev/Topic_Python/Python_Lambda.md | 74 ++++ 10_Wiki/Dev/Topic_Python/Python_Lists.md | 81 ++++ .../Dev/Topic_Python/Python_Lists_Access.md | 71 +++ 10_Wiki/Dev/Topic_Python/Python_Lists_Add.md | 70 +++ .../Dev/Topic_Python/Python_Lists_Change.md | 71 +++ .../Python_Lists_Comprehension.md | 82 ++++ 10_Wiki/Dev/Topic_Python/Python_Lists_Copy.md | 72 ++++ 10_Wiki/Dev/Topic_Python/Python_Lists_Join.md | 67 +++ 10_Wiki/Dev/Topic_Python/Python_Lists_Loop.md | 69 +++ .../Dev/Topic_Python/Python_Lists_Methods.md | 68 +++ .../Dev/Topic_Python/Python_Lists_Remove.md | 76 ++++ 10_Wiki/Dev/Topic_Python/Python_Lists_Sort.md | 79 ++++ 10_Wiki/Dev/Topic_Python/Python_Match.md | 78 ++++ 10_Wiki/Dev/Topic_Python/Python_Math.md | 73 ++++ 10_Wiki/Dev/Topic_Python/Python_Memoryview.md | 72 ++++ 10_Wiki/Dev/Topic_Python/Python_Modules.md | 78 ++++ .../Python_MongoDB_Create_Collection.md | 69 +++ .../Topic_Python/Python_MongoDB_Create_DB.md | 71 +++ .../Dev/Topic_Python/Python_MongoDB_Delete.md | 70 +++ .../Python_MongoDB_Drop_Collection.md | 63 +++ .../Dev/Topic_Python/Python_MongoDB_Find.md | 73 ++++ .../Dev/Topic_Python/Python_MongoDB_Insert.md | 75 ++++ .../Dev/Topic_Python/Python_MongoDB_Limit.md | 63 +++ .../Dev/Topic_Python/Python_MongoDB_Query.md | 71 +++ .../Dev/Topic_Python/Python_MongoDB_Sort.md | 66 +++ .../Dev/Topic_Python/Python_MongoDB_Update.md | 68 +++ .../Python_MySQL_Create_Database.md | 72 ++++ .../Topic_Python/Python_MySQL_Create_Table.md | 69 +++ .../Dev/Topic_Python/Python_MySQL_Delete.md | 70 +++ .../Topic_Python/Python_MySQL_Drop_Table.md | 64 +++ .../Dev/Topic_Python/Python_MySQL_Insert.md | 75 ++++ 10_Wiki/Dev/Topic_Python/Python_MySQL_Join.md | 76 ++++ .../Dev/Topic_Python/Python_MySQL_Limit.md | 65 +++ .../Dev/Topic_Python/Python_MySQL_Order_By.md | 65 +++ .../Dev/Topic_Python/Python_MySQL_Select.md | 69 +++ .../Dev/Topic_Python/Python_MySQL_Update.md | 70 +++ .../Dev/Topic_Python/Python_MySQL_Where.md | 70 +++ 10_Wiki/Dev/Topic_Python/Python_Nested_If.md | 80 ++++ 10_Wiki/Dev/Topic_Python/Python_None.md | 70 +++ 10_Wiki/Dev/Topic_Python/Python_Numbers.md | 70 +++ 10_Wiki/Dev/Topic_Python/Python_OOP.md | 62 +++ 10_Wiki/Dev/Topic_Python/Python_Operators.md | 61 +++ .../Python_Operators_Arithmetic.md | 67 +++ .../Topic_Python/Python_Operators_Assign.md | 73 ++++ .../Topic_Python/Python_Operators_Bitwise.md | 70 +++ .../Python_Operators_Comparison.md | 64 +++ .../Topic_Python/Python_Operators_Identity.md | 77 ++++ .../Topic_Python/Python_Operators_Logical.md | 82 ++++ .../Python_Operators_Membership.md | 67 +++ .../Python_Operators_Precedence.md | 66 +++ 10_Wiki/Dev/Topic_Python/Python_Output.md | 67 +++ .../Topic_Python/Python_Output_Variables.md | 74 ++++ 10_Wiki/Dev/Topic_Python/Python_PIP.md | 76 ++++ .../Dev/Topic_Python/Python_Pass_Statement.md | 72 ++++ .../Dev/Topic_Python/Python_Polymorphism.md | 78 ++++ .../Dev/Topic_Python/Python_Print_Numbers.md | 65 +++ 10_Wiki/Dev/Topic_Python/Python_Range.md | 75 ++++ 10_Wiki/Dev/Topic_Python/Python_Read_Files.md | 76 ++++ 10_Wiki/Dev/Topic_Python/Python_Recursion.md | 77 ++++ 10_Wiki/Dev/Topic_Python/Python_RegEx.md | 78 ++++ 10_Wiki/Dev/Topic_Python/Python_Scope.md | 83 ++++ 10_Wiki/Dev/Topic_Python/Python_Sets.md | 72 ++++ .../Dev/Topic_Python/Python_Sets_Access.md | 65 +++ 10_Wiki/Dev/Topic_Python/Python_Sets_Add.md | 66 +++ 10_Wiki/Dev/Topic_Python/Python_Sets_Join.md | 80 ++++ 10_Wiki/Dev/Topic_Python/Python_Sets_Loop.md | 63 +++ .../Dev/Topic_Python/Python_Sets_Methods.md | 61 +++ .../Dev/Topic_Python/Python_Sets_Remove.md | 73 ++++ 10_Wiki/Dev/Topic_Python/Python_Statements.md | 72 ++++ .../Topic_Python/Python_String_Formatting.md | 77 ++++ 10_Wiki/Dev/Topic_Python/Python_Strings.md | 73 ++++ .../Python_Strings_Concatenate.md | 66 +++ .../Dev/Topic_Python/Python_Strings_Escape.md | 65 +++ .../Dev/Topic_Python/Python_Strings_Format.md | 68 +++ .../Topic_Python/Python_Strings_Methods.md | 81 ++++ .../Dev/Topic_Python/Python_Strings_Modify.md | 68 +++ .../Topic_Python/Python_Strings_Slicing.md | 68 +++ 10_Wiki/Dev/Topic_Python/Python_Syntax.md | 75 ++++ .../Topic_Python/Python_Ternary_Operator.md | 66 +++ 10_Wiki/Dev/Topic_Python/Python_Try_Except.md | 95 ++++ 10_Wiki/Dev/Topic_Python/Python_Tuples.md | 76 ++++ .../Dev/Topic_Python/Python_Tuples_Access.md | 67 +++ .../Dev/Topic_Python/Python_Tuples_Join.md | 65 +++ .../Dev/Topic_Python/Python_Tuples_Loop.md | 67 +++ .../Dev/Topic_Python/Python_Tuples_Methods.md | 62 +++ .../Dev/Topic_Python/Python_Tuples_Unpack.md | 71 +++ .../Dev/Topic_Python/Python_Tuples_Update.md | 76 ++++ 10_Wiki/Dev/Topic_Python/Python_User_Input.md | 89 ++++ .../Dev/Topic_Python/Python_Variable_Names.md | 70 +++ 10_Wiki/Dev/Topic_Python/Python_Variables.md | 78 ++++ 10_Wiki/Dev/Topic_Python/Python_VirtualEnv.md | 77 ++++ .../Dev/Topic_Python/Python_While_Loops.md | 76 ++++ .../Topic_Python/Python_Write_Create_Files.md | 74 ++++ 10_Wiki/Dev/Topic_SQL/00_INDEX.md | 141 ++++++ .../Dev/Topic_SQL/SQL_Aggregate_Functions.md | 64 +++ 10_Wiki/Dev/Topic_SQL/SQL_Aliases.md | 83 ++++ 10_Wiki/Dev/Topic_SQL/SQL_All.md | 81 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Alter_Table.md | 78 ++++ 10_Wiki/Dev/Topic_SQL/SQL_And.md | 84 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Any.md | 79 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Auto_Increment.md | 86 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Avg.md | 71 +++ 10_Wiki/Dev/Topic_SQL/SQL_Backup_DB.md | 74 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Between.md | 77 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Case.md | 79 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Check.md | 74 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Comments.md | 81 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Constraints.md | 63 +++ 10_Wiki/Dev/Topic_SQL/SQL_Count.md | 75 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Create_DB.md | 68 +++ 10_Wiki/Dev/Topic_SQL/SQL_Create_Index.md | 71 +++ 10_Wiki/Dev/Topic_SQL/SQL_Create_Table.md | 84 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Data_Types.md | 71 +++ 10_Wiki/Dev/Topic_SQL/SQL_Dates.md | 68 +++ 10_Wiki/Dev/Topic_SQL/SQL_Default.md | 80 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Delete.md | 81 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Drop_DB.md | 67 +++ 10_Wiki/Dev/Topic_SQL/SQL_Drop_Table.md | 74 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Exists.md | 79 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Foreign_Key.md | 82 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Full_Join.md | 71 +++ 10_Wiki/Dev/Topic_SQL/SQL_Group_By.md | 72 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Having.md | 72 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Hosting.md | 71 +++ 10_Wiki/Dev/Topic_SQL/SQL_In.md | 77 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Injection.md | 73 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Inner_Join.md | 80 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Insert_Into.md | 103 +++++ .../Dev/Topic_SQL/SQL_Insert_Into_Select.md | 73 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Intro.md | 76 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Joins.md | 72 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Left_Join.md | 78 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Like.md | 77 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Max.md | 69 +++ 10_Wiki/Dev/Topic_SQL/SQL_Min.md | 69 +++ 10_Wiki/Dev/Topic_SQL/SQL_Not.md | 77 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Not_Null.md | 73 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Null_Functions.md | 86 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Null_Values.md | 70 +++ 10_Wiki/Dev/Topic_SQL/SQL_Operators.md | 67 +++ 10_Wiki/Dev/Topic_SQL/SQL_Or.md | 75 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Order_By.md | 76 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Parameters.md | 73 ++++ .../Dev/Topic_SQL/SQL_Prepared_Statements.md | 81 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Primary_Key.md | 73 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Right_Join.md | 70 +++ 10_Wiki/Dev/Topic_SQL/SQL_Select.md | 85 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Select_Distinct.md | 73 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Select_Into.md | 80 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Select_Top.md | 84 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Self_Join.md | 77 ++++ .../Dev/Topic_SQL/SQL_Stored_Procedures.md | 100 +++++ 10_Wiki/Dev/Topic_SQL/SQL_Sum.md | 74 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Syntax.md | 85 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Union.md | 73 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Union_All.md | 77 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Unique.md | 75 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Update.md | 76 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Views.md | 78 ++++ 10_Wiki/Dev/Topic_SQL/SQL_Where.md | 96 +++++ 10_Wiki/Dev/Topic_SQL/SQL_Wildcards.md | 86 ++++ 10_Wiki/Dev/Topic_W3CSS/00_INDEX.md | 149 +++++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Accordions.md | 75 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Alerts.md | 73 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Animate.md | 72 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Badges.md | 72 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Bars.md | 79 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Borders.md | 71 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Buttons.md | 76 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Cards.md | 70 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Case.md | 70 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Cells.md | 71 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Code.md | 69 +++ .../Dev/Topic_W3CSS/W3CSS_Color_Classes.md | 71 +++ .../Dev/Topic_W3CSS/W3CSS_Color_Fashion.md | 67 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Color_Flat.md | 66 +++ .../Dev/Topic_W3CSS/W3CSS_Color_Libraries.md | 71 +++ .../Dev/Topic_W3CSS/W3CSS_Color_Material.md | 68 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Color_Metro.md | 67 +++ .../Dev/Topic_W3CSS/W3CSS_Color_Schemes.md | 69 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Color_Themes.md | 67 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Color_Win8.md | 66 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Color_iOS.md | 68 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Colors.md | 71 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Containers.md | 68 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Dark_Mode.md | 69 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Defaults.md | 67 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Display.md | 74 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Dropdowns.md | 83 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Effects.md | 69 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Filters.md | 74 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Flex_Items.md | 76 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Flexbox.md | 72 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Fonts.md | 70 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Fonts_Google.md | 70 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Grid.md | 72 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Icons.md | 70 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Images.md | 71 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Input.md | 72 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Intro.md | 72 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Lists.md | 75 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Margins.md | 66 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Material.md | 70 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Mobile.md | 76 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Modal.md | 73 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Navigation.md | 74 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Notes.md | 68 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Padding.md | 65 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Pagination.md | 74 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Panels.md | 74 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Progress_Bar.md | 84 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Quotes.md | 74 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_RTL.md | 71 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Responsive.md | 72 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Round.md | 70 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Rows.md | 73 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Sidebar.md | 83 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Slideshow.md | 81 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Tables.md | 76 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Tabulators.md | 74 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Tags.md | 73 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Text.md | 74 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Tooltips.md | 70 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Trends.md | 75 ++++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Validation.md | 70 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Versions.md | 69 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Web.md | 60 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Web_CSS.md | 71 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Web_HTML.md | 76 ++++ .../Dev/Topic_W3CSS/W3CSS_Web_JavaScript.md | 70 +++ 10_Wiki/Dev/Topic_W3CSS/W3CSS_Web_Layout.md | 60 +++ .../docs/records/Topic_Programming/README.md | 18 + .../Topic_Programming/chronicle.config.json | 11 + .../Topic_Programming/project-profile.md | 31 ++ .../records/Topic_Programming/timeline.md | 4 + .../Comfyui/-prompt endpoint.md | 0 .../Comfyui/API Format (workflow_api.json).md | 0 .../{ => Topic_Graphic}/Comfyui/API Format.md | 0 .../Comfyui/API JSON (Backend Format).md | 0 .../Comfyui/API JSON (workflow_api.json).md | 0 .../{ => Topic_Graphic}/Comfyui/API JSON.md | 0 .../Comfyui/Base64 Image Encoding.md | 0 .../{ => Topic_Graphic}/Comfyui/Comfy CLI.md | 0 .../{ => Topic_Graphic}/Comfyui/Comfy GPT.md | 0 .../Comfyui/Comfy Nodekit.md | 0 .../{ => Topic_Graphic}/Comfyui/ComfyGPT.md | 0 .../Comfyui/ComfyUI API Integration.md | 0 .../Comfyui/ComfyUI API.md | 0 .../Comfyui/ComfyUI Backend Engine.md | 0 .../Comfyui/ComfyUI Custom Scripts.md | 0 .../Comfyui/ComfyUI Manager.md | 0 .../Comfyui/ComfyUI Workflow Extractor.md | 0 ...kflow JSON Generation and Serialization.md | 0 .../Comfyui/ComfyUI Workflow JSON.md | 0 .../Comfyui/ComfyUI Workspace Manager.md | 0 .../Comfyui/ComfyUI-Manager.md | 0 .../Comfyui/ComfyUI-WorkflowGenerator.md | 0 .../Comfyui/ComfyUI-to-Python-Extension.md | 0 .../Comfyui workflow json 생성 방법.md | 0 .../Custom Node Dependency Management.md | 0 .../Comfyui/Custom Node Registry.md | 0 .../Comfyui/Custom Nodes.md | 0 .../Comfyui/Dev mode Options.md | 0 .../Comfyui/Directed Acyclic Graph (DAG).md | 0 .../Comfyui/Draft-07 Specification.md | 0 ...ComfyUI Workflows as Standalone Scripts.md | 0 .../Comfyui/Execution Model Inversion.md | 0 .../Comfyui/ExecutionCache.md | 0 .../Frontend Format (workflow.json).md | 0 .../Comfyui/Frontend Format.md | 0 .../Comfyui/Frontend JSON (workflow.json).md | 0 .../Comfyui/Generative AI Pipeline.md | 0 .../Comfyui/JSON Schema v1.0.md | 0 .../Comfyui/Large Language Models (LLM).md | 0 .../Lazy Evaluation in Graph Theory.md | 0 .../Comfyui/Litegraph Standard.md | 0 .../{ => Topic_Graphic}/Comfyui/Litegraph.md | 0 .../Comfyui/Load Image (Base64).md | 0 .../Comfyui/Metadata Extraction.md | 0 .../Comfyui/Metadata Forensics.md | 0 .../Comfyui/Metadata Stripping.md | 0 .../Comfyui/Model Hashing (SHA-256).md | 0 .../Comfyui/Model Hashing.md | 0 ...Natural Language to Workflow Generation.md | 0 .../Comfyui/Node Definitions.md | 0 .../Comfyui/Node-based Visual Programming.md | 0 10_Wiki/{ => Topic_Graphic}/Comfyui/Nodes.md | 0 .../Comfyui/PNG Metadata Chunks.md | 0 .../RAG (Retrieval-Augmented Generation).md | 0 ...al-Augmented Generation (RAG) for Nodes.md | 0 ...Serialization Formats (Frontend vs API).md | 0 .../Comfyui/Serialization Formats.md | 0 .../Comfyui/Serverless Deployment.md | 0 .../Comfyui/Steganography in Generative AI.md | 0 .../{ => Topic_Graphic}/Comfyui/Subgraph.md | 0 .../Comfyui/Visual Programming Environment.md | 0 .../Workflow API JSON (Backend Format).md | 0 .../Comfyui/Workflow API JSON.md | 0 .../Comfyui/Workflow Extractor.md | 0 .../Workflow JSON (Frontend Format).md | 0 .../Comfyui/Workflow JSON - ComfyUI.md | 0 .../Comfyui/Workflow JSON v1.0 Schema.md | 0 .../Comfyui/Workflow JSON.md | 0 .../Workflow.api.json (Backend Format).md | 0 .../Workflow.json (Frontend Format).md | 0 .../Comfyui/WorkflowExecutor.md | 0 .../Workspace Packaging (.cpack.zip).md | 0 .../Comfyui/Workspace Packaging.md | 0 10_Wiki/{ => Topic_Graphic}/Comfyui/_MOC.md | 0 .../{ => Topic_Graphic}/Comfyui/exiftool.md | 0 .../Comfyui/object_info.json.md | 0 .../Comfyui/workflow_api.json.md | 0 ... ComfyUI custom node - ComfyUI 2026-05-20.md | 0 ... Annotated Examples - ComfyUI 2026-05-20.md | 0 ... ComfyUI MCP Server - ComfyUI 2026-05-20.md | 0 .../위키 Data lists - ComfyUI 2026-05-20.md | 0 .../위키 Datatypes - ComfyUI 2026-05-20.md | 0 ...odel Inversion Guide - ComfyUI 2026-05-20.md | 0 ...키 Getting Started - ComfyUI 2026-05-20.md | 0 ... and Flexible inputs - ComfyUI 2026-05-20.md | 0 ..., Latents, and Masks - ComfyUI 2026-05-20.md | 0 ...키 Lazy Evaluation - ComfyUI 2026-05-20.md | 0 .../위키 Lifecycle - ComfyUI 2026-05-20.md | 0 .../위키 Messages - ComfyUI 2026-05-20.md | 0 ...키 Node Expansion - ComfyUI 2026-05-20.md | 0 ...키 Node replacement - ComfyUI 2026-05-20.md | 0 .../위키 Routes - ComfyUI 2026-05-20.md | 0 ...키 Server Overview - ComfyUI 2026-05-20.md | 0 ... Subgraph blueprints - ComfyUI 2026-05-20.md | 0 .../위키 V3 Migration - ComfyUI 2026-05-20.md | 0 ...위키 Workflow JSON - ComfyUI 2026-05-20.md | 0 ... Workflow templates - ComfyUI 2026-05-20.md | 0 ...ng with torch.Tensor - ComfyUI 2026-05-20.md | 0 .../BOOGU-IMAGE 프롬프트 예시집.md | 0 .../Topic_Prompt/CFG Scale.md | 0 .../Topic_Prompt/ControlNet.md | 0 .../Topic_Prompt/Diffusion Models.md | 0 .../Topic_Prompt/LoRA 미세 조정.md | 0 .../Topic_Prompt/Multimodal AI.md | 0 .../Topic_Prompt/Negative Prompt.md | 0 .../Topic_Prompt/Prompt Engineering.md | 0 .../Topic_Prompt/Stable Diffusion.md | 0 .../Topic_Prompt/image Prompt 작성 방법.md | 0 .../Topic_Prompt/시네마토그래피.md | 0 .../Topic_Prompt/이미지 prompt 생성 예시.md | 0 .../Topic_Prompt/프롬프트 엔지니어링.md | 0 .../확산 모델(Diffusion Model).md | 0 .../.astra/company/_shared/decisions.md | 1 + .../sessions/2026-06-16T04-23-06/_brief.md | 20 + .../sessions/2026-06-16T04-23-06/_report.md | 17 + .../sessions/2026-06-16T04-23-06/_resume.json | 77 ++++ .../2026-06-16T04-23-06/_session.json | 47 ++ .../sessions/2026-06-16T04-23-06/business.md | 16 + .../2026-06-16T04-23-06/researcher.md | 16 + .../sessions/2026-06-16T04-39-21/_brief.md | 12 + .../sessions/2026-06-16T04-39-21/_report.md | 14 + .../sessions/2026-06-16T04-39-21/_resume.json | 71 +++ .../2026-06-16T04-39-21/_session.json | 44 ++ .../sessions/2026-06-16T04-39-21/business.md | 162 +++++++ .../2026-06-16T04-39-21/researcher.md | 79 ++++ 10_Wiki/Topics/ASTRA 기능 인벤토리.md | 35 +- .../Topics/Digests/Projects.md.local-backup | 15 + 10_Wiki/Topics/Digests/writing.md | 27 ++ ...lumes_data_project_antigravity_astraa.json | 26 ++ docs/records/Wiki/chronicle.config.json | 2 +- 1495 files changed, 68534 insertions(+), 27 deletions(-) create mode 100644 10_Wiki/Dev/.DS_Store rename 10_Wiki/{Topic_Programming => Dev}/Architecture/AstraAI_아키텍처_개요.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Architecture/VSCode_확장_구조와_생명주기.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Architecture/동시성_제어_Lock_Queue_Transaction.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Architecture/의존성_주입과_서비스_인터페이스.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Architecture/이벤트_소싱_스토어_패턴.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Conventions/코딩_컨벤션과_주석_철학.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Conventions/프롬프트_엔지니어링_패턴.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Engineering_Intelligence/ADR/ADR-0001_이벤트_소싱_채택.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Engineering_Intelligence/ADR/ADR-0002_5계층_메모리_분리.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Engineering_Intelligence/ADR/ADR-0003_단일작성자_다중역할_멀티에이전트.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Engineering_Intelligence/ADR/ADR-0004_순차_디스패치_채택.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Engineering_Intelligence/ADR/ADR-0005_파일_기반_저장_채택.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Engineering_Intelligence/ADR/ADR-0006_수동_의존성주입_인터페이스_서비스.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Engineering_Intelligence/ADR/ADR-0007_하이브리드_검색_결정론_우선.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Engineering_Intelligence/ADR/ADR-0008_로컬우선_LLM_클라우드_폴백.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Engineering_Intelligence/ADR/ADR-0009_결정론_항상_LLM검증_조건부.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Engineering_Intelligence/ADR/ADR-0010_오케스트레이터_골격_모듈추출.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Engineering_Intelligence/AI_Training/AITRAIN_RAG_검색.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Engineering_Intelligence/AI_Training/AITRAIN_검증_레이어.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Engineering_Intelligence/AI_Training/AITRAIN_동시성_제어.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Engineering_Intelligence/AI_Training/AITRAIN_메모리_시스템.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Engineering_Intelligence/AI_Training/AITRAIN_에이전트_오케스트레이션.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Engineering_Intelligence/AI_Training/AITRAIN_이벤트소싱_저장.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Engineering_Intelligence/AI_Training/AITRAIN_프로바이더_추상화.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Engineering_Intelligence/교훈_라이브러리_Lessons_Learned.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Engineering_Intelligence/디버깅_플레이북.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Engineering_Intelligence/리팩토링_플레이북.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Engineering_Intelligence/아키텍처_휴리스틱.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Engineering_Intelligence/안티패턴_카탈로그.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Engineering_Intelligence/엔지니어링_트레이드오프_분석.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Failure_Library/소프트웨어_실패_라이브러리.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Generalized_Principles/프로젝트_독립_설계_원칙.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Language/TypeScript_고급_타입.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Language/TypeScript_기초와_타입_시스템.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Language/모듈_시스템과_프로젝트_구성.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Language/비동기_프로그래밍_Promise_async_await.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Language/에러_처리와_커스텀_에러.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/00_패턴_카탈로그_인덱스.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/AI/Agent_Orchestration_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/AI/Critic_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/AI/Memory_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/AI/RAG_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/AI/Reflection_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/AI/Tool_Calling_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/Cross_Cutting/Architecture_Separation_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/Cross_Cutting/Async_Concurrency_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/Cross_Cutting/Caching_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/Cross_Cutting/Data_Flow_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/Cross_Cutting/Error_Handling_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/Cross_Cutting/State_Management_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/Desktop/Background_Worker_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/Desktop/Command_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/Desktop/Event_Bus_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/Desktop/IPC_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/Desktop/Plugin_Architecture_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/Mobile/Background_Task_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/Mobile/Local_Storage_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/Mobile/Navigation_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/Mobile/Offline_Sync_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/Mobile/Push_Notification_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/Web/API_Client_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/Web/Infinite_Scroll_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/Web/JWT_Authentication_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/Web/React_State_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Pattern_Catalog/Web/Repository_Pattern.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Platform_Guides/00_플랫폼_개발_가이드_인덱스.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Platform_Guides/AI_에이전트_개발_가이드.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Platform_Guides/데스크탑_앱_개발_가이드.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Platform_Guides/모바일_개발_가이드.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Platform_Guides/백엔드_API_개발_가이드.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Platform_Guides/웹_개발_가이드.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Subsystems/5계층_메모리_시스템.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Subsystems/Agent_오케스트레이터_분해.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Subsystems/Intelligence_검증_레이어.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Subsystems/LLM_프로바이더_추상화.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Subsystems/RAG_검색_파이프라인.md (100%) rename 10_Wiki/{Topic_Programming => Dev}/Subsystems/TFIDF_이중언어_스코어링.md (100%) create mode 100644 10_Wiki/Dev/Topic_C/00_INDEX.md create mode 100644 10_Wiki/Dev/Topic_C/C_Arrays.md create mode 100644 10_Wiki/Dev/Topic_C/C_Arrays_Loop.md create mode 100644 10_Wiki/Dev/Topic_C/C_Arrays_Multi.md create mode 100644 10_Wiki/Dev/Topic_C/C_Arrays_RealLife.md create mode 100644 10_Wiki/Dev/Topic_C/C_Arrays_Size.md create mode 100644 10_Wiki/Dev/Topic_C/C_Bitwise_Operators.md create mode 100644 10_Wiki/Dev/Topic_C/C_Booleans.md create mode 100644 10_Wiki/Dev/Topic_C/C_Booleans_RealLife.md create mode 100644 10_Wiki/Dev/Topic_C/C_Break_Continue.md create mode 100644 10_Wiki/Dev/Topic_C/C_Comments.md create mode 100644 10_Wiki/Dev/Topic_C/C_Conditions.md create mode 100644 10_Wiki/Dev/Topic_C/C_Conditions_Else.md create mode 100644 10_Wiki/Dev/Topic_C/C_Conditions_ElseIf.md create mode 100644 10_Wiki/Dev/Topic_C/C_Conditions_Logical.md create mode 100644 10_Wiki/Dev/Topic_C/C_Conditions_Nested.md create mode 100644 10_Wiki/Dev/Topic_C/C_Conditions_RealLife.md create mode 100644 10_Wiki/Dev/Topic_C/C_Conditions_Short_Hand.md create mode 100644 10_Wiki/Dev/Topic_C/C_Constants.md create mode 100644 10_Wiki/Dev/Topic_C/C_Data_Types.md create mode 100644 10_Wiki/Dev/Topic_C/C_Data_Types_Characters.md create mode 100644 10_Wiki/Dev/Topic_C/C_Data_Types_Dec.md create mode 100644 10_Wiki/Dev/Topic_C/C_Data_Types_Extended.md create mode 100644 10_Wiki/Dev/Topic_C/C_Data_Types_Numbers.md create mode 100644 10_Wiki/Dev/Topic_C/C_Data_Types_RealLife.md create mode 100644 10_Wiki/Dev/Topic_C/C_Data_Types_Sizeof.md create mode 100644 10_Wiki/Dev/Topic_C/C_Date_Time.md create mode 100644 10_Wiki/Dev/Topic_C/C_Debugging.md create mode 100644 10_Wiki/Dev/Topic_C/C_Do_While_Loop.md create mode 100644 10_Wiki/Dev/Topic_C/C_Enums.md create mode 100644 10_Wiki/Dev/Topic_C/C_Error_Handling.md create mode 100644 10_Wiki/Dev/Topic_C/C_Errors.md create mode 100644 10_Wiki/Dev/Topic_C/C_Files.md create mode 100644 10_Wiki/Dev/Topic_C/C_Files_Read.md create mode 100644 10_Wiki/Dev/Topic_C/C_Files_Write.md create mode 100644 10_Wiki/Dev/Topic_C/C_Fixed_Width_Ints.md create mode 100644 10_Wiki/Dev/Topic_C/C_For_Loop.md create mode 100644 10_Wiki/Dev/Topic_C/C_For_Loop_Nested.md create mode 100644 10_Wiki/Dev/Topic_C/C_For_Loop_RealLife.md create mode 100644 10_Wiki/Dev/Topic_C/C_Functions.md create mode 100644 10_Wiki/Dev/Topic_C/C_Functions_Callback.md create mode 100644 10_Wiki/Dev/Topic_C/C_Functions_Decl.md create mode 100644 10_Wiki/Dev/Topic_C/C_Functions_Inline.md create mode 100644 10_Wiki/Dev/Topic_C/C_Functions_Parameters.md create mode 100644 10_Wiki/Dev/Topic_C/C_Functions_Pointers.md create mode 100644 10_Wiki/Dev/Topic_C/C_Functions_Recursion.md create mode 100644 10_Wiki/Dev/Topic_C/C_Get_Started.md create mode 100644 10_Wiki/Dev/Topic_C/C_Input_Validation.md create mode 100644 10_Wiki/Dev/Topic_C/C_Intro.md create mode 100644 10_Wiki/Dev/Topic_C/C_Macros.md create mode 100644 10_Wiki/Dev/Topic_C/C_Math.md create mode 100644 10_Wiki/Dev/Topic_C/C_Memory_Access.md create mode 100644 10_Wiki/Dev/Topic_C/C_Memory_Address.md create mode 100644 10_Wiki/Dev/Topic_C/C_Memory_Allocate.md create mode 100644 10_Wiki/Dev/Topic_C/C_Memory_Deallocate.md create mode 100644 10_Wiki/Dev/Topic_C/C_Memory_Management.md create mode 100644 10_Wiki/Dev/Topic_C/C_Memory_RealLife.md create mode 100644 10_Wiki/Dev/Topic_C/C_Memory_Reallocate.md create mode 100644 10_Wiki/Dev/Topic_C/C_Memory_Struct.md create mode 100644 10_Wiki/Dev/Topic_C/C_Newline.md create mode 100644 10_Wiki/Dev/Topic_C/C_Null.md create mode 100644 10_Wiki/Dev/Topic_C/C_Operators.md create mode 100644 10_Wiki/Dev/Topic_C/C_Operators_Arithmetic.md create mode 100644 10_Wiki/Dev/Topic_C/C_Operators_Assignment.md create mode 100644 10_Wiki/Dev/Topic_C/C_Operators_Comparison.md create mode 100644 10_Wiki/Dev/Topic_C/C_Operators_Logical.md create mode 100644 10_Wiki/Dev/Topic_C/C_Operators_Precedence.md create mode 100644 10_Wiki/Dev/Topic_C/C_Organize_Code.md create mode 100644 10_Wiki/Dev/Topic_C/C_Output.md create mode 100644 10_Wiki/Dev/Topic_C/C_Pointer_To_Pointer.md create mode 100644 10_Wiki/Dev/Topic_C/C_Pointers.md create mode 100644 10_Wiki/Dev/Topic_C/C_Pointers_Arithmetic.md create mode 100644 10_Wiki/Dev/Topic_C/C_Pointers_Arrays.md create mode 100644 10_Wiki/Dev/Topic_C/C_Random_Numbers.md create mode 100644 10_Wiki/Dev/Topic_C/C_Scope.md create mode 100644 10_Wiki/Dev/Topic_C/C_Statements.md create mode 100644 10_Wiki/Dev/Topic_C/C_Storage_Classes.md create mode 100644 10_Wiki/Dev/Topic_C/C_Strings.md create mode 100644 10_Wiki/Dev/Topic_C/C_Strings_Esc.md create mode 100644 10_Wiki/Dev/Topic_C/C_Strings_Functions.md create mode 100644 10_Wiki/Dev/Topic_C/C_Structs.md create mode 100644 10_Wiki/Dev/Topic_C/C_Structs_Nested.md create mode 100644 10_Wiki/Dev/Topic_C/C_Structs_Padding.md create mode 100644 10_Wiki/Dev/Topic_C/C_Structs_Pointers.md create mode 100644 10_Wiki/Dev/Topic_C/C_Switch.md create mode 100644 10_Wiki/Dev/Topic_C/C_Syntax.md create mode 100644 10_Wiki/Dev/Topic_C/C_Type_Conversion.md create mode 100644 10_Wiki/Dev/Topic_C/C_Typedef.md create mode 100644 10_Wiki/Dev/Topic_C/C_Unions.md create mode 100644 10_Wiki/Dev/Topic_C/C_User_Input.md create mode 100644 10_Wiki/Dev/Topic_C/C_Variables.md create mode 100644 10_Wiki/Dev/Topic_C/C_Variables_Change.md create mode 100644 10_Wiki/Dev/Topic_C/C_Variables_Format.md create mode 100644 10_Wiki/Dev/Topic_C/C_Variables_Multiple.md create mode 100644 10_Wiki/Dev/Topic_C/C_Variables_Names.md create mode 100644 10_Wiki/Dev/Topic_C/C_Variables_RealLife.md create mode 100644 10_Wiki/Dev/Topic_C/C_While_Loop.md create mode 100644 10_Wiki/Dev/Topic_C/C_While_Loop_RealLife.md create mode 100644 10_Wiki/Dev/Topic_CPP/00_INDEX.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Access_Specifiers.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Algorithms.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Arrays.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Arrays_Loop.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Arrays_Multi.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Arrays_Omit.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Arrays_RealLife.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Arrays_Size.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Auto.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Booleans.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Booleans_Expressions.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Booleans_RealLife.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Break.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Class_Methods.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Classes.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Comments.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Conditions.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Conditions_Else.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Conditions_ElseIf.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Conditions_Logical.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Conditions_Nested.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Conditions_RealLife.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Conditions_Shorthand.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Constructors.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Constructors_Overloading.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Data_Structures.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Data_Types.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Data_Types_Bool.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Data_Types_Char.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Data_Types_Numeric.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Data_Types_RealLife.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Data_Types_String.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Date.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Debugging.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Deque.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Do_While_Loop.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Encapsulation.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Enum.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Errors.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Exceptions.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Files.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_For_Loop.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_For_Loop_Foreach.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_For_Loop_Nested.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_For_Loop_RealLife.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Friend_Function.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Function_Array.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Function_Default.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Function_Multiple.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Function_Overloading.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Function_Param.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Function_RealLife.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Function_Reference.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Function_Return.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Function_Structures.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Functions.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Functions_Lambda.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Functions_Recursion.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Get_Started.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Inheritance.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Inheritance_Access.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Inheritance_Multilevel.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Inheritance_Multiple.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Input_Validation.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Intro.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Iterators.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_List.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Maps.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Math.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Memory_Management.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Memory_Management_New.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Namespaces.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_New_Lines.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_OOP.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Operators.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Operators_Arithmetic.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Operators_Assignment.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Operators_Comparison.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Operators_Logical.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Operators_Precedence.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Output.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Output_Numbers.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Pointers.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Pointers_Dereference.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Pointers_Modify.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Polymorphism.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Queues.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_References.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_References_Memory.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Scope.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Sets.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Stacks.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Statements.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Strings.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Strings_Access.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Strings_Concat.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Strings_Cstyle.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Strings_Esc.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Strings_Input.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Strings_Length.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Strings_Namespace.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Strings_Numbers.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Structs.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Switch.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Syntax.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Templates.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_User_Input.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Variables.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Variables_Constants.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Variables_Identifiers.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Variables_Multiple.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Variables_RealLife.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Vectors.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_Virtual_Functions.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_While_Loop.md create mode 100644 10_Wiki/Dev/Topic_CPP/CPP_While_Loop_RealLife.md rename 10_Wiki/{ => Dev}/Topic_CSS/00_INDEX.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_2D_Transforms.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_2D_Transforms_Scale.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_2D_Transforms_Skew.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_3D_Transforms.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Accessibility.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Add_External.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Add_Inline.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Add_Internal.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Animations.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Animations_Properties.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Animations_Timing.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Attribute_Selectors.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Attribute_Selectors_Advanced.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Background_Attachment.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Background_Clip.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Background_Color.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Background_Image.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Background_Origin.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Background_Repeat.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Background_Shorthand.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Background_Size.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Border_Color.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Border_Images.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Border_Shorthand.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Border_Sides.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Border_Style.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Border_Width.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Box_Model.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Box_Shadow.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Box_Sizing.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Buttons.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Buttons_Groups.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Buttons_Hover.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Center_Align.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Clear_Clearfix.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Color_Keywords.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Colors.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Colors_CSS3.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Combinators.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Counters.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Counters_Nested.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Custom_Fonts.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Display.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Dropdowns.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Dropdowns_Advanced.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Flexbox.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Flexbox_Align.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Flexbox_Container.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Flexbox_Items.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Flexbox_Justify.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Flexbox_Responsive.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Float.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Float_Examples.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Font_Fallbacks.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Font_Family.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Font_Google.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Font_Pairings.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Font_Shorthand.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Font_Size.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Font_Style.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Font_Web_Safe.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Form_Elements.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Form_Focus.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Gradients_Conic.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Gradients_Linear.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Gradients_Radial.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Grid.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Grid_12Column.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Grid_Align.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Grid_Container.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Grid_Gaps.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Grid_Item_Align.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Grid_Item_Named.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Grid_Item_Order.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Grid_Items.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Grid_Tracks.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Grouping_Selectors.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_HEX.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_HSL.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Height_Width.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Horizontal_Align.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Horizontal_Navbar.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Icons_Bootstrap.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Icons_Font_Awesome.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Icons_Google.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Image_Centering.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Image_Effects.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Image_Filters.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Image_Gallery.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Image_Hover.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Image_Modal.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Image_Shapes.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Image_Sprites.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Image_Styling.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Important.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Inheritance.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Inline_Block.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Introduction.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Link_Buttons.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Margin_Collapse.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Margins.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Masking_Gradients.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Masking_PNG.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Masking_SVG.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Math_Functions.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Max_Width.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Media_Queries.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Media_Queries_Examples.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Min_Max.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Multiple_Backgrounds.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Multiple_Columns.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Multiple_Columns_Rules.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Multiple_Style_Sheets.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Navbar.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Object_Fit.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Object_Position.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Opacity.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Optimization.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Outline_Color.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Outline_Offset.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Outline_Shorthand.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Outline_Style.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Outline_Width.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Overflow.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Overflow_XY.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Padding.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Padding_Box_Sizing.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Pagination.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Pagination_Styles.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Position.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Position_Fixed_Absolute.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Position_Offsets.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Position_Sticky.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Property_Rule.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Pseudo_Classes.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Pseudo_Classes_Interactive.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Pseudo_Classes_Structural.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Pseudo_Elements.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Pseudo_Elements_Content.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Pseudo_Elements_Text.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_RGB.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_RWD_Grid_View.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_RWD_Images.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_RWD_Intro.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_RWD_Media_Queries.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_RWD_Videos.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_RWD_Viewport.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Rounded_Borders.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Rounded_Corners.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Selectors.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Shadow_Text.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Specificity.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Specificity_Hierarchy.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Style_Forms.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Style_Inputs.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Styling_Links.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Styling_Lists.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Supports_Rule.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Syntax.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Table_Alignment.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Table_Borders.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Table_Responsive.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Table_Size.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Table_Styling.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Text_Alignment.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Text_Color.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Text_Decoration.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Text_Decoration_Styles.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Text_Effects.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Text_Shadow.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Text_Spacing.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Text_Transformation.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Tooltip_Arrows.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Tooltips.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Transitions.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Transitions_Timing.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Units.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Units_Absolute.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Units_Relative.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_User_Interface.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Variables.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Variables_JavaScript.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Variables_MediaQueries.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Variables_Overriding.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Vertical_Align.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Vertical_Navbar.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Visibility_Hide.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Website_Layout.md (100%) rename 10_Wiki/{ => Dev}/Topic_CSS/CSS_Z_Index.md (100%) create mode 100644 10_Wiki/Dev/Topic_CSharp/00_INDEX.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Abstract.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Access_Modifiers.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Arrays.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Arrays_Loop.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Arrays_Multi.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Arrays_Sort.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Booleans.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Break.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Class_Members.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Classes.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Classes_Multi.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Comments.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Conditions.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Conditions_Else.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Conditions_ElseIf.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Conditions_Shorthand.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Constructors.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Data_Types.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Enums.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Exceptions.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Files.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_For_Loop.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Foreach_Loop.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Get_Started.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Inheritance.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Interface.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Interface_Multi.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Intro.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Math.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Method_Overloading.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Method_Parameters.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Method_Parameters_Default.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Method_Parameters_Named_Args.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Method_Parameters_Return.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Methods.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_OOP.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Operators.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Operators_Assignment.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Operators_Comparison.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Operators_Logical.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Output.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Polymorphism.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Properties.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Strings.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Strings_Access.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Strings_Chars.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Strings_Concat.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Strings_Interpol.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Switch.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Syntax.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Type_Casting.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_User_Input.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Variables.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Variables_Constants.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Variables_Display.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Variables_Identifiers.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_Variables_Multiple.md create mode 100644 10_Wiki/Dev/Topic_CSharp/CSharp_While_Loop.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/00_INDEX.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_About_Page.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Alert_Buttons.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Animate_Buttons.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Aspect_Ratio.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Block_Buttons.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Browser_Window.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Button_Group.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Button_Group_Vertical.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Button_On_Image.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Button_Split.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Center_Button.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Center_List.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Center_Vertical.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Center_Website.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Clearfix.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Div_Full_Height.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Download_Button.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Equal_Height.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Fading_Buttons.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Fixed_Footer.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Fixed_Menu.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Fixed_Sidebar.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Four_Columns.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Full_Page.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Icon_Buttons.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Images_Side_By_Side.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Loading_Buttons.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Mixed_Columns.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_More_Button.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Notification_Button.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Outline_Buttons.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Pill_Button.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Responsive_Floats.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Round_Buttons.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Search_Button.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Sidenav_Buttons.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Social_Media_Buttons.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Split_Screen.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Sticky_Element.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Table_Center.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Table_Full_Width.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Text_Buttons.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Three_Columns.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Two_Columns.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Vertical_Line.md create mode 100644 10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Zig_Zag_Layout.md rename 10_Wiki/{ => Dev}/Topic_HTML/00_INDEX.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Accessibility.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Attributes.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Audio.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Basic.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Block_and_Inline.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Buttons.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_CSS.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Canvas.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Charsets.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Classes.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Colors.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Comments.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Computercode.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Div.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Drag_and_Drop.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Editors.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Elements.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Emojis.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Entities.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Favicon.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_File_Paths.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Form_Attributes.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Form_Elements.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Formatting.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Forms.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Geolocation.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Head.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Headings.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Id.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Iframes.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Images.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Input_Attributes.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Input_Form_Attributes.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Input_Types.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Introduction.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_JavaScript.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Layout.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Links.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Lists.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Media.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Page_Title.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Paragraphs.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Plugins.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Quotations.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Responsive.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_SSE.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_SVG.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Semantics.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Style_Guide.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Styles.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Symbols.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Tables.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_URL_Encode.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Video.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Web_APIs.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Web_Storage.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_Web_Workers.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_YouTube.md (100%) rename 10_Wiki/{ => Dev}/Topic_HTML/HTML_vs_XHTML.md (100%) create mode 100644 10_Wiki/Dev/Topic_Java/00_INDEX.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Abstraction.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Advanced_Sorting.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Algorithms.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Annotations.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Anonymous.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_ArrayList.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Arrays.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Arrays_Loop.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Arrays_Multi.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Arrays_Real_Life.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Booleans.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Booleans_Real_Life.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Booleans_Type.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Break_Continue.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_BufferedReader.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_BufferedWriter.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Characters.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Class_Attributes.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Class_Methods.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Classes.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Collections.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Comments.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Conditions_Logical_Operators.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Conditions_Real_Life.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Constants_Final.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Constructors.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Data_Structures.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Data_Types.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Data_Types_Real_Life.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Date.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Debugging.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Do_While_Loop.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Else.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Else_If.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Encapsulation.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Enum_Constructor.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Enums.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Errors.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Exceptions_Multiple.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_FileInputStream.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_FileOutputStream.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Files.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Files_Create.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Files_Delete.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Files_Read.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Files_Write.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_For_Each_Loop.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_For_Loop.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_For_Loop_Nested.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_For_Loop_Real_Life.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Generics.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_HashMap.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_HashSet.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_IO_Streams.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Identifiers.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_If_Else.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_If_Shorthand.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Inheritance.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Inner_Classes.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Interface.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Intro.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Iterator.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Lambda.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_LinkedHashMap.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_LinkedHashSet.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_LinkedList.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_List.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Map.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Math.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Methods.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Methods_Overloading.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Methods_Param.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Methods_Return.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Modifiers.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Multiple_Variables.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Nested_If.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Non_Access_Modifiers.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Numbers.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_OOP.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Operators.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Operators_Arithmetic.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Operators_Assign.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Operators_Comparison.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Operators_Logical.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Operators_Precedence.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Output.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Packages.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Polymorphism.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Print_Numbers.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Print_Variables.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Projects.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Recursion.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_RegEx.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Scope.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Set.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Sort_List.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Statements.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Strings.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Strings_Concat.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Strings_Numbers.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Strings_Special_Chars.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Super_Keyword.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Switch.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Syntax.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_This_Keyword.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Threads.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_TreeMap.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_TreeSet.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Try_Catch.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Try_Catch_Resources.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Type_Casting.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_User_Input.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Var_Keyword.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Variables.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Variables_Real_Life.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_While_Loop.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_While_Loop_Real_Life.md create mode 100644 10_Wiki/Dev/Topic_Java/Java_Wrapper_Classes.md rename 10_Wiki/{ => Dev}/Topic_JavaScript/00_INDEX.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Arithmetic.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Array_Const.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Array_Iteration.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Array_Methods.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Array_Search.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Array_Sort.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Arrays.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Arrow_Function.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Assignment.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Async.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Async_Await.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Async_Callbacks.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Async_Debug.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Async_Fetch.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Async_Timeouts.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Asynchronous.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_BigInt.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Bitwise.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Booleans.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Break.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Class_Inheritance.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Class_Static.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Classes.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Code_Blocks.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Comments.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Comparisons.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Conditional_Operators.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Const.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Continue.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Control_Flow.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_DOM_Animations.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_DOM_CSS.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_DOM_Elements.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_DOM_HTML.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_DOM_Methods.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Data_Types.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Date_Formats.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Date_Get.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Date_Methods.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Date_Set.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Dates.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Destructuring.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Error_Object.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Errors.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Errors_Intro.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Errors_Silent.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Event_Listener.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Events.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Function_Arguments.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Function_Expressions.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Function_Intro.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Function_Invocation.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Function_Parameters.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Function_Return.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Functions.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Generators.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_HTML_DOM.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Hoisting.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_If.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_If_Else.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Introduction.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Iterables.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Iterators.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_JSON.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_JSON_Arrays.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_JSON_Data_Types.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_JSON_Objects.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_JSON_Parse.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_JSON_Stringify.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_JSON_Syntax.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_JSON_vs_XML.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Let.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Logical.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Loop_For.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Loop_While.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Loops.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Map_Methods.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Maps.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Math.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_NaN.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Number_Methods.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Number_Properties.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Numbers.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Object_Constructors.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Object_Data_Types.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Object_Display.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Object_Methods.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Object_Properties.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Object_This.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Objects.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Operators.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Output.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Primitive_Data.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Promise.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Random.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_RegExp.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Scope.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Set_Logic.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Set_Methods.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Sets.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Statements.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Strict_Mode.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_String_Methods.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_String_Search.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_String_Templates.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Strings.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Switch.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Symbols.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Syntax.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Ternary.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Type_Coercion.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Type_Conversion.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Types.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Var_Let_Const.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Variables.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_Where_To.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_toLocaleString.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_toString.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_typeof.md (100%) rename 10_Wiki/{ => Dev}/Topic_JavaScript/JavaScript_undefined.md (100%) create mode 100644 10_Wiki/Dev/Topic_PHP/00_INDEX.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_AJAX_Database.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_AJAX_Intro.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_AJAX_Live_Search.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_AJAX_PHP.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_AJAX_Poll.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_AJAX_XML.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Arrays.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Arrays_Access.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Arrays_Add.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Arrays_Associative.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Arrays_Create.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Arrays_Functions.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Arrays_Indexed.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Arrays_Multidimensional.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Arrays_Remove.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Arrays_Sort.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Arrays_Update.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Callback_Functions.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Casting.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Comments.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Comments_Multiline.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Constants.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Cookies.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Data_Types.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Date.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Echo_Print.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Error_Handling.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Exception.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Exceptions.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_File.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_File_Create.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_File_Open.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_File_Upload.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Filter.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Filter_Advanced.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Form_Complete.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Form_Required.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Form_URL_Email.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Form_Validation.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Forms.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Functions.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_If_Else.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_If_Else_If.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_If_Nested.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_If_Operators.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_If_Shorthand.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Includes.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Install.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Intro.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Iterables.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_JSON.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Looping.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Looping_Break.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Looping_Continue.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Looping_Do_While.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Looping_For.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Looping_Foreach.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Looping_While.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Magic_Constants.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Match.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Math.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_MySQL_Connect.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_MySQL_Create_DB.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_MySQL_Create_Table.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_MySQL_Delete.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_MySQL_Insert.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_MySQL_Insert_Last_ID.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_MySQL_Insert_Multiple.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_MySQL_Intro.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_MySQL_Prepared_Statements.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_MySQL_Select.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_MySQL_Select_Limit.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_MySQL_Select_Order_By.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_MySQL_Select_Where.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_MySQL_Update.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Namespaces.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Numbers.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_OOP_Access_Modifiers.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_OOP_Classes_Abstract.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_OOP_Classes_Objects.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_OOP_Constants.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_OOP_Constructor.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_OOP_Destructor.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_OOP_Inheritance.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_OOP_Interfaces.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_OOP_Static_Methods.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_OOP_Static_Properties.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_OOP_Traits.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_OOP_What_Is.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Operators.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_RegEx.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_RegEx_Functions.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Sessions.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_String_Concatenate.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_String_Escape.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_String_Functions.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_String_Modify.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_String_Slicing.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Strings.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Superglobals.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Superglobals_Get.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Superglobals_Globals.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Superglobals_Post.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Superglobals_Request.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Superglobals_Server.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Switch.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Syntax.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Variables.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_Variables_Scope.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_XML_DOM.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_XML_Parser_Expat.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_XML_Parsers.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_XML_SimpleXML_Get.md create mode 100644 10_Wiki/Dev/Topic_PHP/PHP_XML_SimpleXML_Read.md rename 10_Wiki/{ => Dev}/Topic_Programming/00_INDEX.md (100%) create mode 100644 10_Wiki/Dev/Topic_Programming/Architecture/AstraAI_아키텍처_개요.md create mode 100644 10_Wiki/Dev/Topic_Programming/Architecture/VSCode_확장_구조와_생명주기.md create mode 100644 10_Wiki/Dev/Topic_Programming/Architecture/동시성_제어_Lock_Queue_Transaction.md create mode 100644 10_Wiki/Dev/Topic_Programming/Architecture/의존성_주입과_서비스_인터페이스.md create mode 100644 10_Wiki/Dev/Topic_Programming/Architecture/이벤트_소싱_스토어_패턴.md create mode 100644 10_Wiki/Dev/Topic_Programming/Conventions/코딩_컨벤션과_주석_철학.md create mode 100644 10_Wiki/Dev/Topic_Programming/Conventions/프롬프트_엔지니어링_패턴.md create mode 100644 10_Wiki/Dev/Topic_Programming/Engineering_Intelligence/ADR/ADR-0001_이벤트_소싱_채택.md create mode 100644 10_Wiki/Dev/Topic_Programming/Engineering_Intelligence/ADR/ADR-0002_5계층_메모리_분리.md create mode 100644 10_Wiki/Dev/Topic_Programming/Engineering_Intelligence/ADR/ADR-0003_단일작성자_다중역할_멀티에이전트.md create mode 100644 10_Wiki/Dev/Topic_Programming/Engineering_Intelligence/ADR/ADR-0004_순차_디스패치_채택.md create mode 100644 10_Wiki/Dev/Topic_Programming/Engineering_Intelligence/ADR/ADR-0005_파일_기반_저장_채택.md create mode 100644 10_Wiki/Dev/Topic_Programming/Engineering_Intelligence/ADR/ADR-0006_수동_의존성주입_인터페이스_서비스.md create mode 100644 10_Wiki/Dev/Topic_Programming/Engineering_Intelligence/ADR/ADR-0007_하이브리드_검색_결정론_우선.md create mode 100644 10_Wiki/Dev/Topic_Programming/Engineering_Intelligence/ADR/ADR-0008_로컬우선_LLM_클라우드_폴백.md create mode 100644 10_Wiki/Dev/Topic_Programming/Engineering_Intelligence/ADR/ADR-0009_결정론_항상_LLM검증_조건부.md create mode 100644 10_Wiki/Dev/Topic_Programming/Engineering_Intelligence/ADR/ADR-0010_오케스트레이터_골격_모듈추출.md create mode 100644 10_Wiki/Dev/Topic_Programming/Engineering_Intelligence/AI_Training/AITRAIN_RAG_검색.md create mode 100644 10_Wiki/Dev/Topic_Programming/Engineering_Intelligence/AI_Training/AITRAIN_검증_레이어.md create mode 100644 10_Wiki/Dev/Topic_Programming/Engineering_Intelligence/AI_Training/AITRAIN_동시성_제어.md create mode 100644 10_Wiki/Dev/Topic_Programming/Engineering_Intelligence/AI_Training/AITRAIN_메모리_시스템.md create mode 100644 10_Wiki/Dev/Topic_Programming/Engineering_Intelligence/AI_Training/AITRAIN_에이전트_오케스트레이션.md create mode 100644 10_Wiki/Dev/Topic_Programming/Engineering_Intelligence/AI_Training/AITRAIN_이벤트소싱_저장.md create mode 100644 10_Wiki/Dev/Topic_Programming/Engineering_Intelligence/AI_Training/AITRAIN_프로바이더_추상화.md create mode 100644 10_Wiki/Dev/Topic_Programming/Engineering_Intelligence/교훈_라이브러리_Lessons_Learned.md create mode 100644 10_Wiki/Dev/Topic_Programming/Engineering_Intelligence/디버깅_플레이북.md create mode 100644 10_Wiki/Dev/Topic_Programming/Engineering_Intelligence/리팩토링_플레이북.md create mode 100644 10_Wiki/Dev/Topic_Programming/Engineering_Intelligence/아키텍처_휴리스틱.md create mode 100644 10_Wiki/Dev/Topic_Programming/Engineering_Intelligence/안티패턴_카탈로그.md create mode 100644 10_Wiki/Dev/Topic_Programming/Engineering_Intelligence/엔지니어링_트레이드오프_분석.md create mode 100644 10_Wiki/Dev/Topic_Programming/Failure_Library/소프트웨어_실패_라이브러리.md create mode 100644 10_Wiki/Dev/Topic_Programming/Generalized_Principles/프로젝트_독립_설계_원칙.md create mode 100644 10_Wiki/Dev/Topic_Programming/Language/TypeScript_고급_타입.md create mode 100644 10_Wiki/Dev/Topic_Programming/Language/TypeScript_기초와_타입_시스템.md create mode 100644 10_Wiki/Dev/Topic_Programming/Language/모듈_시스템과_프로젝트_구성.md create mode 100644 10_Wiki/Dev/Topic_Programming/Language/비동기_프로그래밍_Promise_async_await.md create mode 100644 10_Wiki/Dev/Topic_Programming/Language/에러_처리와_커스텀_에러.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/00_패턴_카탈로그_인덱스.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/AI/Agent_Orchestration_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/AI/Critic_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/AI/Memory_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/AI/RAG_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/AI/Reflection_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/AI/Tool_Calling_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/Cross_Cutting/Architecture_Separation_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/Cross_Cutting/Async_Concurrency_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/Cross_Cutting/Caching_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/Cross_Cutting/Data_Flow_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/Cross_Cutting/Error_Handling_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/Cross_Cutting/State_Management_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/Desktop/Background_Worker_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/Desktop/Command_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/Desktop/Event_Bus_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/Desktop/IPC_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/Desktop/Plugin_Architecture_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/Mobile/Background_Task_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/Mobile/Local_Storage_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/Mobile/Navigation_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/Mobile/Offline_Sync_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/Mobile/Push_Notification_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/Web/API_Client_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/Web/Infinite_Scroll_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/Web/JWT_Authentication_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/Web/React_State_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Pattern_Catalog/Web/Repository_Pattern.md create mode 100644 10_Wiki/Dev/Topic_Programming/Platform_Guides/00_플랫폼_개발_가이드_인덱스.md create mode 100644 10_Wiki/Dev/Topic_Programming/Platform_Guides/AI_에이전트_개발_가이드.md create mode 100644 10_Wiki/Dev/Topic_Programming/Platform_Guides/데스크탑_앱_개발_가이드.md create mode 100644 10_Wiki/Dev/Topic_Programming/Platform_Guides/모바일_개발_가이드.md create mode 100644 10_Wiki/Dev/Topic_Programming/Platform_Guides/백엔드_API_개발_가이드.md create mode 100644 10_Wiki/Dev/Topic_Programming/Platform_Guides/웹_개발_가이드.md create mode 100644 10_Wiki/Dev/Topic_Programming/Subsystems/5계층_메모리_시스템.md create mode 100644 10_Wiki/Dev/Topic_Programming/Subsystems/Agent_오케스트레이터_분해.md create mode 100644 10_Wiki/Dev/Topic_Programming/Subsystems/Intelligence_검증_레이어.md create mode 100644 10_Wiki/Dev/Topic_Programming/Subsystems/LLM_프로바이더_추상화.md create mode 100644 10_Wiki/Dev/Topic_Programming/Subsystems/RAG_검색_파이프라인.md create mode 100644 10_Wiki/Dev/Topic_Programming/Subsystems/TFIDF_이중언어_스코어링.md rename 10_Wiki/{ => Dev}/Topic_Programming/docs/records/Topic_Programming/README.md (100%) rename 10_Wiki/{ => Dev}/Topic_Programming/docs/records/Topic_Programming/chronicle.config.json (100%) rename 10_Wiki/{ => Dev}/Topic_Programming/docs/records/Topic_Programming/project-profile.md (100%) rename 10_Wiki/{ => Dev}/Topic_Programming/docs/records/Topic_Programming/timeline.md (100%) create mode 100644 10_Wiki/Dev/Topic_Python/00_INDEX.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Args_Kwargs.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Arguments.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Arrays.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Assign_Multiple_Values.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Booleans.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Bytearray.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Bytes.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Casting.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Class_Init_Method.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Class_Methods.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Class_Properties.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Class_Self_Parameter.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Classes.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Comments.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Data_Types.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Dates.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Decorators.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Delete_Files.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Dictionaries.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Dictionaries_Access.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Dictionaries_Add.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Dictionaries_Change.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Dictionaries_Copy.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Dictionaries_Loop.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Dictionaries_Methods.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Dictionaries_Nested.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Dictionaries_Remove.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Elif.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Else.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Encapsulation.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_File_Handling.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_For_Loops.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Frozenset.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Functions.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Generators.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Global_Variables.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_If_Shorthand.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_If_Statement.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Inheritance.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Inner_Classes.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Intro.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Iterators.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_JSON.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Lambda.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Lists.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Lists_Access.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Lists_Add.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Lists_Change.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Lists_Comprehension.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Lists_Copy.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Lists_Join.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Lists_Loop.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Lists_Methods.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Lists_Remove.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Lists_Sort.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Match.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Math.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Memoryview.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Modules.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_MongoDB_Create_Collection.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_MongoDB_Create_DB.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_MongoDB_Delete.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_MongoDB_Drop_Collection.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_MongoDB_Find.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_MongoDB_Insert.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_MongoDB_Limit.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_MongoDB_Query.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_MongoDB_Sort.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_MongoDB_Update.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_MySQL_Create_Database.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_MySQL_Create_Table.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_MySQL_Delete.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_MySQL_Drop_Table.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_MySQL_Insert.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_MySQL_Join.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_MySQL_Limit.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_MySQL_Order_By.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_MySQL_Select.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_MySQL_Update.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_MySQL_Where.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Nested_If.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_None.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Numbers.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_OOP.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Operators.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Operators_Arithmetic.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Operators_Assign.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Operators_Bitwise.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Operators_Comparison.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Operators_Identity.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Operators_Logical.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Operators_Membership.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Operators_Precedence.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Output.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Output_Variables.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_PIP.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Pass_Statement.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Polymorphism.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Print_Numbers.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Range.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Read_Files.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Recursion.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_RegEx.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Scope.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Sets.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Sets_Access.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Sets_Add.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Sets_Join.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Sets_Loop.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Sets_Methods.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Sets_Remove.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Statements.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_String_Formatting.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Strings.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Strings_Concatenate.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Strings_Escape.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Strings_Format.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Strings_Methods.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Strings_Modify.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Strings_Slicing.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Syntax.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Ternary_Operator.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Try_Except.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Tuples.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Tuples_Access.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Tuples_Join.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Tuples_Loop.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Tuples_Methods.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Tuples_Unpack.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Tuples_Update.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_User_Input.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Variable_Names.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Variables.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_VirtualEnv.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_While_Loops.md create mode 100644 10_Wiki/Dev/Topic_Python/Python_Write_Create_Files.md create mode 100644 10_Wiki/Dev/Topic_SQL/00_INDEX.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Aggregate_Functions.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Aliases.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_All.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Alter_Table.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_And.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Any.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Auto_Increment.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Avg.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Backup_DB.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Between.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Case.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Check.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Comments.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Constraints.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Count.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Create_DB.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Create_Index.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Create_Table.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Data_Types.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Dates.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Default.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Delete.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Drop_DB.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Drop_Table.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Exists.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Foreign_Key.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Full_Join.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Group_By.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Having.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Hosting.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_In.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Injection.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Inner_Join.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Insert_Into.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Insert_Into_Select.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Intro.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Joins.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Left_Join.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Like.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Max.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Min.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Not.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Not_Null.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Null_Functions.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Null_Values.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Operators.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Or.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Order_By.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Parameters.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Prepared_Statements.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Primary_Key.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Right_Join.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Select.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Select_Distinct.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Select_Into.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Select_Top.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Self_Join.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Stored_Procedures.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Sum.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Syntax.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Union.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Union_All.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Unique.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Update.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Views.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Where.md create mode 100644 10_Wiki/Dev/Topic_SQL/SQL_Wildcards.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/00_INDEX.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Accordions.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Alerts.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Animate.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Badges.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Bars.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Borders.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Buttons.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Cards.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Case.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Cells.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Code.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Color_Classes.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Color_Fashion.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Color_Flat.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Color_Libraries.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Color_Material.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Color_Metro.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Color_Schemes.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Color_Themes.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Color_Win8.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Color_iOS.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Colors.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Containers.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Dark_Mode.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Defaults.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Display.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Dropdowns.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Effects.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Filters.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Flex_Items.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Flexbox.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Fonts.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Fonts_Google.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Grid.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Icons.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Images.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Input.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Intro.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Lists.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Margins.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Material.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Mobile.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Modal.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Navigation.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Notes.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Padding.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Pagination.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Panels.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Progress_Bar.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Quotes.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_RTL.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Responsive.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Round.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Rows.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Sidebar.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Slideshow.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Tables.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Tabulators.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Tags.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Text.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Tooltips.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Trends.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Validation.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Versions.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Web.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Web_CSS.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Web_HTML.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Web_JavaScript.md create mode 100644 10_Wiki/Dev/Topic_W3CSS/W3CSS_Web_Layout.md create mode 100644 10_Wiki/Dev/docs/records/Topic_Programming/README.md create mode 100644 10_Wiki/Dev/docs/records/Topic_Programming/chronicle.config.json create mode 100644 10_Wiki/Dev/docs/records/Topic_Programming/project-profile.md create mode 100644 10_Wiki/Dev/docs/records/Topic_Programming/timeline.md rename 10_Wiki/{ => Topic_Graphic}/Comfyui/-prompt endpoint.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/API Format (workflow_api.json).md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/API Format.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/API JSON (Backend Format).md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/API JSON (workflow_api.json).md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/API JSON.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Base64 Image Encoding.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Comfy CLI.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Comfy GPT.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Comfy Nodekit.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/ComfyGPT.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/ComfyUI API Integration.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/ComfyUI API.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/ComfyUI Backend Engine.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/ComfyUI Custom Scripts.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/ComfyUI Manager.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/ComfyUI Workflow Extractor.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/ComfyUI Workflow JSON Generation and Serialization.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/ComfyUI Workflow JSON.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/ComfyUI Workspace Manager.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/ComfyUI-Manager.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/ComfyUI-WorkflowGenerator.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/ComfyUI-to-Python-Extension.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Comfyui workflow json 생성 방법.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Custom Node Dependency Management.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Custom Node Registry.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Custom Nodes.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Dev mode Options.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Directed Acyclic Graph (DAG).md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Draft-07 Specification.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Executing ComfyUI Workflows as Standalone Scripts.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Execution Model Inversion.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/ExecutionCache.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Frontend Format (workflow.json).md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Frontend Format.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Frontend JSON (workflow.json).md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Generative AI Pipeline.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/JSON Schema v1.0.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Large Language Models (LLM).md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Lazy Evaluation in Graph Theory.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Litegraph Standard.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Litegraph.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Load Image (Base64).md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Metadata Extraction.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Metadata Forensics.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Metadata Stripping.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Model Hashing (SHA-256).md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Model Hashing.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Natural Language to Workflow Generation.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Node Definitions.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Node-based Visual Programming.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Nodes.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/PNG Metadata Chunks.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/RAG (Retrieval-Augmented Generation).md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Retrieval-Augmented Generation (RAG) for Nodes.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Serialization Formats (Frontend vs API).md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Serialization Formats.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Serverless Deployment.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Steganography in Generative AI.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Subgraph.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Visual Programming Environment.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Workflow API JSON (Backend Format).md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Workflow API JSON.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Workflow Extractor.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Workflow JSON (Frontend Format).md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Workflow JSON - ComfyUI.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Workflow JSON v1.0 Schema.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Workflow JSON.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Workflow.api.json (Backend Format).md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Workflow.json (Frontend Format).md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/WorkflowExecutor.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Workspace Packaging (.cpack.zip).md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/Workspace Packaging.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/_MOC.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/exiftool.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/object_info.json.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/workflow_api.json.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/위키 Add node docs for your ComfyUI custom node - ComfyUI 2026-05-20.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/위키 Annotated Examples - ComfyUI 2026-05-20.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/위키 ComfyUI MCP Server - ComfyUI 2026-05-20.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/위키 Data lists - ComfyUI 2026-05-20.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/위키 Datatypes - ComfyUI 2026-05-20.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/위키 Execution Model Inversion Guide - ComfyUI 2026-05-20.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/위키 Getting Started - ComfyUI 2026-05-20.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/위키 Hidden and Flexible inputs - ComfyUI 2026-05-20.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/위키 Images, Latents, and Masks - ComfyUI 2026-05-20.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/위키 Lazy Evaluation - ComfyUI 2026-05-20.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/위키 Lifecycle - ComfyUI 2026-05-20.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/위키 Messages - ComfyUI 2026-05-20.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/위키 Node Expansion - ComfyUI 2026-05-20.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/위키 Node replacement - ComfyUI 2026-05-20.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/위키 Routes - ComfyUI 2026-05-20.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/위키 Server Overview - ComfyUI 2026-05-20.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/위키 Subgraph blueprints - ComfyUI 2026-05-20.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/위키 V3 Migration - ComfyUI 2026-05-20.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/위키 Workflow JSON - ComfyUI 2026-05-20.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/위키 Workflow templates - ComfyUI 2026-05-20.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Comfyui/위키 Working with torch.Tensor - ComfyUI 2026-05-20.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Topic_Prompt/BOOGU-IMAGE 프롬프트 예시집.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Topic_Prompt/CFG Scale.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Topic_Prompt/ControlNet.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Topic_Prompt/Diffusion Models.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Topic_Prompt/LoRA 미세 조정.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Topic_Prompt/Multimodal AI.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Topic_Prompt/Negative Prompt.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Topic_Prompt/Prompt Engineering.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Topic_Prompt/Stable Diffusion.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Topic_Prompt/image Prompt 작성 방법.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Topic_Prompt/시네마토그래피.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Topic_Prompt/이미지 prompt 생성 예시.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Topic_Prompt/프롬프트 엔지니어링.md (100%) rename 10_Wiki/{ => Topic_Graphic}/Topic_Prompt/확산 모델(Diffusion Model).md (100%) create mode 100644 10_Wiki/Topics/.astra/company/_shared/decisions.md create mode 100644 10_Wiki/Topics/.astra/company/sessions/2026-06-16T04-23-06/_brief.md create mode 100644 10_Wiki/Topics/.astra/company/sessions/2026-06-16T04-23-06/_report.md create mode 100644 10_Wiki/Topics/.astra/company/sessions/2026-06-16T04-23-06/_resume.json create mode 100644 10_Wiki/Topics/.astra/company/sessions/2026-06-16T04-23-06/_session.json create mode 100644 10_Wiki/Topics/.astra/company/sessions/2026-06-16T04-23-06/business.md create mode 100644 10_Wiki/Topics/.astra/company/sessions/2026-06-16T04-23-06/researcher.md create mode 100644 10_Wiki/Topics/.astra/company/sessions/2026-06-16T04-39-21/_brief.md create mode 100644 10_Wiki/Topics/.astra/company/sessions/2026-06-16T04-39-21/_report.md create mode 100644 10_Wiki/Topics/.astra/company/sessions/2026-06-16T04-39-21/_resume.json create mode 100644 10_Wiki/Topics/.astra/company/sessions/2026-06-16T04-39-21/_session.json create mode 100644 10_Wiki/Topics/.astra/company/sessions/2026-06-16T04-39-21/business.md create mode 100644 10_Wiki/Topics/.astra/company/sessions/2026-06-16T04-39-21/researcher.md create mode 100644 10_Wiki/Topics/Digests/Projects.md.local-backup create mode 100644 10_Wiki/Topics/Digests/writing.md create mode 100644 10_Wiki/Topics/memory/episodes/ep_2026-06-22__volumes_data_project_antigravity_astraa.json diff --git a/10_Wiki/Dev/.DS_Store b/10_Wiki/Dev/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5323fd357ffdb09638db7fb6b8026e4819290148 GIT binary patch literal 6148 zcmeHKPfrs;6n|4HY(ZoTEdtSGV=pEU1q3xQhPq&+{s|4+U=grx+oh~*XPVtD6$wf2 z8b5#^zz^U_Z(cll_29)X;K7queX}zS6g1$)7~R**{NBuazc-!VrZZgtAbPz#0iXha zf{kOe8@rzvkMnlOB66k^kpwkLP=Hx5z{og*HDiM{4BzzYo^HA;e3WC%DYksGxMW+6f|{6R z)HiKvxdFj0TbQzX-=<~O&{>_9y?|?ofD%(;1$B65=jxToF>QKsdUs6QnV6g!AJe8T zUEbY|Daq8uYm0?Vr%Kr~t{|S6cw`3FE3pO7(K&`#c4D+o+i( zn^saYUxmJ@bhhQ37mf-k;ovowXn7Jz>fNSrbCgjl7E7h?$dCe~a071RZMOjpcmXfr z6}*A>@Cm-aHxea-tD*KP&4=ARao$c>G(2OC3fl znBA(>Ug+qNBPF}}>!>{5Y dY=L1+;|^k4VpAZ_poM<~0vWZ5 literal 0 HcmV?d00001 diff --git a/10_Wiki/Topic_Programming/Architecture/AstraAI_아키텍처_개요.md b/10_Wiki/Dev/Architecture/AstraAI_아키텍처_개요.md similarity index 100% rename from 10_Wiki/Topic_Programming/Architecture/AstraAI_아키텍처_개요.md rename to 10_Wiki/Dev/Architecture/AstraAI_아키텍처_개요.md diff --git a/10_Wiki/Topic_Programming/Architecture/VSCode_확장_구조와_생명주기.md b/10_Wiki/Dev/Architecture/VSCode_확장_구조와_생명주기.md similarity index 100% rename from 10_Wiki/Topic_Programming/Architecture/VSCode_확장_구조와_생명주기.md rename to 10_Wiki/Dev/Architecture/VSCode_확장_구조와_생명주기.md diff --git a/10_Wiki/Topic_Programming/Architecture/동시성_제어_Lock_Queue_Transaction.md b/10_Wiki/Dev/Architecture/동시성_제어_Lock_Queue_Transaction.md similarity index 100% rename from 10_Wiki/Topic_Programming/Architecture/동시성_제어_Lock_Queue_Transaction.md rename to 10_Wiki/Dev/Architecture/동시성_제어_Lock_Queue_Transaction.md diff --git a/10_Wiki/Topic_Programming/Architecture/의존성_주입과_서비스_인터페이스.md b/10_Wiki/Dev/Architecture/의존성_주입과_서비스_인터페이스.md similarity index 100% rename from 10_Wiki/Topic_Programming/Architecture/의존성_주입과_서비스_인터페이스.md rename to 10_Wiki/Dev/Architecture/의존성_주입과_서비스_인터페이스.md diff --git a/10_Wiki/Topic_Programming/Architecture/이벤트_소싱_스토어_패턴.md b/10_Wiki/Dev/Architecture/이벤트_소싱_스토어_패턴.md similarity index 100% rename from 10_Wiki/Topic_Programming/Architecture/이벤트_소싱_스토어_패턴.md rename to 10_Wiki/Dev/Architecture/이벤트_소싱_스토어_패턴.md diff --git a/10_Wiki/Topic_Programming/Conventions/코딩_컨벤션과_주석_철학.md b/10_Wiki/Dev/Conventions/코딩_컨벤션과_주석_철학.md similarity index 100% rename from 10_Wiki/Topic_Programming/Conventions/코딩_컨벤션과_주석_철학.md rename to 10_Wiki/Dev/Conventions/코딩_컨벤션과_주석_철학.md diff --git a/10_Wiki/Topic_Programming/Conventions/프롬프트_엔지니어링_패턴.md b/10_Wiki/Dev/Conventions/프롬프트_엔지니어링_패턴.md similarity index 100% rename from 10_Wiki/Topic_Programming/Conventions/프롬프트_엔지니어링_패턴.md rename to 10_Wiki/Dev/Conventions/프롬프트_엔지니어링_패턴.md diff --git a/10_Wiki/Topic_Programming/Engineering_Intelligence/ADR/ADR-0001_이벤트_소싱_채택.md b/10_Wiki/Dev/Engineering_Intelligence/ADR/ADR-0001_이벤트_소싱_채택.md similarity index 100% rename from 10_Wiki/Topic_Programming/Engineering_Intelligence/ADR/ADR-0001_이벤트_소싱_채택.md rename to 10_Wiki/Dev/Engineering_Intelligence/ADR/ADR-0001_이벤트_소싱_채택.md diff --git a/10_Wiki/Topic_Programming/Engineering_Intelligence/ADR/ADR-0002_5계층_메모리_분리.md b/10_Wiki/Dev/Engineering_Intelligence/ADR/ADR-0002_5계층_메모리_분리.md similarity index 100% rename from 10_Wiki/Topic_Programming/Engineering_Intelligence/ADR/ADR-0002_5계층_메모리_분리.md rename to 10_Wiki/Dev/Engineering_Intelligence/ADR/ADR-0002_5계층_메모리_분리.md diff --git a/10_Wiki/Topic_Programming/Engineering_Intelligence/ADR/ADR-0003_단일작성자_다중역할_멀티에이전트.md b/10_Wiki/Dev/Engineering_Intelligence/ADR/ADR-0003_단일작성자_다중역할_멀티에이전트.md similarity index 100% rename from 10_Wiki/Topic_Programming/Engineering_Intelligence/ADR/ADR-0003_단일작성자_다중역할_멀티에이전트.md rename to 10_Wiki/Dev/Engineering_Intelligence/ADR/ADR-0003_단일작성자_다중역할_멀티에이전트.md diff --git a/10_Wiki/Topic_Programming/Engineering_Intelligence/ADR/ADR-0004_순차_디스패치_채택.md b/10_Wiki/Dev/Engineering_Intelligence/ADR/ADR-0004_순차_디스패치_채택.md similarity index 100% rename from 10_Wiki/Topic_Programming/Engineering_Intelligence/ADR/ADR-0004_순차_디스패치_채택.md rename to 10_Wiki/Dev/Engineering_Intelligence/ADR/ADR-0004_순차_디스패치_채택.md diff --git a/10_Wiki/Topic_Programming/Engineering_Intelligence/ADR/ADR-0005_파일_기반_저장_채택.md b/10_Wiki/Dev/Engineering_Intelligence/ADR/ADR-0005_파일_기반_저장_채택.md similarity index 100% rename from 10_Wiki/Topic_Programming/Engineering_Intelligence/ADR/ADR-0005_파일_기반_저장_채택.md rename to 10_Wiki/Dev/Engineering_Intelligence/ADR/ADR-0005_파일_기반_저장_채택.md diff --git a/10_Wiki/Topic_Programming/Engineering_Intelligence/ADR/ADR-0006_수동_의존성주입_인터페이스_서비스.md b/10_Wiki/Dev/Engineering_Intelligence/ADR/ADR-0006_수동_의존성주입_인터페이스_서비스.md similarity index 100% rename from 10_Wiki/Topic_Programming/Engineering_Intelligence/ADR/ADR-0006_수동_의존성주입_인터페이스_서비스.md rename to 10_Wiki/Dev/Engineering_Intelligence/ADR/ADR-0006_수동_의존성주입_인터페이스_서비스.md diff --git a/10_Wiki/Topic_Programming/Engineering_Intelligence/ADR/ADR-0007_하이브리드_검색_결정론_우선.md b/10_Wiki/Dev/Engineering_Intelligence/ADR/ADR-0007_하이브리드_검색_결정론_우선.md similarity index 100% rename from 10_Wiki/Topic_Programming/Engineering_Intelligence/ADR/ADR-0007_하이브리드_검색_결정론_우선.md rename to 10_Wiki/Dev/Engineering_Intelligence/ADR/ADR-0007_하이브리드_검색_결정론_우선.md diff --git a/10_Wiki/Topic_Programming/Engineering_Intelligence/ADR/ADR-0008_로컬우선_LLM_클라우드_폴백.md b/10_Wiki/Dev/Engineering_Intelligence/ADR/ADR-0008_로컬우선_LLM_클라우드_폴백.md similarity index 100% rename from 10_Wiki/Topic_Programming/Engineering_Intelligence/ADR/ADR-0008_로컬우선_LLM_클라우드_폴백.md rename to 10_Wiki/Dev/Engineering_Intelligence/ADR/ADR-0008_로컬우선_LLM_클라우드_폴백.md diff --git a/10_Wiki/Topic_Programming/Engineering_Intelligence/ADR/ADR-0009_결정론_항상_LLM검증_조건부.md b/10_Wiki/Dev/Engineering_Intelligence/ADR/ADR-0009_결정론_항상_LLM검증_조건부.md similarity index 100% rename from 10_Wiki/Topic_Programming/Engineering_Intelligence/ADR/ADR-0009_결정론_항상_LLM검증_조건부.md rename to 10_Wiki/Dev/Engineering_Intelligence/ADR/ADR-0009_결정론_항상_LLM검증_조건부.md diff --git a/10_Wiki/Topic_Programming/Engineering_Intelligence/ADR/ADR-0010_오케스트레이터_골격_모듈추출.md b/10_Wiki/Dev/Engineering_Intelligence/ADR/ADR-0010_오케스트레이터_골격_모듈추출.md similarity index 100% rename from 10_Wiki/Topic_Programming/Engineering_Intelligence/ADR/ADR-0010_오케스트레이터_골격_모듈추출.md rename to 10_Wiki/Dev/Engineering_Intelligence/ADR/ADR-0010_오케스트레이터_골격_모듈추출.md diff --git a/10_Wiki/Topic_Programming/Engineering_Intelligence/AI_Training/AITRAIN_RAG_검색.md b/10_Wiki/Dev/Engineering_Intelligence/AI_Training/AITRAIN_RAG_검색.md similarity index 100% rename from 10_Wiki/Topic_Programming/Engineering_Intelligence/AI_Training/AITRAIN_RAG_검색.md rename to 10_Wiki/Dev/Engineering_Intelligence/AI_Training/AITRAIN_RAG_검색.md diff --git a/10_Wiki/Topic_Programming/Engineering_Intelligence/AI_Training/AITRAIN_검증_레이어.md b/10_Wiki/Dev/Engineering_Intelligence/AI_Training/AITRAIN_검증_레이어.md similarity index 100% rename from 10_Wiki/Topic_Programming/Engineering_Intelligence/AI_Training/AITRAIN_검증_레이어.md rename to 10_Wiki/Dev/Engineering_Intelligence/AI_Training/AITRAIN_검증_레이어.md diff --git a/10_Wiki/Topic_Programming/Engineering_Intelligence/AI_Training/AITRAIN_동시성_제어.md b/10_Wiki/Dev/Engineering_Intelligence/AI_Training/AITRAIN_동시성_제어.md similarity index 100% rename from 10_Wiki/Topic_Programming/Engineering_Intelligence/AI_Training/AITRAIN_동시성_제어.md rename to 10_Wiki/Dev/Engineering_Intelligence/AI_Training/AITRAIN_동시성_제어.md diff --git a/10_Wiki/Topic_Programming/Engineering_Intelligence/AI_Training/AITRAIN_메모리_시스템.md b/10_Wiki/Dev/Engineering_Intelligence/AI_Training/AITRAIN_메모리_시스템.md similarity index 100% rename from 10_Wiki/Topic_Programming/Engineering_Intelligence/AI_Training/AITRAIN_메모리_시스템.md rename to 10_Wiki/Dev/Engineering_Intelligence/AI_Training/AITRAIN_메모리_시스템.md diff --git a/10_Wiki/Topic_Programming/Engineering_Intelligence/AI_Training/AITRAIN_에이전트_오케스트레이션.md b/10_Wiki/Dev/Engineering_Intelligence/AI_Training/AITRAIN_에이전트_오케스트레이션.md similarity index 100% rename from 10_Wiki/Topic_Programming/Engineering_Intelligence/AI_Training/AITRAIN_에이전트_오케스트레이션.md rename to 10_Wiki/Dev/Engineering_Intelligence/AI_Training/AITRAIN_에이전트_오케스트레이션.md diff --git a/10_Wiki/Topic_Programming/Engineering_Intelligence/AI_Training/AITRAIN_이벤트소싱_저장.md b/10_Wiki/Dev/Engineering_Intelligence/AI_Training/AITRAIN_이벤트소싱_저장.md similarity index 100% rename from 10_Wiki/Topic_Programming/Engineering_Intelligence/AI_Training/AITRAIN_이벤트소싱_저장.md rename to 10_Wiki/Dev/Engineering_Intelligence/AI_Training/AITRAIN_이벤트소싱_저장.md diff --git a/10_Wiki/Topic_Programming/Engineering_Intelligence/AI_Training/AITRAIN_프로바이더_추상화.md b/10_Wiki/Dev/Engineering_Intelligence/AI_Training/AITRAIN_프로바이더_추상화.md similarity index 100% rename from 10_Wiki/Topic_Programming/Engineering_Intelligence/AI_Training/AITRAIN_프로바이더_추상화.md rename to 10_Wiki/Dev/Engineering_Intelligence/AI_Training/AITRAIN_프로바이더_추상화.md diff --git a/10_Wiki/Topic_Programming/Engineering_Intelligence/교훈_라이브러리_Lessons_Learned.md b/10_Wiki/Dev/Engineering_Intelligence/교훈_라이브러리_Lessons_Learned.md similarity index 100% rename from 10_Wiki/Topic_Programming/Engineering_Intelligence/교훈_라이브러리_Lessons_Learned.md rename to 10_Wiki/Dev/Engineering_Intelligence/교훈_라이브러리_Lessons_Learned.md diff --git a/10_Wiki/Topic_Programming/Engineering_Intelligence/디버깅_플레이북.md b/10_Wiki/Dev/Engineering_Intelligence/디버깅_플레이북.md similarity index 100% rename from 10_Wiki/Topic_Programming/Engineering_Intelligence/디버깅_플레이북.md rename to 10_Wiki/Dev/Engineering_Intelligence/디버깅_플레이북.md diff --git a/10_Wiki/Topic_Programming/Engineering_Intelligence/리팩토링_플레이북.md b/10_Wiki/Dev/Engineering_Intelligence/리팩토링_플레이북.md similarity index 100% rename from 10_Wiki/Topic_Programming/Engineering_Intelligence/리팩토링_플레이북.md rename to 10_Wiki/Dev/Engineering_Intelligence/리팩토링_플레이북.md diff --git a/10_Wiki/Topic_Programming/Engineering_Intelligence/아키텍처_휴리스틱.md b/10_Wiki/Dev/Engineering_Intelligence/아키텍처_휴리스틱.md similarity index 100% rename from 10_Wiki/Topic_Programming/Engineering_Intelligence/아키텍처_휴리스틱.md rename to 10_Wiki/Dev/Engineering_Intelligence/아키텍처_휴리스틱.md diff --git a/10_Wiki/Topic_Programming/Engineering_Intelligence/안티패턴_카탈로그.md b/10_Wiki/Dev/Engineering_Intelligence/안티패턴_카탈로그.md similarity index 100% rename from 10_Wiki/Topic_Programming/Engineering_Intelligence/안티패턴_카탈로그.md rename to 10_Wiki/Dev/Engineering_Intelligence/안티패턴_카탈로그.md diff --git a/10_Wiki/Topic_Programming/Engineering_Intelligence/엔지니어링_트레이드오프_분석.md b/10_Wiki/Dev/Engineering_Intelligence/엔지니어링_트레이드오프_분석.md similarity index 100% rename from 10_Wiki/Topic_Programming/Engineering_Intelligence/엔지니어링_트레이드오프_분석.md rename to 10_Wiki/Dev/Engineering_Intelligence/엔지니어링_트레이드오프_분석.md diff --git a/10_Wiki/Topic_Programming/Failure_Library/소프트웨어_실패_라이브러리.md b/10_Wiki/Dev/Failure_Library/소프트웨어_실패_라이브러리.md similarity index 100% rename from 10_Wiki/Topic_Programming/Failure_Library/소프트웨어_실패_라이브러리.md rename to 10_Wiki/Dev/Failure_Library/소프트웨어_실패_라이브러리.md diff --git a/10_Wiki/Topic_Programming/Generalized_Principles/프로젝트_독립_설계_원칙.md b/10_Wiki/Dev/Generalized_Principles/프로젝트_독립_설계_원칙.md similarity index 100% rename from 10_Wiki/Topic_Programming/Generalized_Principles/프로젝트_독립_설계_원칙.md rename to 10_Wiki/Dev/Generalized_Principles/프로젝트_독립_설계_원칙.md diff --git a/10_Wiki/Topic_Programming/Language/TypeScript_고급_타입.md b/10_Wiki/Dev/Language/TypeScript_고급_타입.md similarity index 100% rename from 10_Wiki/Topic_Programming/Language/TypeScript_고급_타입.md rename to 10_Wiki/Dev/Language/TypeScript_고급_타입.md diff --git a/10_Wiki/Topic_Programming/Language/TypeScript_기초와_타입_시스템.md b/10_Wiki/Dev/Language/TypeScript_기초와_타입_시스템.md similarity index 100% rename from 10_Wiki/Topic_Programming/Language/TypeScript_기초와_타입_시스템.md rename to 10_Wiki/Dev/Language/TypeScript_기초와_타입_시스템.md diff --git a/10_Wiki/Topic_Programming/Language/모듈_시스템과_프로젝트_구성.md b/10_Wiki/Dev/Language/모듈_시스템과_프로젝트_구성.md similarity index 100% rename from 10_Wiki/Topic_Programming/Language/모듈_시스템과_프로젝트_구성.md rename to 10_Wiki/Dev/Language/모듈_시스템과_프로젝트_구성.md diff --git a/10_Wiki/Topic_Programming/Language/비동기_프로그래밍_Promise_async_await.md b/10_Wiki/Dev/Language/비동기_프로그래밍_Promise_async_await.md similarity index 100% rename from 10_Wiki/Topic_Programming/Language/비동기_프로그래밍_Promise_async_await.md rename to 10_Wiki/Dev/Language/비동기_프로그래밍_Promise_async_await.md diff --git a/10_Wiki/Topic_Programming/Language/에러_처리와_커스텀_에러.md b/10_Wiki/Dev/Language/에러_처리와_커스텀_에러.md similarity index 100% rename from 10_Wiki/Topic_Programming/Language/에러_처리와_커스텀_에러.md rename to 10_Wiki/Dev/Language/에러_처리와_커스텀_에러.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/00_패턴_카탈로그_인덱스.md b/10_Wiki/Dev/Pattern_Catalog/00_패턴_카탈로그_인덱스.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/00_패턴_카탈로그_인덱스.md rename to 10_Wiki/Dev/Pattern_Catalog/00_패턴_카탈로그_인덱스.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/AI/Agent_Orchestration_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/AI/Agent_Orchestration_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/AI/Agent_Orchestration_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/AI/Agent_Orchestration_Pattern.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/AI/Critic_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/AI/Critic_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/AI/Critic_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/AI/Critic_Pattern.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/AI/Memory_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/AI/Memory_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/AI/Memory_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/AI/Memory_Pattern.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/AI/RAG_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/AI/RAG_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/AI/RAG_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/AI/RAG_Pattern.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/AI/Reflection_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/AI/Reflection_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/AI/Reflection_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/AI/Reflection_Pattern.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/AI/Tool_Calling_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/AI/Tool_Calling_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/AI/Tool_Calling_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/AI/Tool_Calling_Pattern.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/Cross_Cutting/Architecture_Separation_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/Cross_Cutting/Architecture_Separation_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/Cross_Cutting/Architecture_Separation_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/Cross_Cutting/Architecture_Separation_Pattern.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/Cross_Cutting/Async_Concurrency_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/Cross_Cutting/Async_Concurrency_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/Cross_Cutting/Async_Concurrency_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/Cross_Cutting/Async_Concurrency_Pattern.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/Cross_Cutting/Caching_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/Cross_Cutting/Caching_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/Cross_Cutting/Caching_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/Cross_Cutting/Caching_Pattern.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/Cross_Cutting/Data_Flow_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/Cross_Cutting/Data_Flow_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/Cross_Cutting/Data_Flow_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/Cross_Cutting/Data_Flow_Pattern.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/Cross_Cutting/Error_Handling_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/Cross_Cutting/Error_Handling_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/Cross_Cutting/Error_Handling_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/Cross_Cutting/Error_Handling_Pattern.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/Cross_Cutting/State_Management_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/Cross_Cutting/State_Management_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/Cross_Cutting/State_Management_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/Cross_Cutting/State_Management_Pattern.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/Desktop/Background_Worker_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/Desktop/Background_Worker_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/Desktop/Background_Worker_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/Desktop/Background_Worker_Pattern.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/Desktop/Command_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/Desktop/Command_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/Desktop/Command_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/Desktop/Command_Pattern.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/Desktop/Event_Bus_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/Desktop/Event_Bus_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/Desktop/Event_Bus_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/Desktop/Event_Bus_Pattern.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/Desktop/IPC_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/Desktop/IPC_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/Desktop/IPC_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/Desktop/IPC_Pattern.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/Desktop/Plugin_Architecture_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/Desktop/Plugin_Architecture_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/Desktop/Plugin_Architecture_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/Desktop/Plugin_Architecture_Pattern.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/Mobile/Background_Task_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/Mobile/Background_Task_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/Mobile/Background_Task_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/Mobile/Background_Task_Pattern.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/Mobile/Local_Storage_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/Mobile/Local_Storage_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/Mobile/Local_Storage_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/Mobile/Local_Storage_Pattern.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/Mobile/Navigation_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/Mobile/Navigation_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/Mobile/Navigation_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/Mobile/Navigation_Pattern.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/Mobile/Offline_Sync_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/Mobile/Offline_Sync_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/Mobile/Offline_Sync_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/Mobile/Offline_Sync_Pattern.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/Mobile/Push_Notification_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/Mobile/Push_Notification_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/Mobile/Push_Notification_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/Mobile/Push_Notification_Pattern.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/Web/API_Client_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/Web/API_Client_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/Web/API_Client_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/Web/API_Client_Pattern.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/Web/Infinite_Scroll_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/Web/Infinite_Scroll_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/Web/Infinite_Scroll_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/Web/Infinite_Scroll_Pattern.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/Web/JWT_Authentication_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/Web/JWT_Authentication_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/Web/JWT_Authentication_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/Web/JWT_Authentication_Pattern.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/Web/React_State_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/Web/React_State_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/Web/React_State_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/Web/React_State_Pattern.md diff --git a/10_Wiki/Topic_Programming/Pattern_Catalog/Web/Repository_Pattern.md b/10_Wiki/Dev/Pattern_Catalog/Web/Repository_Pattern.md similarity index 100% rename from 10_Wiki/Topic_Programming/Pattern_Catalog/Web/Repository_Pattern.md rename to 10_Wiki/Dev/Pattern_Catalog/Web/Repository_Pattern.md diff --git a/10_Wiki/Topic_Programming/Platform_Guides/00_플랫폼_개발_가이드_인덱스.md b/10_Wiki/Dev/Platform_Guides/00_플랫폼_개발_가이드_인덱스.md similarity index 100% rename from 10_Wiki/Topic_Programming/Platform_Guides/00_플랫폼_개발_가이드_인덱스.md rename to 10_Wiki/Dev/Platform_Guides/00_플랫폼_개발_가이드_인덱스.md diff --git a/10_Wiki/Topic_Programming/Platform_Guides/AI_에이전트_개발_가이드.md b/10_Wiki/Dev/Platform_Guides/AI_에이전트_개발_가이드.md similarity index 100% rename from 10_Wiki/Topic_Programming/Platform_Guides/AI_에이전트_개발_가이드.md rename to 10_Wiki/Dev/Platform_Guides/AI_에이전트_개발_가이드.md diff --git a/10_Wiki/Topic_Programming/Platform_Guides/데스크탑_앱_개발_가이드.md b/10_Wiki/Dev/Platform_Guides/데스크탑_앱_개발_가이드.md similarity index 100% rename from 10_Wiki/Topic_Programming/Platform_Guides/데스크탑_앱_개발_가이드.md rename to 10_Wiki/Dev/Platform_Guides/데스크탑_앱_개발_가이드.md diff --git a/10_Wiki/Topic_Programming/Platform_Guides/모바일_개발_가이드.md b/10_Wiki/Dev/Platform_Guides/모바일_개발_가이드.md similarity index 100% rename from 10_Wiki/Topic_Programming/Platform_Guides/모바일_개발_가이드.md rename to 10_Wiki/Dev/Platform_Guides/모바일_개발_가이드.md diff --git a/10_Wiki/Topic_Programming/Platform_Guides/백엔드_API_개발_가이드.md b/10_Wiki/Dev/Platform_Guides/백엔드_API_개발_가이드.md similarity index 100% rename from 10_Wiki/Topic_Programming/Platform_Guides/백엔드_API_개발_가이드.md rename to 10_Wiki/Dev/Platform_Guides/백엔드_API_개발_가이드.md diff --git a/10_Wiki/Topic_Programming/Platform_Guides/웹_개발_가이드.md b/10_Wiki/Dev/Platform_Guides/웹_개발_가이드.md similarity index 100% rename from 10_Wiki/Topic_Programming/Platform_Guides/웹_개발_가이드.md rename to 10_Wiki/Dev/Platform_Guides/웹_개발_가이드.md diff --git a/10_Wiki/Topic_Programming/Subsystems/5계층_메모리_시스템.md b/10_Wiki/Dev/Subsystems/5계층_메모리_시스템.md similarity index 100% rename from 10_Wiki/Topic_Programming/Subsystems/5계층_메모리_시스템.md rename to 10_Wiki/Dev/Subsystems/5계층_메모리_시스템.md diff --git a/10_Wiki/Topic_Programming/Subsystems/Agent_오케스트레이터_분해.md b/10_Wiki/Dev/Subsystems/Agent_오케스트레이터_분해.md similarity index 100% rename from 10_Wiki/Topic_Programming/Subsystems/Agent_오케스트레이터_분해.md rename to 10_Wiki/Dev/Subsystems/Agent_오케스트레이터_분해.md diff --git a/10_Wiki/Topic_Programming/Subsystems/Intelligence_검증_레이어.md b/10_Wiki/Dev/Subsystems/Intelligence_검증_레이어.md similarity index 100% rename from 10_Wiki/Topic_Programming/Subsystems/Intelligence_검증_레이어.md rename to 10_Wiki/Dev/Subsystems/Intelligence_검증_레이어.md diff --git a/10_Wiki/Topic_Programming/Subsystems/LLM_프로바이더_추상화.md b/10_Wiki/Dev/Subsystems/LLM_프로바이더_추상화.md similarity index 100% rename from 10_Wiki/Topic_Programming/Subsystems/LLM_프로바이더_추상화.md rename to 10_Wiki/Dev/Subsystems/LLM_프로바이더_추상화.md diff --git a/10_Wiki/Topic_Programming/Subsystems/RAG_검색_파이프라인.md b/10_Wiki/Dev/Subsystems/RAG_검색_파이프라인.md similarity index 100% rename from 10_Wiki/Topic_Programming/Subsystems/RAG_검색_파이프라인.md rename to 10_Wiki/Dev/Subsystems/RAG_검색_파이프라인.md diff --git a/10_Wiki/Topic_Programming/Subsystems/TFIDF_이중언어_스코어링.md b/10_Wiki/Dev/Subsystems/TFIDF_이중언어_스코어링.md similarity index 100% rename from 10_Wiki/Topic_Programming/Subsystems/TFIDF_이중언어_스코어링.md rename to 10_Wiki/Dev/Subsystems/TFIDF_이중언어_스코어링.md diff --git a/10_Wiki/Dev/Topic_C/00_INDEX.md b/10_Wiki/Dev/Topic_C/00_INDEX.md new file mode 100644 index 00000000..4e9b384f --- /dev/null +++ b/10_Wiki/Dev/Topic_C/00_INDEX.md @@ -0,0 +1,191 @@ +--- +id: c-tutorial-index +title: "C Tutorial" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["C Tutorial", "C MOC", "Topic_C index", "C 언어 목차"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.90 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "moc", "index"] +raw_sources: ["https://www.w3schools.com/c/index.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Tutorial]] + +## 🎯 한 줄 통찰 (One-line insight) +Map of Content (MOC) for the W3Schools C Tutorial — the root that links every core C knowledge page in this topic folder. [S1] + +## 🧠 핵심 개념 (Core concepts) +- This folder (`Topic_C`) wikifies the C programming language tutorial, one knowledge page per document, in P-Reinforce v3.1 format — same convention as `Topic_SQL` / `Topic_Python` / `Topic_Java` / `Topic_PHP` / `Topic_W3CSS` / `Topic_HTML` / `Topic_CSS` / `Topic_JavaScript`. [S1] +- **Scope**: tutorial + "Learning by examples" pages only. **Excluded**: `c_challenges_*` (18 code-challenge pages), `c_compiler`/`c_examples`/`c_exercises`/`c_practice`/`c_projects`/`c_quiz`/`c_exam`/`c_interview_questions`/`c_study_plan`/`c_syllabus`/`c_real_life_examples` (meta/index pages), `c_ref_*` (7 reference-dump pages: ctype, keywords, math, reference, stdio, stdlib, string, time). [S1] +- **97 of 97 planned docs complete — C category done.** +- Every page roots its Knowledge Graph back to this `[[C Tutorial]]` node. + +## 📖 세부 내용 (Details) + +### Basics +- [[C Intro]] ✅ +- [[C Get Started]] ✅ +- [[C Syntax]] ✅ +- [[C Statements]] ✅ +- [[C Output]] ✅ +- [[C Comments]] ✅ +- [[C Organize Code]] ✅ + +### Variables +- [[C Variables]] ✅ +- [[C Variables Names]] ✅ +- [[C Variables Change]] ✅ +- [[C Variables Multiple]] ✅ +- [[C Variables Format]] ✅ +- [[C Variables RealLife]] ✅ + +### Data Types +- [[C Data Types]] ✅ +- [[C Data Types Numbers]] ✅ +- [[C Data Types Characters]] ✅ +- [[C Data Types Dec]] ✅ +- [[C Data Types Extended]] ✅ +- [[C Data Types Sizeof]] ✅ +- [[C Data Types RealLife]] ✅ + +### Constants & Storage +- [[C Constants]] ✅ +- [[C Storage Classes]] ✅ +- [[C Fixed Width Ints]] ✅ + +### Operators +- [[C Operators]] ✅ +- [[C Operators Arithmetic]] ✅ +- [[C Operators Assignment]] ✅ +- [[C Operators Comparison]] ✅ +- [[C Operators Logical]] ✅ +- [[C Bitwise Operators]] ✅ +- [[C Operators Precedence]] ✅ + +### Strings +- [[C Strings]] ✅ +- [[C Strings Esc]] ✅ +- [[C Strings Functions]] ✅ + +### Math & Random +- [[C Math]] ✅ +- [[C Random Numbers]] ✅ + +### Booleans +- [[C Booleans]] ✅ +- [[C Booleans RealLife]] ✅ + +### Conditions +- [[C Conditions]] ✅ +- [[C Conditions Else]] ✅ +- [[C Conditions ElseIf]] ✅ +- [[C Conditions Short Hand]] ✅ +- [[C Conditions Logical]] ✅ +- [[C Conditions Nested]] ✅ +- [[C Conditions RealLife]] ✅ + +### Switch +- [[C Switch]] ✅ + +### Loops +- [[C While Loop]] ✅ +- [[C While Loop RealLife]] ✅ +- [[C Do While Loop]] ✅ +- [[C For Loop]] ✅ +- [[C For Loop Nested]] ✅ +- [[C For Loop RealLife]] ✅ +- [[C Break Continue]] ✅ + +### Arrays +- [[C Arrays]] ✅ +- [[C Arrays Size]] ✅ +- [[C Arrays Loop]] ✅ +- [[C Arrays Multi]] ✅ +- [[C Arrays RealLife]] ✅ + +### Structs, Enums & Unions +- [[C Structs]] ✅ +- [[C Structs Nested]] ✅ +- [[C Structs Padding]] ✅ +- [[C Structs Pointers]] ✅ +- [[C Enums]] ✅ +- [[C Unions]] ✅ +- [[C Typedef]] ✅ + +### Pointers & Memory +- [[C Memory Address]] ✅ +- [[C Memory Access]] ✅ +- [[C Pointers]] ✅ +- [[C Pointers Arithmetic]] ✅ +- [[C Pointers Arrays]] ✅ +- [[C Pointer To Pointer]] ✅ +- [[C Memory Management]] ✅ +- [[C Memory Allocate]] ✅ +- [[C Memory Deallocate]] ✅ +- [[C Memory Reallocate]] ✅ +- [[C Memory Struct]] ✅ +- [[C Memory RealLife]] ✅ + +### Functions +- [[C Functions]] ✅ +- [[C Functions Decl]] ✅ +- [[C Functions Parameters]] ✅ +- [[C Functions Recursion]] ✅ +- [[C Functions Pointers]] ✅ +- [[C Functions Callback]] ✅ +- [[C Functions Inline]] ✅ + +### Scope +- [[C Scope]] ✅ + +### User Input & Date +- [[C User Input]] ✅ +- [[C Date Time]] ✅ + +### Errors & Debugging +- [[C Errors]] ✅ +- [[C Error Handling]] ✅ +- [[C Input Validation]] ✅ +- [[C Debugging]] ✅ + +### Files +- [[C Files]] ✅ +- [[C Files Read]] ✅ +- [[C Files Write]] ✅ + +### Type Conversion & Macros +- [[C Type Conversion]] ✅ +- [[C Macros]] ✅ +- [[C Null]] ✅ +- [[C Newline]] ✅ + +## 🛠️ 적용 사례 (Applied in summary) +97 knowledge documents generated in this batch run, spanning Basics through Type Conversion & Macros. + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference) +- **신뢰 점수:** 0.90 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[10_Wiki]] +- **관련 개념:** [[C Intro]], [[PHP Tutorial]], [[Java Tutorial]], [[W3.CSS Tutorial]] +- **참조 맥락:** SQL/Python/Java/PHP/W3.CSS에 이어 W3Schools 지식화 시리즈의 다음 카테고리 — 시스템 프로그래밍 언어 계열의 첫 항목. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Tutorial — https://www.w3schools.com/c/index.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Created C Tutorial MOC with scope decisions and full planned page list (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Arrays.md b/10_Wiki/Dev/Topic_C/C_Arrays.md new file mode 100644 index 00000000..5d737eb8 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Arrays.md @@ -0,0 +1,72 @@ +--- +id: c-arrays +title: "C Arrays" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["array declaration", "fixed-size array", "C 배열"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "arrays"] +raw_sources: ["https://www.w3schools.com/c/c_arrays.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Arrays]] + +## 🎯 한 줄 통찰 (One-line insight) +Mixing types in an array literal (`int myArray[] = {25, 50, 75, 3.15, 5.99};`) doesn't always fail loudly — the source shows the float values `3.15`/`5.99` get silently TRUNCATED to `3`/`5` (since the array is typed `int`), and only "in some cases" does it produce an error, meaning the type-mismatch guard here is a silent-data-loss trap more often than a hard compile failure. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Array literal creation** — `type name[] = {val1, val2, ...};` creates and initializes an array in one step. [S1] +- **Zero-based indexing** — `[0]` is the first element, `[1]` the second, and so on. [S1] +- **Mutable elements** — any element can be reassigned by index after creation (`myNumbers[0] = 33;`). [S1] +- **Size-first declaration** — `int myNumbers[4];` reserves space for 4 elements to be filled in later; the SIZE CANNOT CHANGE after creation. [S1] +- **Same-type requirement** — all elements must share one data type; mismatched types get silently truncated/converted, not cleanly rejected. [S1] + +## 📖 세부 내용 (Details) +- Literal array creation and access: `int myNumbers[] = {25, 50, 75, 100}; printf("%d", myNumbers[0]); // 25`. [S1] +- Modifying an element by index: `myNumbers[0] = 33; // Now outputs 33 instead of 25`. [S1] +- Size-first, fill-later declaration: `int myNumbers[4]; myNumbers[0] = 25; myNumbers[1] = 50; myNumbers[2] = 75; myNumbers[3] = 100;`. [S1] +- Type-mismatch truncation trap: `int myArray[] = {25, 50, 75, 3.15, 5.99};` — 3.15 and 5.99 silently become 3 and 5. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **타입이 섞이면 조용히 잘림**: int 배열에 float 값을 넣으면 항상 에러가 나는 게 아니라 대부분 소수점이 잘려나가는 형태로 조용히 처리되며, 일부 경우에만 에러가 발생한다는 점이 명시적으로 경고됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 크기를 먼저 선언하고 나중에 요소를 채우는 방식이 데이터가 순차적으로 들어올 때(예: 사용자 입력 반복) 실전에서 활용된다. [S1] + +## 💻 코드 패턴 (Code patterns) +Declaring an array's size first, then filling in elements later (C): +```c +int myNumbers[4]; +myNumbers[0] = 25; +myNumbers[1] = 50; +myNumbers[2] = 75; +myNumbers[3] = 100; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Break Continue]], [[C Arrays Size]] +- **참조 맥락:** 배열 섹션 첫 챕터 — 배열 크기(Arrays Size) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Arrays — https://www.w3schools.com/c/c_arrays.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Arrays" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Arrays_Loop.md b/10_Wiki/Dev/Topic_C/C_Arrays_Loop.md new file mode 100644 index 00000000..3f699347 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Arrays_Loop.md @@ -0,0 +1,69 @@ +--- +id: c-arrays-loop +title: "C Array Loop" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["loop through array", "adaptive loop length", "C 배열 반복문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "arrays", "loops"] +raw_sources: ["https://www.w3schools.com/c/c_arrays_loop.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Array Loop]] + +## 🎯 한 줄 통찰 (One-line insight) +A hardcoded loop bound (`i < 4`) silently breaks the moment the array's contents change size — the source explicitly flags this as "not ideal, since it will only work for arrays of a specified size" — while replacing it with `sizeof(arr)/sizeof(arr[0])` makes the SAME loop automatically correct for an array of ANY length, turning a brittle magic number into a self-maintaining computation. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Hardcoded loop bound (fragile)** — `for (i = 0; i < 4; i++)` only works correctly for exactly a 4-element array; adding/removing elements breaks it silently. [S1] +- **`sizeof` formula-driven bound (robust)** — `int length = sizeof(arr) / sizeof(arr[0]); for (i = 0; i < length; i++)` automatically adapts to the array's actual current size. [S1] +- **Standing rule** — the chapter's own summary: "Always use the sizeof formula when looping through arrays." [S1] + +## 📖 세부 내용 (Details) +- Fragile hardcoded-bound loop: `int myNumbers[] = {25, 50, 75, 100}; int i; for (i = 0; i < 4; i++) { printf("%d\n", myNumbers[i]); }`. [S1] +- Robust size-adaptive loop: `int myNumbers[] = {25, 50, 75, 100}; int length = sizeof(myNumbers) / sizeof(myNumbers[0]); int i; for (i = 0; i < length; i++) { printf("%d\n", myNumbers[i]); }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **하드코딩된 루프 경계의 취약성**: 배열 원소 개수가 바뀌면 i < 4 같은 고정된 조건이 더 이상 맞지 않게 된다는 점이 "이상적이지 않다"고 명시적으로 지적되며, sizeof 공식을 항상 쓰라는 규칙으로 이어짐. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — sizeof 기반 반복문이 이후 Arrays RealLife 챕터의 평균 계산·최솟값 찾기 예제에서 그대로 재사용된다. [S1] + +## 💻 코드 패턴 (Code patterns) +A loop that automatically adapts to any array size using the sizeof formula (C): +```c +int myNumbers[] = {25, 50, 75, 100}; +int length = sizeof(myNumbers) / sizeof(myNumbers[0]); +int i; +for (i = 0; i < length; i++) { + printf("%d\n", myNumbers[i]); +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Arrays Size]], [[C Arrays Multi]], [[C Arrays RealLife]] +- **참조 맥락:** 배열 반복문 — 다차원 배열(Arrays Multi) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Array Loop — https://www.w3schools.com/c/c_arrays_loop.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Array Loop" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Arrays_Multi.md b/10_Wiki/Dev/Topic_C/C_Arrays_Multi.md new file mode 100644 index 00000000..7101b876 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Arrays_Multi.md @@ -0,0 +1,74 @@ +--- +id: c-arrays-multi +title: "C Multidimensional Arrays" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["2D array", "matrix", "3D array", "C 다차원 배열"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "arrays", "multidimensional"] +raw_sources: ["https://www.w3schools.com/c/c_arrays_multi.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Multidimensional Arrays]] + +## 🎯 한 줄 통찰 (One-line insight) +A multidimensional array is defined as literally "an array of arrays," and this compounds directly into the looping requirement: an N-dimensional array needs exactly N nested loops to visit every element — a 2D array needs 2 nested loops (as shown), a 3D array would need 3 — meaning the loop-nesting depth isn't a stylistic choice but a direct structural consequence of how many dimensions the array has. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Multidimensional array** — "basically an array of arrays"; C supports any number of dimensions, with 2D being the most common. [S1] +- **2D array (`type name[rows][cols]`)** — a matrix/table; first bracket = row count, second bracket = column count. [S1] +- **Dual-index access** — `matrix[row][col]` addresses a specific cell; both indices are zero-based. [S1] +- **One nested loop per dimension** — looping a 2D array fully requires 2 nested loops (outer for rows, inner for columns); a 3D array would require 3 nested loops. [S1] +- **3D arrays (`type name[blocks][rows][cols]`)** — represent structures like multiple tables or game levels, each block itself being a 2D array. [S1] + +## 📖 세부 내용 (Details) +- Creating and accessing a 2D array: `int matrix[2][3] = { {1, 4, 2}, {3, 6, 8} }; printf("%d", matrix[0][2]); // Outputs 2`. [S1] +- Modifying a specific cell: `matrix[0][0] = 9; // Now outputs 9 instead of 1`. [S1] +- Fully looping a 2D array with nested loops: `for (i = 0; i < 2; i++) { for (j = 0; j < 3; j++) { printf("%d\n", matrix[i][j]); } }`. [S1] +- Declaring a 3D array (2 blocks × 4 rows × 3 columns): `int example[2][4][3];`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **차원 수와 중첩 루프 개수의 직접 대응**: 2차원 배열은 중첩 루프 2개, 3차원 배열은 중첩 루프 3개가 필요하다는 구조적 대응 관계가 명시적으로 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +2D 배열은 점수표, 게임판, 스프레드시트에, 3D 배열은 여러 테이블의 집합이나 게임의 여러 레벨 같은 복잡한 구조 표현에 적합하다고 원문에서 직접 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Fully iterating a 2D array requires one nested loop per dimension (C): +```c +int matrix[2][3] = { {1, 4, 2}, {3, 6, 8} }; +int i, j; +for (i = 0; i < 2; i++) { + for (j = 0; j < 3; j++) { + printf("%d\n", matrix[i][j]); + } +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Arrays Loop]], [[C For Loop Nested]], [[C Arrays RealLife]] +- **참조 맥락:** 다차원 배열 — 배열 실전 예제(Arrays RealLife) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Multidimensional Arrays — https://www.w3schools.com/c/c_arrays_multi.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Multidimensional Arrays" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Arrays_RealLife.md b/10_Wiki/Dev/Topic_C/C_Arrays_RealLife.md new file mode 100644 index 00000000..63b3e6f5 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Arrays_RealLife.md @@ -0,0 +1,73 @@ +--- +id: c-arrays-reallife +title: "C Arrays - Real-Life Examples" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["average calculation", "find minimum", "C 배열 실전 예제"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "arrays", "real-life-example"] +raw_sources: ["https://www.w3schools.com/c/c_arrays_reallife.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Arrays - Real-Life Examples]] + +## 🎯 한 줄 통찰 (One-line insight) +The "find lowest age" algorithm seeds its tracking variable with the array's OWN first element (`int lowestAge = ages[0];`) rather than an arbitrary sentinel like 0 or -1 — a deliberate choice that avoids a subtle bug: seeding with 0 would falsely "win" against any array of all-positive ages that happens to not contain a lower value, since every real comparison would need explicit special-casing otherwise. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Average via accumulate-then-divide** — sum every element in a loop, then divide by the `sizeof`-derived length; requires a `float`/`double` result variable to avoid integer-division truncation. [S1] +- **Find-minimum via self-seeded comparison** — initialize the tracking variable with the array's first element, then compare/update while looping through the REST. [S1] +- **Skip-and-stop pattern reused** — the same `continue`-for-negatives, `break`-at-zero pattern from the Break/Continue chapter is reused here verbatim on an array. [S1] + +## 📖 세부 내용 (Details) +- Average calculation: `int ages[] = {20, 22, 18, 35, 48, 26, 87, 70}; float avg, sum = 0; int length = sizeof(ages) / sizeof(ages[0]); for (i = 0; i < length; i++) { sum += ages[i]; } avg = sum / length; printf("The average age is: %.2f", avg);`. [S1] +- Find-minimum via self-seeding: `int lowestAge = ages[0]; for (i = 0; i < length; i++) { if (lowestAge > ages[i]) { lowestAge = ages[i]; } }`. [S1] +- Skip negatives, stop at zero: `int myNumbers[] = {3, -1, 7, 0, 9}; for (i = 0; i < length; i++) { if (myNumbers[i] < 0) { continue; } if (myNumbers[i] == 0) { break; } printf("%d\n", myNumbers[i]); }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **최솟값 탐색 시 0이 아닌 첫 원소로 초기화하는 이유**: lowestAge를 0으로 초기화하면 모든 나이가 양수인 배열에서 항상 0이 "이겨버리는" 오류가 생기므로, 배열의 첫 원소로 초기화하는 것이 안전하다는 점이 예제 설계에서 암묵적으로 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +나이 목록의 평균과 최솟값을 계산하는 두 예제가 원문에서 직접 실전 활용 사례로 제시되며, sizeof 기반 length 계산과 배열 순회 패턴을 실제 통계 계산에 적용하는 방법을 보여준다. [S1] + +## 💻 코드 패턴 (Code patterns) +Finding the minimum value by seeding the tracker with the array's own first element (C): +```c +int ages[] = {20, 22, 18, 35, 48, 26, 87, 70}; +int length = sizeof(ages) / sizeof(ages[0]); +int lowestAge = ages[0]; +int i; +for (i = 0; i < length; i++) { + if (lowestAge > ages[i]) { + lowestAge = ages[i]; + } +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Arrays Multi]], [[C Break Continue]], [[C Structs]] +- **참조 맥락:** 배열 섹션 마지막 — 구조체(Structs) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Arrays - Real-Life Examples — https://www.w3schools.com/c/c_arrays_reallife.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Arrays - Real-Life Examples" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Arrays_Size.md b/10_Wiki/Dev/Topic_C/C_Arrays_Size.md new file mode 100644 index 00000000..c21bfbbc --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Arrays_Size.md @@ -0,0 +1,67 @@ +--- +id: c-arrays-size +title: "C Array Size" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["sizeof array", "array length formula", "C 배열 크기"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "arrays", "sizeof"] +raw_sources: ["https://www.w3schools.com/c/c_arrays_size.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Array Size]] + +## 🎯 한 줄 통찰 (One-line insight) +`sizeof(array)` on a 5-element `int` array returns `20`, NOT `5` — a result that looks wrong until you remember `sizeof` reports total BYTES, not element count (4 bytes/int × 5 elements = 20) — meaning getting the actual element count requires an additional division step (`sizeof(arr) / sizeof(arr[0])`), a two-part formula that generalizes to arrays of ANY type since it divides the array's total size by one element's size rather than assuming a fixed per-element byte count. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`sizeof(array)`** — returns the array's TOTAL memory footprint in bytes, not its element count. [S1] +- **Element-count formula** — `sizeof(array) / sizeof(array[0])` divides total bytes by one element's byte size, yielding the actual number of elements. [S1] +- **Type-agnostic formula** — works identically for `int`, `double`, or any other array element type, since it never hardcodes a byte size. [S1] + +## 📖 세부 내용 (Details) +- Raw byte-size result (surprising to beginners): `int myNumbers[] = {10, 25, 50, 75, 100}; printf("%zu", sizeof(myNumbers)); // Prints 20 (not 5)`. [S1] +- Correct element-count formula: `int length = sizeof(myNumbers) / sizeof(myNumbers[0]); printf("%d", length); // Prints 5`. [S1] +- Same formula applied to a `double` array: `double myValues[] = {1.1, 2.2, 3.3}; int length = sizeof(myValues) / sizeof(myValues[0]); printf("%d", length); // Prints 3`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **sizeof(배열)은 요소 개수가 아니라 바이트 수를 반환**: 5개짜리 int 배열의 sizeof가 5가 아니라 20(4바이트×5)이라는 점이 초심자에게 혼동을 줄 수 있는 부분으로 명시적으로 설명됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 이 챕터에서 배운 sizeof(arr)/sizeof(arr[0]) 공식이 다음 챕터(Array Loop)에서 자동으로 크기에 적응하는 반복문을 만드는 데 바로 재사용된다. [S1] + +## 💻 코드 패턴 (Code patterns) +The type-agnostic formula for getting an array's actual element count (C): +```c +int myNumbers[] = {10, 25, 50, 75, 100}; +int length = sizeof(myNumbers) / sizeof(myNumbers[0]); +printf("%d", length); // Prints 5, not 20 +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Arrays]], [[C Data Types Sizeof]], [[C Arrays Loop]] +- **참조 맥락:** 배열 크기 계산 공식 — 배열 반복문(Arrays Loop) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Array Size — https://www.w3schools.com/c/c_arrays_size.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Array Size" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Bitwise_Operators.md b/10_Wiki/Dev/Topic_C/C_Bitwise_Operators.md new file mode 100644 index 00000000..48391b30 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Bitwise_Operators.md @@ -0,0 +1,73 @@ +--- +id: c-bitwise-operators +title: "C Bitwise Operators" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["& | ^ ~ << >>", "flags and permissions", "two's complement", "C 비트 연산자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "operators", "bitwise"] +raw_sources: ["https://www.w3schools.com/c/c_bitwise_operators.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Bitwise Operators]] + +## 🎯 한 줄 통찰 (One-line insight) +The bitwise NOT example (`~5` = `-6`) only makes sense once you know C stores negative numbers via TWO'S COMPLEMENT — flipping `00000101` (5) bit-by-bit gives `11111010`, which under two's complement representation is interpreted as -6, not some arbitrary large positive number — meaning `~` behaves "unexpectedly" only if you forget that the CPU's negative-number encoding, not simple bit-flipping intuition, determines the final printed value. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Six bitwise operators** — `&` (AND, 1 only if both bits 1), `|` (OR, 1 if either bit 1), `^` (XOR, 1 only if bits differ), `~` (NOT, inverts all bits), `<<` (left shift, multiplies by powers of 2), `>>` (right shift, divides by powers of 2). [S1] +- **Integer-only operation** — bitwise operators only work on integer types (`int`, `char`, `long`), not floats. [S1] +- **Two's complement interpretation** — `~a` inverting bits produces a result whose printed decimal value depends on how negative numbers are stored (typically two's complement). [S1] +- **Flags pattern** — combining multiple boolean options into one integer using distinct bit positions (`#define READ 1`, `#define WRITE 2`, `#define EXEC 4`), then checking each with `&`. [S1] +- **Shift as multiply/divide by powers of 2** — `a << n` multiplies `a` by 2ⁿ; `a >> n` divides `a` by 2ⁿ (sign bit may be preserved on signed integers, system-dependent). [S1] + +## 📖 세부 내용 (Details) +- Full worked example with `a = 6` (0110) and `b = 3` (0011): `a & b` = 2 (0010), `a | b` = 7 (0111), `a ^ b` = 5 (0101), `~a` = -7 on most systems, `a << 1` = 12 (1100), `a >> 1` = 3 (0011). [S1] +- Bitwise NOT and two's complement: `int a = 5; // 00000101 int result = ~a; // -6 on most systems` — because inverted bits `11111010` are interpreted as -6 under two's complement. [S1] +- Flags/permissions pattern: `#define READ 1 #define WRITE 2 #define EXEC 4 int permissions = READ | WRITE; if (permissions & READ) { printf("Read allowed\n"); } if (permissions & WRITE) { printf("Write allowed\n"); } if (permissions & EXEC) { printf("Execute allowed\n"); }` — only Read/Write print, since EXEC was never OR'd in. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **~ 연산 결과는 이진수 반전 자체가 아니라 2의 보수 해석에 좌우됨**: 5(00000101)를 반전하면 11111010이 되는데, 이를 그대로 큰 양수로 읽는 것이 아니라 대부분의 시스템에서 -6으로 해석된다는 점(2의 보수 표현)이 명시적으로 설명됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +READ/WRITE/EXEC 권한을 하나의 정수에 비트 플래그로 저장하고 &로 개별 권한을 검사하는 패턴이 원문에서 직접 실전 활용 사례로 제시됨(파일 시스템 권한 모델의 기초). [S1] + +## 💻 코드 패턴 (Code patterns) +Storing multiple boolean options in a single integer using bit flags (C): +```c +#define READ 1 // 0001 +#define WRITE 2 // 0010 +#define EXEC 4 // 0100 +int permissions = READ | WRITE; // user can read and write +if (permissions & READ) { printf("Read allowed\n"); } +if (permissions & WRITE) { printf("Write allowed\n"); } +if (permissions & EXEC) { printf("Execute allowed\n"); } // not printed +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Operators Logical]], [[C Operators Assignment]], [[C Operators Precedence]] +- **참조 맥락:** 비트 연산자 — 연산자 우선순위(Operators Precedence) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Bitwise Operators — https://www.w3schools.com/c/c_bitwise_operators.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Bitwise Operators" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Booleans.md b/10_Wiki/Dev/Topic_C/C_Booleans.md new file mode 100644 index 00000000..b2e6e783 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Booleans.md @@ -0,0 +1,70 @@ +--- +id: c-booleans +title: "C Booleans" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["bool type", "stdbool.h", "C 불리언"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "booleans", "stdbool"] +raw_sources: ["https://www.w3schools.com/c/c_booleans.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Booleans]] + +## 🎯 한 줄 통찰 (One-line insight) +`bool` is NOT a built-in C type like `int` or `char` — it was only added in C99 and requires explicitly including ``, meaning code written for older/stricter C standards, or code that forgets this include, has no `bool` keyword at all and must fall back to plain `int` with 1/0 conventions instead. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`bool`** (C99+, via ``) — a type representing exactly two values: `true` or `false`. [S1] +- **Underlying integer representation** — booleans print as integers: `1` (or any non-zero) for true, `0` for false, using the `%d` specifier. [S1] +- **Bool-to-bool comparison** — bool variables can be compared with `==` just like any other value (e.g. checking if two bools are both true). [S1] +- **Storing comparison results** — a comparison's result (already a 1/0 value) can be stored directly in a `bool` variable for readability and reuse. [S1] + +## 📖 세부 내용 (Details) +- Declaring and printing bools: `bool isProgrammingFun = true; bool isFishTasty = false; printf("%d", isProgrammingFun); // 1 printf("%d", isFishTasty); // 0`. [S1] +- Comparing two bool variables: `bool isHamburgerTasty = true; bool isPizzaTasty = true; printf("%d", isHamburgerTasty == isPizzaTasty); // 1`. [S1] +- Storing a comparison result in a bool: `int x = 10; int y = 9; bool isGreater = x > y; printf("%d", isGreater); // 1`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **bool은 C의 내장 타입이 아님**: int나 char와 달리 bool은 C99에서 도입되었고 반드시 를 포함해야 사용 가능하다는 점이 명시적으로 강조됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 비교 결과를 bool 변수에 저장해 재사용하는 것이 코드 가독성을 높이는 실전 습관으로 권장된다. [S1] + +## 💻 코드 패턴 (Code patterns) +Storing a comparison's result in a bool variable for readability (C): +```c +#include +int x = 10; +int y = 9; +bool isGreater = x > y; +printf("%d", isGreater); // Prints 1 (true) +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Random Numbers]], [[C Operators Comparison]], [[C Booleans RealLife]] +- **참조 맥락:** 불리언 섹션 첫 챕터 — 불리언 실전 예제(Booleans RealLife) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Booleans — https://www.w3schools.com/c/c_booleans.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Booleans" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Booleans_RealLife.md b/10_Wiki/Dev/Topic_C/C_Booleans_RealLife.md new file mode 100644 index 00000000..fd4cb7f2 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Booleans_RealLife.md @@ -0,0 +1,70 @@ +--- +id: c-booleans-reallife +title: "C Boolean Examples" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["voting age example", "boolean if-else preview", "C 불리언 실전 예제"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "booleans", "real-life-example"] +raw_sources: ["https://www.w3schools.com/c/c_booleans_reallife.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Boolean Examples]] + +## 🎯 한 줄 통찰 (One-line insight) +This chapter explicitly reframes the entire preceding Comparison/Boolean material as mere PREPARATION for `if...else` — printing a raw `1` or `0` (as done in every earlier example) is functionally correct but not directly useful to an end user, and the source's own upgrade (wrapping the same comparison in `if (myAge >= votingAge) {...} else {...}`) shows that booleans are the evaluated CONDITION inside control flow, not typically an end product to display as-is. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Comparison as raw output** — printing a comparison directly (`printf("%d", myAge >= votingAge);`) shows 1 or 0, technically correct but not user-friendly. [S1] +- **Comparison as an `if` condition** — the SAME comparison expression, placed inside `if (...)`, drives which branch of code executes, producing human-readable output instead of a raw 1/0. [S1] +- **Booleans as the foundation of conditions** — the chapter explicitly states booleans "are the basis for all comparisons and conditions," directly foreshadowing the next chapter's Conditions/if-else content. [S1] + +## 📖 세부 내용 (Details) +- Raw comparison output: `int myAge = 25; int votingAge = 18; printf("%d", myAge >= votingAge); // Returns 1 (true)`. [S1] +- The same logic upgraded into an if...else: `if (myAge >= votingAge) { printf("Old enough to vote!"); } else { printf("Not old enough to vote."); }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +투표 가능 연령(18세) 확인 로직을 raw 1/0 출력에서 if...else로 업그레이드하는 것이 이 챕터가 직접 보여주는 실전 활용 사례이자, 다음 챕터(Conditions)로의 전환점이다. [S1] + +## 💻 코드 패턴 (Code patterns) +The same boolean comparison used inside an if...else for human-readable output (C): +```c +int myAge = 25; +int votingAge = 18; +if (myAge >= votingAge) { + printf("Old enough to vote!"); +} else { + printf("Not old enough to vote."); +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Booleans]], [[C Conditions]] +- **참조 맥락:** 불리언 섹션 마지막 — 조건문(Conditions) 섹션으로 직접 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Boolean Examples — https://www.w3schools.com/c/c_booleans_reallife.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Boolean Examples" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Break_Continue.md b/10_Wiki/Dev/Topic_C/C_Break_Continue.md new file mode 100644 index 00000000..dad62340 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Break_Continue.md @@ -0,0 +1,79 @@ +--- +id: c-break-continue +title: "C Break and Continue" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["break statement", "continue statement", "loop control", "C break continue"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "loops", "break", "continue"] +raw_sources: ["https://www.w3schools.com/c/c_break_continue.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Break and Continue]] + +## 🎯 한 줄 통찰 (One-line insight) +`break` and `continue` are the same two keywords across BOTH switch statements and loops, but their meaning shifts by context — the source explicitly notes `break` was already seen "jumping out" of a `switch` block, and here it does the analogous thing for a LOOP (stop entirely), while `continue` has no switch equivalent at all — meaning `break`'s core behavior ("exit the current block early") generalizes across constructs, but `continue`'s "skip to next iteration" concept is loop-specific. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`break`** — stops the loop COMPLETELY, immediately, regardless of remaining iterations. [S1] +- **`continue`** — skips the REST of the current iteration's body and jumps straight to the next iteration (does not stop the loop). [S1] +- **Combinability** — `break` and `continue` can coexist in the same loop, each triggered by different conditions. [S1] +- **Works in both `for` and `while` loops** — the same semantics apply regardless of loop type. [S1] +- **Real-world pattern: skip-then-stop** — using `continue` to skip invalid/unwanted values while using `break` to halt entirely on a sentinel value (like a zero marking "end of valid data"). [S1] + +## 📖 세부 내용 (Details) +- `break` stopping a for loop at i==4: `for (i = 0; i < 10; i++) { if (i == 4) { break; } printf("%d\n", i); }` — prints 0,1,2,3 then stops entirely. [S1] +- `continue` skipping just one value: `for (i = 0; i < 10; i++) { if (i == 4) { continue; } printf("%d\n", i); }` — prints 0,1,2,3,5,6,7,8,9 (skips only 4). [S1] +- Combined in one loop: `for (i = 0; i < 6; i++) { if (i == 2) { continue; } if (i == 4) { break; } printf("%d\n", i); }` — prints 0,1,3 then stops at 4. [S1] +- Real-life skip-negatives-stop-at-zero pattern: `int myNumbers[] = {3, -1, 7, 0, 9}; for (i = 0; i < length; i++) { if (myNumbers[i] < 0) { continue; } if (myNumbers[i] == 0) { break; } printf("%d\n", myNumbers[i]); }` — prints 3 and 7, skips -1, stops entirely at 0 (never reaching 9). [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **break와 continue의 근본적 차이**: break는 루프를 완전히 종료하지만 continue는 현재 회차만 건너뛰고 루프는 계속된다는 점이 "Good to Remember" 요약으로 명확히 구분됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +음수는 건너뛰고(continue) 0을 만나면 완전히 멈추는(break) 숫자 리스트 처리 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Combining continue (skip invalid values) and break (stop at a sentinel value) in one loop (C): +```c +int myNumbers[] = {3, -1, 7, 0, 9}; +int length = sizeof(myNumbers) / sizeof(myNumbers[0]); +int i; +for (i = 0; i < length; i++) { + if (myNumbers[i] < 0) { + continue; // skip negative numbers + } + if (myNumbers[i] == 0) { + break; // stop loop when zero is found + } + printf("%d\n", myNumbers[i]); +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C For Loop RealLife]], [[C Switch]], [[C Arrays]] +- **참조 맥락:** 반복문 섹션 마지막 — 배열(Arrays) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Break and Continue — https://www.w3schools.com/c/c_break_continue.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Break and Continue" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Comments.md b/10_Wiki/Dev/Topic_C/C_Comments.md new file mode 100644 index 00000000..57c6239e --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Comments.md @@ -0,0 +1,67 @@ +--- +id: c-comments +title: "C Comments" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["single-line comments", "multi-line comments", "C 주석"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "comments"] +raw_sources: ["https://www.w3schools.com/c/c_comments.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Comments]] + +## 🎯 한 줄 통찰 (One-line insight) +Before C99 (1999), single-line `//` comments were NOT part of standard C at all — only `/* */` multi-line comments existed — meaning `//` comments, now the default choice for short notes, are actually a relatively recent addition to the language's ~50-year history, not an original feature. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Single-line comments (`//`)** — everything from `//` to the end of the line is ignored by the compiler. [S1] +- **Multi-line comments (`/* */`)** — everything between the markers is ignored, regardless of line count. [S1] +- **Comments as code-disabling tool** — `//` can be prefixed to a line of working code to temporarily disable it during testing, without deleting it. [S1] +- **Historical constraint** — pre-C99, only `/* */` was valid; `//` support was added in the C99 standard. [S1] + +## 📖 세부 내용 (Details) +- Single-line comment before code: `// This is a comment` followed by `printf("Hello World!");`. [S1] +- Single-line comment disabling code: `printf("This will run"); // printf("This will NOT run");`. [S1] +- Multi-line comment: `/* The code below will print the words Hello World! to the screen, and it is amazing */ printf("Hello World!");`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **// 주석의 표준화 시점**: C99(1999) 이전에는 다중 줄 주석(/* */)만 사용 가능했고, 한 줄 주석(//)은 C99부터 표준에 포함되었다는 역사적 사실이 명시됨 — 구형 컴파일러/표준 준수 코드 작성 시 유의해야 할 사항. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 특정 코드 줄을 지우지 않고 // 로 임시 비활성화하는 것이 실전 디버깅/테스트에서 흔히 쓰이는 기법이다. [S1] + +## 💻 코드 패턴 (Code patterns) +Temporarily disabling a line of code using a single-line comment instead of deleting it (C): +```c +printf("This will run"); +// printf("This will NOT run"); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Output]], [[C Organize Code]] +- **참조 맥락:** 주석 문법 — 코드 조직화(Organize Code) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Comments — https://www.w3schools.com/c/c_comments.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Comments" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Conditions.md b/10_Wiki/Dev/Topic_C/C_Conditions.md new file mode 100644 index 00000000..5bed8179 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Conditions.md @@ -0,0 +1,71 @@ +--- +id: c-conditions +title: "C If ... Else" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["if statement", "lowercase if", "C 조건문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "conditions", "if-statement"] +raw_sources: ["https://www.w3schools.com/c/c_conditions.php"] +applied_in: [] +github_commit: "" +--- + +# [[C If ... Else]] + +## 🎯 한 줄 통찰 (One-line insight) +Case sensitivity isn't just a general C rule mentioned in passing — this chapter singles it out specifically for `if`, explicitly warning that `If` or `IF` will generate an error, meaning the keyword has zero tolerance for capitalization variants despite `if` being one of the most frequently typed words in any C program. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Six comparison conditions** — `<`, `<=`, `>`, `>=`, `==`, `!=`, familiar from mathematics. [S1] +- **Four conditional constructs** — `if` (run code if true), `else` (run if false), `else if` (test a new condition if the first is false), `switch` (many alternative code blocks). [S1] +- **Case-sensitive keyword** — `if` must be lowercase; `If`/`IF` produce an error. [S1] +- **Boolean-variable readability pattern** — storing a comparison's result in a `bool` variable before using it in `if` makes complex or reused conditions easier to read. [S1] + +## 📖 세부 내용 (Details) +- Basic if with literal values: `if (20 > 18) { printf("20 is greater than 18"); }`. [S1] +- If with variables: `int x = 20; int y = 18; if (x > y) { printf("x is greater than y"); }`. [S1] +- Using a boolean variable to hold the condition: `bool isGreater = x > y; if (isGreater) { printf("x is greater than y"); }` (requires ``). [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **if는 반드시 소문자**: If나 IF처럼 대소문자를 다르게 쓰면 에러가 발생한다는 점이 명시적으로 경고됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 복잡하거나 재사용되는 조건을 bool 변수에 미리 담아두는 패턴이 가독성 있는 조건문 작성의 실전 관행이다. [S1] + +## 💻 코드 패턴 (Code patterns) +Storing a condition in a readable boolean variable before using it in an if statement (C): +```c +int x = 20; +int y = 18; +bool isGreater = x > y; +if (isGreater) { + printf("x is greater than y"); +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Booleans RealLife]], [[C Conditions Else]] +- **참조 맥락:** 조건문 섹션 첫 챕터 — else 문(Conditions Else) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C If ... Else — https://www.w3schools.com/c/c_conditions.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C If ... Else" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Conditions_Else.md b/10_Wiki/Dev/Topic_C/C_Conditions_Else.md new file mode 100644 index 00000000..729d6e83 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Conditions_Else.md @@ -0,0 +1,70 @@ +--- +id: c-conditions-else +title: "C Else" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["else statement", "C else 문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "conditions", "else"] +raw_sources: ["https://www.w3schools.com/c/c_conditions_else.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Else]] + +## 🎯 한 줄 통찰 (One-line insight) +Naming a boolean condition variable descriptively (`isDay` instead of a raw `time < 18` expression) doesn't change the program's behavior at all — it's purely a communication device for future readers — and the source explicitly frames this as its entire justification: "makes it easy to understand what the condition means," not a performance or correctness improvement. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`else`** — runs a block of code when the paired `if` condition is false; there is no separate condition to check for `else` itself. [S1] +- **Mutually exclusive branches** — exactly one of the `if` or `else` block executes, never both, never neither. [S1] +- **Descriptive boolean naming** — storing a condition in a variable like `isDay` documents the condition's MEANING, not just its mechanics. [S1] + +## 📖 세부 내용 (Details) +- Basic if/else: `int time = 20; if (time < 18) { printf("Good day."); } else { printf("Good evening."); } // Outputs "Good evening."`. [S1] +- Same logic with a descriptively-named boolean: `bool isDay = time < 18; if (isDay) { printf("Good day."); } else { printf("Good evening."); }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +시간(time)이 18보다 작은지에 따라 "좋은 하루"/"좋은 저녁"을 출력하는 예제가 원문에서 직접 실전 활용 사례로 제시됨(시간대 기반 인사말 로직). [S1] + +## 💻 코드 패턴 (Code patterns) +Naming a boolean condition descriptively for readability (C): +```c +int time = 20; +bool isDay = time < 18; +if (isDay) { + printf("Good day."); +} else { + printf("Good evening."); +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Conditions]], [[C Conditions ElseIf]] +- **참조 맥락:** else 문 — else if 문(Conditions ElseIf) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Else — https://www.w3schools.com/c/c_conditions_else.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Else" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Conditions_ElseIf.md b/10_Wiki/Dev/Topic_C/C_Conditions_ElseIf.md new file mode 100644 index 00000000..cb56c742 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Conditions_ElseIf.md @@ -0,0 +1,72 @@ +--- +id: c-conditions-elseif +title: "C Else If" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["else if chain", "top to bottom evaluation", "C else if 문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "conditions", "else-if"] +raw_sources: ["https://www.w3schools.com/c/c_conditions_elseif.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Else If]] + +## 🎯 한 줄 통찰 (One-line insight) +Conditions in an if/else-if chain are checked strictly top-to-bottom and STOP at the first true match — the source's time example explicitly notes "as soon as one condition is true, its block of code runs, and the rest are skipped," meaning even if a later condition would ALSO be true, only the FIRST matching branch ever executes; chain ORDER therefore determines behavior, not just correctness of each individual condition. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`else if`** — tests a new condition only if the preceding condition(s) were false; can be chained multiple times. [S1] +- **First-match-wins evaluation** — conditions are checked top to bottom; the FIRST true condition's block runs and all subsequent conditions in the chain are skipped, even if they'd also evaluate true. [S1] +- **Boolean-variable chaining** — each condition in the chain can be pre-computed into a descriptively-named bool (`isMorning`, `isDay`) for readability. [S1] + +## 📖 세부 내용 (Details) +- Time-of-day chain: `int time = 16; if (time < 12) { printf("Good morning."); } else if (time < 18) { printf("Good day."); } else { printf("Good evening."); } // Outputs "Good day."` — the first condition (`time < 12`) is false, the second (`time < 18`) is true, so only "Good day." prints. [S1] +- Same chain with named booleans: `bool isMorning = time < 12; bool isDay = time < 18; if (isMorning) {...} else if (isDay) {...} else {...}`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **첫 번째로 참인 조건만 실행됨**: 체인 내 여러 조건이 이론상 동시에 참일 수 있어도, 위에서부터 먼저 참으로 판정된 조건의 블록만 실행되고 나머지는 건너뛴다는 점이 명시적으로 강조됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 시간대에 따라 아침/낮/저녁 인사를 구분하는 것이 else if 체인의 대표적인 실전 활용 예시다. [S1] + +## 💻 코드 패턴 (Code patterns) +Chained else-if conditions evaluated top-to-bottom, stopping at the first match (C): +```c +int time = 16; +if (time < 12) { + printf("Good morning."); +} else if (time < 18) { + printf("Good day."); +} else { + printf("Good evening."); +} +// Outputs "Good day." +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Conditions Else]], [[C Conditions Short Hand]] +- **참조 맥락:** else if 체인 — 삼항 연산자(Conditions Short Hand) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Else If — https://www.w3schools.com/c/c_conditions_elseif.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Else If" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Conditions_Logical.md b/10_Wiki/Dev/Topic_C/C_Conditions_Logical.md new file mode 100644 index 00000000..ca285692 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Conditions_Logical.md @@ -0,0 +1,74 @@ +--- +id: c-conditions-logical +title: "C Logical Operators in Conditions" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["access control logic", "&& || ! in if", "C 조건문 논리 연산자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "conditions", "logical-operators"] +raw_sources: ["https://www.w3schools.com/c/c_conditions_logical.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Logical Operators in Conditions]] + +## 🎯 한 줄 통찰 (One-line insight) +The access-control example composes THREE logical operators into one nested rule — `isLoggedIn && (isAdmin || securityLevel <= 2)` — which the source walks through with four distinct securityLevel values (1, 2, 3, 4) to show the exact boundary where access flips from granted to denied, demonstrating that real authorization logic is rarely a single comparison but a nested AND/OR combination whose behavior must be traced case by case, not just read at a glance. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`&&` (AND) in conditions** — both conditions must be true for the combined condition to be true. [S1] +- **`||` (OR) in conditions** — at least one condition must be true. [S1] +- **`!` (NOT) in conditions** — reverses a condition's truth value (true↔false); useful for phrasing "check that something is NOT the case." [S1] +- **Nested logical composition** — parentheses group sub-conditions (e.g. `(isAdmin || securityLevel <= 2)`) that then combine with another condition via `&&`, mirroring real authorization rules. [S1] + +## 📖 세부 내용 (Details) +- AND: `int a = 200, b = 33, c = 500; if (a > b && c > a) { printf("Both conditions are true\n"); }`. [S1] +- OR: `if (a > b || a > c) { printf("At least one condition is true\n"); }`. [S1] +- NOT: `int a = 33; int b = 200; if (!(a > b)) { printf("a is NOT greater than b\n"); }`. [S1] +- Full access-control rule with worked-through outcomes: `bool isLoggedIn = true; bool isAdmin = false; int securityLevel = 3; if (isLoggedIn && (isAdmin || securityLevel <= 2)) { printf("Access granted\n"); } else { printf("Access denied\n"); }` — securityLevel 1 or 2 → granted; 3 or 4 → denied (unless isAdmin is true, which always grants access). [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +로그인 여부(isLoggedIn) + (관리자이거나(isAdmin) 보안등급이 2 이하(securityLevel <= 2))를 결합한 접근 제어 규칙이 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Nested AND/OR logic for a real-world access-control rule (C): +```c +bool isLoggedIn = true; +bool isAdmin = false; +int securityLevel = 3; // 1 = highest +if (isLoggedIn && (isAdmin || securityLevel <= 2)) { + printf("Access granted\n"); +} else { + printf("Access denied\n"); +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Conditions Short Hand]], [[C Operators Logical]], [[C Conditions Nested]] +- **참조 맥락:** 조건문 내 논리 연산자 — 중첩 if(Conditions Nested) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Logical Operators in Conditions — https://www.w3schools.com/c/c_conditions_logical.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Logical Operators in Conditions" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Conditions_Nested.md b/10_Wiki/Dev/Topic_C/C_Conditions_Nested.md new file mode 100644 index 00000000..3593460a --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Conditions_Nested.md @@ -0,0 +1,75 @@ +--- +id: c-conditions-nested +title: "C Nested If" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["if inside if", "dependent conditions", "C 중첩 if"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "conditions", "nested-if"] +raw_sources: ["https://www.w3schools.com/c/c_conditions_nested.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Nested If]] + +## 🎯 한 줄 통찰 (One-line insight) +A nested `if` only ever gets EVALUATED at all if the outer condition is true — the voting-and-citizenship example never even checks `isCitizen` if `age >= 18` is false, meaning nesting isn't just visual grouping of related checks, it's a genuine short-circuit optimization where the inner condition's cost (and its own true/false branches) is entirely skipped when the outer gate fails. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Nested if** — placing an `if` statement inside another `if`'s block, so the inner condition is only checked when the outer condition is already true. [S1] +- **Dependent condition modeling** — naturally expresses "check B only if A holds" logic, like age eligibility gating a citizenship check. [S1] +- **Depth caution** — the source explicitly warns against nesting too deeply, as it can hurt readability; nested if is commonly combined with `else`/`else if` for richer decision trees. [S1] + +## 📖 세부 내용 (Details) +- Basic two-level nesting: `int x = 15; int y = 25; if (x > 10) { printf("x is greater than 10\n"); if (y > 20) { printf("y is also greater than 20\n"); } }` — both print since both conditions hold. [S1] +- Voting + citizenship real-life example: `int age = 20; bool isCitizen = true; if (age >= 18) { printf("Old enough to vote.\n"); if (isCitizen) { printf("And you are a citizen, so you can vote!\n"); } else { printf("But you must be a citizen to vote.\n"); } } else { printf("Not old enough to vote.\n"); }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **중첩 if의 단축 평가 효과**: 바깥 조건이 거짓이면 안쪽 if의 조건 자체가 아예 평가되지 않는다는 점이 나이/시민권 예제로 확인됨 — 관련 없는 하위 조건을 불필요하게 검사하지 않는 효율성을 제공. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +투표 가능 연령(18세 이상)을 먼저 확인하고, 그 안에서만 시민권 여부를 추가로 확인하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +An inner condition (citizenship) checked only when the outer condition (age) already holds (C): +```c +int age = 20; +bool isCitizen = true; +if (age >= 18) { + printf("Old enough to vote.\n"); + if (isCitizen) { + printf("And you are a citizen, so you can vote!\n"); + } else { + printf("But you must be a citizen to vote.\n"); + } +} else { + printf("Not old enough to vote.\n"); +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Conditions Logical]], [[C Conditions RealLife]] +- **참조 맥락:** 중첩 if — 조건문 실전 예제(Conditions RealLife) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Nested If — https://www.w3schools.com/c/c_conditions_nested.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Nested If" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Conditions_RealLife.md b/10_Wiki/Dev/Topic_C/C_Conditions_RealLife.md new file mode 100644 index 00000000..a05df8f0 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Conditions_RealLife.md @@ -0,0 +1,73 @@ +--- +id: c-conditions-reallife +title: "C If ... Else Examples" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["real-life if else", "even or odd example", "C 조건문 실전 예제"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "conditions", "real-life-example"] +raw_sources: ["https://www.w3schools.com/c/c_conditions_reallife.php"] +applied_in: [] +github_commit: "" +--- + +# [[C If ... Else Examples]] + +## 🎯 한 줄 통찰 (One-line insight) +The even/odd checker reuses the `%` modulus operator from the Arithmetic Operators chapter for a purpose that has nothing to do with "remainder after division" in the everyday sense — `myNum % 2 == 0` is the standard idiom for parity checking, showing that modulus's real-world utility often lies in binary classification (even/odd, every-Nth) rather than literal division-remainder arithmetic. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **This chapter is a compilation** — six worked real-life if/else scenarios, consolidating patterns from every prior Conditions sub-chapter (basic if/else, else-if chains, nested if, logical operators). [S1] +- **Door-code check** — a single `==` equality check gating access. [S1] +- **Positive/negative/zero classification** — a three-way `if`/`else if`/`else` chain covering all three number sign cases. [S1] +- **Even/odd via modulus** — `num % 2 == 0` is the standard parity-check idiom. [S1] +- **Temperature banding** — a three-tier `if`/`else if`/`else` chain (freezing/cool/warm) based on numeric thresholds. [S1] + +## 📖 세부 내용 (Details) +- Door code check: `int doorCode = 1337; if (doorCode == 1337) { printf("Correct code.\nThe door is now open."); } else { printf("Wrong code.\nThe door remains closed."); }`. [S1] +- Positive/negative/zero: `int myNum = 10; if (myNum > 0) { printf("The value is a positive number."); } else if (myNum < 0) { printf("The value is a negative number."); } else { printf("The value is 0."); }`. [S1] +- Even/odd check: `int myNum = 5; if (myNum % 2 == 0) { printf("%d is even.\n", myNum); } else { printf("%d is odd.\n", myNum); }`. [S1] +- Temperature banding: `int temperature = 30; if (temperature < 0) { printf("It's freezing!\n"); } else if (temperature < 20) { printf("It's cool.\n"); } else { printf("It's warm.\n"); }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +도어락 코드 확인, 숫자 부호 판별, 짝/홀수 판별, 온도 구간 분류, 접근 제어 등 6가지 실전 시나리오가 원문에서 직접 제시되며, 각각이 조건문 섹션 전체를 종합한 실전 활용 사례다. [S1] + +## 💻 코드 패턴 (Code patterns) +The standard parity-check idiom using the modulus operator (C): +```c +int myNum = 5; +if (myNum % 2 == 0) { + printf("%d is even.\n", myNum); +} else { + printf("%d is odd.\n", myNum); +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Conditions Nested]], [[C Operators Arithmetic]], [[C Switch]] +- **참조 맥락:** 조건문 섹션 마지막 — switch 문(Switch) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C If ... Else Examples — https://www.w3schools.com/c/c_conditions_reallife.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C If ... Else Examples" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Conditions_Short_Hand.md b/10_Wiki/Dev/Topic_C/C_Conditions_Short_Hand.md new file mode 100644 index 00000000..d8224feb --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Conditions_Short_Hand.md @@ -0,0 +1,66 @@ +--- +id: c-conditions-short-hand +title: "C Short Hand If Else" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["ternary operator", "condition ? true : false", "C 삼항 연산자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "conditions", "ternary-operator"] +raw_sources: ["https://www.w3schools.com/c/c_conditions_short_hand.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Short Hand If Else]] + +## 🎯 한 줄 통찰 (One-line insight) +The ternary operator is explicitly named for its OPERAND COUNT — "because it uses three operands" (condition, true-expression, false-expression) — not because of any special syntax category, meaning it's simply the only operator in C that takes three arguments rather than the usual one or two, which is why it stands out enough to warrant special naming. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Ternary operator (`?:`)** — a shorthand if/else that RETURNS a value rather than branching execution; syntax: `variable = (condition) ? expressionTrue : expressionFalse;`. [S1] +- **Three operands** — condition, true-branch expression, false-branch expression — the origin of the name "ternary." [S1] +- **Equivalent to a simple if/else** — best suited for replacing straightforward two-branch if/else statements, not complex multi-branch logic. [S1] +- **Stylistic choice** — the source explicitly states it's "completely up to you" whether to use traditional if/else or the ternary form. [S1] + +## 📖 세부 내용 (Details) +- Traditional if/else form: `int time = 20; if (time < 18) { printf("Good day."); } else { printf("Good evening."); }`. [S1] +- Equivalent one-line ternary form: `int time = 20; (time < 18) ? printf("Good day.") : printf("Good evening.");`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 시간에 따른 인사말 출력을 한 줄로 압축하는 예제가 삼항 연산자의 대표 실전 활용이다. [S1] + +## 💻 코드 패턴 (Code patterns) +A simple if/else compressed into one line using the ternary operator (C): +```c +int time = 20; +(time < 18) ? printf("Good day.") : printf("Good evening."); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Conditions ElseIf]], [[C Conditions Logical]] +- **참조 맥락:** 삼항 연산자 — 조건문 내 논리 연산자(Conditions Logical) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Short Hand If Else — https://www.w3schools.com/c/c_conditions_short_hand.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Short Hand If Else" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Constants.md b/10_Wiki/Dev/Topic_C/C_Constants.md new file mode 100644 index 00000000..3ba6cf18 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Constants.md @@ -0,0 +1,68 @@ +--- +id: c-constants +title: "C Constants" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["const keyword", "read-only variables", "C 상수"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "constants"] +raw_sources: ["https://www.w3schools.com/c/c_constants.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Constants]] + +## 🎯 한 줄 통찰 (One-line insight) +A `const` variable MUST be assigned a value at the moment of declaration — declaring it first and assigning later (`const int minutesPerHour; minutesPerHour = 60;`) is explicitly shown as an error — meaning `const` isn't just "can't change later," it also removes the two-step declare-then-assign pattern that ordinary variables freely support. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`const` keyword** — makes a variable unchangeable/read-only after its initial assignment. [S1] +- **Mandatory initialization** — a `const` variable must receive its value at declaration time; assigning it afterward is a compile error. [S1] +- **Uppercase naming convention** — while not required, C programmers commonly write constant names in uppercase (e.g. `BIRTHYEAR`) for readability. [S1] +- **Use case** — values unlikely to ever change during program execution (e.g. `minutesPerHour`, `monthsInYear`). [S1] + +## 📖 세부 내용 (Details) +- Attempting reassignment fails: `const int myNum = 15; myNum = 10; // error: assignment of read-only variable 'myNum'`. [S1] +- Declare-without-assign fails: `const int minutesPerHour; minutesPerHour = 60; // error`. [S1] +- Uppercase convention: `const int BIRTHYEAR = 1980;`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **const는 선언과 동시에 초기화 필수**: 일반 변수처럼 먼저 선언만 하고 나중에 값을 대입하는 방식이 const에서는 컴파일 에러를 발생시킨다는 점이 명시적으로 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 시간당 분(60), 연중 개월 수(12)처럼 절대 변하지 않는 값을 const로 선언하는 것이 실전 코드에서의 표준 활용이다. [S1] + +## 💻 코드 패턴 (Code patterns) +Declaring constants that must be initialized at the point of declaration (C): +```c +const int minutesPerHour = 60; +const int monthsInYear = 12; +const int BIRTHYEAR = 1980; // uppercase is a common naming convention +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Data Types RealLife]], [[C Storage Classes]] +- **참조 맥락:** 상수 선언 — 저장 클래스(Storage Classes) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Constants — https://www.w3schools.com/c/c_constants.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Constants" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Data_Types.md b/10_Wiki/Dev/Topic_C/C_Data_Types.md new file mode 100644 index 00000000..40f6b466 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Data_Types.md @@ -0,0 +1,69 @@ +--- +id: c-data-types +title: "C Data Types" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["int float double char", "format specifiers table", "C 데이터 타입"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "data-types"] +raw_sources: ["https://www.w3schools.com/c/c_data_types.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Data Types]] + +## 🎯 한 줄 통찰 (One-line insight) +The source's explicit warning — "if not [using the correct format specifier], the program may produce errors or even crash" — reveals that in C, a format specifier mismatch isn't just a display glitch like in more forgiving languages; it can cause undefined behavior or a crash, because `printf()` blindly trusts the specifier to know how many bytes to read from the argument list. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Four basic types** — `int` (2 or 4 bytes, whole numbers), `float` (4 bytes, ~6-7 decimal digit precision), `double` (8 bytes, ~15 decimal digit precision), `char` (1 byte, single character/ASCII value). [S1] +- **Type-specific format specifiers** — `%d`/`%i` (int), `%f`/`%F` (float), `%lf` (double), `%c` (char), `%s` (string, covered later). [S1] +- **Mismatch risk** — using the wrong specifier for a type can cause errors or crashes, not just wrong output. [S1] + +## 📖 세부 내용 (Details) +- Four types declared and printed together: `int myNum = 5; float myFloatNum = 5.99; char myLetter = 'D'; printf("%d\n", myNum); printf("%f\n", myFloatNum); printf("%c\n", myLetter);`. [S1] +- Format specifier reference table: int→`%d`/`%i`, float→`%f`/`%F`, double→`%lf`, char→`%c`, string→`%s`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **잘못된 포맷 지정자의 실질적 위험**: 단순 출력 오류가 아니라 프로그램이 크래시할 수도 있다는 점이 명시적으로 경고됨 — printf()가 지정자만 보고 인자 크기를 추정하기 때문. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 정수/실수/문자 네 가지 기본 타입을 상황에 맞게 선택하는 것이 이후 모든 C 챕터의 기초가 된다. [S1] + +## 💻 코드 패턴 (Code patterns) +The four basic C data types printed with their matching format specifiers: +```c +int myNum = 5; // Integer (whole number) +float myFloatNum = 5.99; // Floating point number +char myLetter = 'D'; // Character +printf("%d\n", myNum); +printf("%f\n", myFloatNum); +printf("%c\n", myLetter); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Variables Format]], [[C Data Types Numbers]], [[C Data Types Characters]] +- **참조 맥락:** 데이터 타입 섹션 첫 챕터 — 숫자형 타입 상세(Data Types Numbers) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Data Types — https://www.w3schools.com/c/c_data_types.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Data Types" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Data_Types_Characters.md b/10_Wiki/Dev/Topic_C/C_Data_Types_Characters.md new file mode 100644 index 00000000..840a0609 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Data_Types_Characters.md @@ -0,0 +1,70 @@ +--- +id: c-data-types-characters +title: "C Character Data Types" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["char type", "ASCII values", "C 문자 타입"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "data-types", "char", "ascii"] +raw_sources: ["https://www.w3schools.com/c/c_data_types_characters.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Character Data Types]] + +## 🎯 한 줄 통찰 (One-line insight) +Assigning multiple characters to a single `char` variable (`char myText = 'Hello';`) doesn't raise an error — it silently prints only the LAST character — meaning `char`'s single-character limit is a silent-failure trap rather than a compile-time guard, and the source explicitly warns not to rely on it for anything beyond one character. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`char`** — stores exactly one character, written in single quotes (`'A'`), printed with `%c`. [S1] +- **ASCII value assignment** — `char` variables can be assigned numeric ASCII codes directly (no quotes, since it's a number, not a literal character) and still print as the corresponding character via `%c`. [S1] +- **Silent truncation on multi-character assignment** — `char myText = 'Hello';` compiles but only stores/prints the LAST character, with no error raised. [S1] +- **Strings for multi-character text** — `char myText[] = "Hello";` (a character array, printed with `%s`) is the correct tool for multi-character text, not a bare `char`. [S1] + +## 📖 세부 내용 (Details) +- Basic char: `char myGrade = 'A'; printf("%c", myGrade);`. [S1] +- ASCII numeric assignment: `char a = 65, b = 66, c = 67; printf("%c", a); printf("%c", b); printf("%c", c);` — prints A, B, C. [S1] +- The silent-truncation trap: `char myText = 'Hello'; printf("%c", myText);` — prints only the last character, with no compiler error. [S1] +- Correct multi-character storage: `char myText[] = "Hello"; printf("%s", myText);`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **char에 여러 문자 대입 시 조용한 실패**: 'Hello'처럼 여러 문자를 char 변수에 대입해도 에러 없이 컴파일되지만 마지막 문자만 저장/출력된다는 점이 명시적으로 경고됨 — 여러 문자에는 반드시 문자열(char 배열)을 써야 함. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — ASCII 코드값(65,66,67)을 직접 char에 대입해 A/B/C를 출력하는 패턴이 문자와 숫자 표현이 내부적으로 같다는 것을 보여주는 실전 예시다. [S1] + +## 💻 코드 패턴 (Code patterns) +Assigning ASCII numeric codes directly to char variables (C): +```c +char a = 65, b = 66, c = 67; +printf("%c", a); // A +printf("%c", b); // B +printf("%c", c); // C +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Data Types Numbers]], [[C Data Types Dec]], [[C Strings]] +- **참조 맥락:** 문자 타입과 ASCII — 소수점 정밀도(Data Types Dec) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Character Data Types — https://www.w3schools.com/c/c_data_types_characters.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Character Data Types" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Data_Types_Dec.md b/10_Wiki/Dev/Topic_C/C_Data_Types_Dec.md new file mode 100644 index 00000000..21514308 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Data_Types_Dec.md @@ -0,0 +1,68 @@ +--- +id: c-data-types-dec +title: "C Decimal Precision" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["%.2f", "decimal precision", "C 소수점 자리수"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "data-types", "printf", "precision"] +raw_sources: ["https://www.w3schools.com/c/c_data_types_dec.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Decimal Precision]] + +## 🎯 한 줄 통찰 (One-line insight) +By default `%f` always pads a float/double out to 6 digits after the decimal point regardless of how few digits the actual value has (`3.5` prints as `3.500000`) — meaning the visible "extra zeros" problem beginners see isn't a bug in their number, it's `%f`'s fixed default precision, controllable only by inserting a `.N` modifier between `%` and `f`. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Default `%f` precision** — always shows 6 digits after the decimal point, padding with zeros if the actual value has fewer. [S1] +- **`.N` precision modifier** — inserting `.N` between `%` and `f` (e.g. `%.2f`) limits output to exactly N digits after the decimal point. [S1] +- **Applies to both float and double** — the precision modifier syntax works the same way regardless of which type is being printed. [S1] + +## 📖 세부 내용 (Details) +- Default padding behavior: `float myFloatNum = 3.5; printf("%f\n", myFloatNum); // Outputs 3.500000`. [S1] +- Controlling precision: `printf("%.1f\n", myFloatNum); // Only show 1 digit` / `printf("%.2f\n", myFloatNum); // Only show 2 digits` / `printf("%.4f", myFloatNum); // Only show 4 digits`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — %.2f로 소수점 둘째 자리까지만 표시하는 것이 통화 금액 출력(다음 Real-Life 예제의 총 비용 계산) 같은 실전 상황에서 표준적으로 쓰인다. [S1] + +## 💻 코드 패턴 (Code patterns) +Controlling how many decimal digits printf() shows (C): +```c +float myFloatNum = 3.5; +printf("%f\n", myFloatNum); // Default: 3.500000 +printf("%.1f\n", myFloatNum); // 3.5 +printf("%.2f\n", myFloatNum); // 3.50 +printf("%.4f", myFloatNum); // 3.5000 +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Data Types Characters]], [[C Data Types Extended]], [[C Data Types RealLife]] +- **참조 맥락:** 소수점 정밀도 제어 — 확장 타입(Data Types Extended) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Decimal Precision — https://www.w3schools.com/c/c_data_types_dec.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Decimal Precision" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Data_Types_Extended.md b/10_Wiki/Dev/Topic_C/C_Data_Types_Extended.md new file mode 100644 index 00000000..bfb435ac --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Data_Types_Extended.md @@ -0,0 +1,71 @@ +--- +id: c-data-types-extended +title: "C Extended Types" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["short long unsigned", "long long int", "C 확장 데이터 타입"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "data-types", "extended-types"] +raw_sources: ["https://www.w3schools.com/c/c_data_types_extended.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Extended Types]] + +## 🎯 한 줄 통찰 (One-line insight) +The exact byte size of every extended type (`short int`, `long int`, etc.) is explicitly marked as SYSTEM-DEPENDENT, not a fixed language guarantee — `long int` might be 4 OR 8 bytes depending on whether the system is 32-bit or 64-bit and which compiler is used, meaning code relying on an assumed size can silently behave differently across machines unless the programmer verifies with `sizeof` or uses fixed-width types instead. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`short int`** — smaller range int, 2 bytes, `%hd`. [S1] +- **`unsigned int`** — non-negative-only int, 2 or 4 bytes, `%u`. [S1] +- **`long int` / `long long int`** — larger-range ints, 4-8 bytes, `%ld`/`%lld`. [S1] +- **`unsigned long int` / `unsigned long long int`** — non-negative, larger range, `%lu`/`%llu`. [S1] +- **`long double`** — extended precision beyond `double`, 8-16 bytes, `%Lf`. [S1] +- **`unsigned`** — a modifier meaning the type can only store 0 and positive values, trading away negative range for extra positive headroom. [S1] +- **Platform-dependent sizes** — sizes differ across systems (older/newer, 32-bit/64-bit, compiler); use `sizeof` to check actual sizes, or fixed-width types (covered later) when exact size matters. [S1] + +## 📖 세부 내용 (Details) +- Full extended-type example: `short int small = -100; unsigned int count = 25; long int big = 1234567890; long long int veryBig = 9223372036854775807; unsigned long long int huge = 18446744073709551615U; long double precise = 3.141592653589793238L;` printed with `%hd`/`%u`/`%ld`/`%lld`/`%llu`/`%Lf` respectively. [S1] +- Checking actual sizes on the current system: `printf("Size of long int: %zu bytes\n", sizeof(long int));`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **확장 타입 크기는 시스템 의존적**: long int가 시스템에 따라 4바이트 또는 8바이트일 수 있다는 점이 명시되며, 정확한 크기가 필요하면 sizeof로 확인하거나 고정폭 정수 타입(Fixed Width Ints)을 사용하라고 안내됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 일상적인 프로그래밍에서는 int/float/double/char로 충분하며, 확장 타입은 메모리나 숫자 범위를 정밀 제어해야 할 때만 필요하다고 명시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Declaring and printing several extended integer types (C): +```c +long long int veryBig = 9223372036854775807; +unsigned long long int huge = 18446744073709551615U; +printf("Very Big: %lld\n", veryBig); +printf("Huge: %llu\n", huge); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Data Types Dec]], [[C Data Types Sizeof]], [[C Fixed Width Ints]] +- **참조 맥락:** 확장 정수 타입 — sizeof 연산자(Data Types Sizeof) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Extended Types — https://www.w3schools.com/c/c_data_types_extended.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Extended Types" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Data_Types_Numbers.md b/10_Wiki/Dev/Topic_C/C_Data_Types_Numbers.md new file mode 100644 index 00000000..206dafae --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Data_Types_Numbers.md @@ -0,0 +1,68 @@ +--- +id: c-data-types-numbers +title: "C Numeric Data Types" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["float vs double", "scientific notation", "C 숫자 타입"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "data-types", "numbers"] +raw_sources: ["https://www.w3schools.com/c/c_data_types_numbers.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Numeric Data Types]] + +## 🎯 한 줄 통찰 (One-line insight) +The source explicitly recommends `double` over `float` as the SAFER DEFAULT for "most calculations" despite `double` costing twice the memory (8 bytes vs 4) — reframing the float/double choice not as "smaller is better" but as a precision-vs-memory tradeoff where precision loss (float's 6-7 digit limit vs double's ~15) is the bigger practical risk in everyday arithmetic. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`int`** — whole numbers without decimals. [S1] +- **`float`** — decimal numbers, ~6-7 significant decimal digits of precision, 4 bytes. [S1] +- **`double`** — decimal numbers, ~15 significant decimal digits of precision, 8 bytes; recommended default for most calculations despite the extra memory cost. [S1] +- **Scientific notation** — `e`/`E` means "times 10 to the power of" (e.g. `35e3` = 35 × 10³ = 35000), useful for writing very large/small numbers compactly. [S1] + +## 📖 세부 내용 (Details) +- Basic declarations: `int myNum = 1000;`, `float myNum = 5.75;`, `double myNum = 19.99;` each printed with `%d`/`%f`/`%lf` respectively. [S1] +- Scientific notation usage: `float f1 = 35e3; double d1 = 12E4; printf("%f\n", f1); printf("%lf", d1);` — evaluates to 35000 and 120000 respectively. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **float보다 double을 기본으로 권장**: float가 메모리를 절반만 쓰지만, 대부분의 계산에는 정밀도가 더 높은 double을 쓰는 것이 더 안전하다는 점이 명시적으로 권고됨(메모리 절약보다 정밀도 손실 위험을 우선 고려). [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 과학적 표기법(35e3)으로 큰 수를 짧게 표현하는 것이 대규모 데이터나 과학 계산 코드에서 실전 활용된다. [S1] + +## 💻 코드 패턴 (Code patterns) +Scientific notation for compactly writing large floating-point numbers (C): +```c +float f1 = 35e3; // 35 * 10^3 = 35000 +double d1 = 12E4; // 12 * 10^4 = 120000 +printf("%f\n", f1); +printf("%lf", d1); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Data Types]], [[C Data Types Characters]], [[C Data Types Dec]] +- **참조 맥락:** 숫자 타입 상세 — 문자 타입(Data Types Characters) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Numeric Data Types — https://www.w3schools.com/c/c_data_types_numbers.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Numeric Data Types" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Data_Types_RealLife.md b/10_Wiki/Dev/Topic_C/C_Data_Types_RealLife.md new file mode 100644 index 00000000..3774af30 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Data_Types_RealLife.md @@ -0,0 +1,67 @@ +--- +id: c-data-types-reallife +title: "C Data Types Examples" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["real-life data types", "total cost calculation", "C 데이터 타입 실전 예제"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "data-types", "real-life-example"] +raw_sources: ["https://www.w3schools.com/c/c_data_types_reallife.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Data Types Examples]] + +## 🎯 한 줄 통찰 (One-line insight) +This example combines THREE distinct techniques from earlier chapters into one realistic calculation — `int`×`float` multiplication implicitly producing a `float` result (`total_cost`), the `%.2f` precision control from the Decimal Precision chapter, and a `char` currency symbol printed alongside — showing that real-world numeric code is rarely a single-type operation but a composition of the type/precision/character lessons taught separately. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Mixed-type arithmetic** — multiplying an `int` (`items`) by a `float` (`cost_per_item`) and storing the result in a `float` (`total_cost`). [S1] +- **Precision-controlled currency output** — using `%.2f` to show exactly two decimal places for monetary values, paired with a `char` currency symbol. [S1] +- **Calculate-then-print pattern reused** — the total is computed once and stored in a variable before being printed, consistent with the earlier Variables RealLife chapter's rectangle-area pattern. [S1] + +## 📖 세부 내용 (Details) +- Full calculation and display: `int items = 50; float cost_per_item = 9.99; float total_cost = items * cost_per_item; char currency = '$'; printf("Number of items: %d\n", items); printf("Cost per item: %.2f %c\n", cost_per_item, currency); printf("Total cost = %.2f %c\n", total_cost, currency);`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 수량(int)×단가(float)로 총 비용을 계산하고 통화 기호(char)와 함께 소수점 둘째 자리까지 출력하는 이 예제 자체가 영수증/가격 계산 UI의 실전 활용 사례다. [S1] + +## 💻 코드 패턴 (Code patterns) +Combining int, float, and char types with precision control for a currency calculation (C): +```c +int items = 50; +float cost_per_item = 9.99; +float total_cost = items * cost_per_item; +char currency = '$'; +printf("Total cost = %.2f %c\n", total_cost, currency); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Data Types Sizeof]], [[C Data Types Dec]], [[C Constants]] +- **참조 맥락:** 데이터 타입 섹션 마지막 — 상수 및 저장 클래스(Constants & Storage) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Data Types Examples — https://www.w3schools.com/c/c_data_types_reallife.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Data Types Examples" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Data_Types_Sizeof.md b/10_Wiki/Dev/Topic_C/C_Data_Types_Sizeof.md new file mode 100644 index 00000000..da5dbd1a --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Data_Types_Sizeof.md @@ -0,0 +1,69 @@ +--- +id: c-data-types-sizeof +title: "C The sizeof Operator" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["sizeof operator", "%zu", "size_t", "C sizeof 연산자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "sizeof", "memory"] +raw_sources: ["https://www.w3schools.com/c/c_data_types_sizeof.php"] +applied_in: [] +github_commit: "" +--- + +# [[C The sizeof Operator]] + +## 🎯 한 줄 통찰 (One-line insight) +`sizeof` doesn't return a plain `int` — it returns `size_t`, an unsigned integer type — so printing it with `%d` "might work on some computers" but is explicitly called out as unsafe/non-portable, meaning the correct specifier `%zu` isn't just a style preference but a genuine portability requirement for code that needs to run correctly across different systems. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`sizeof`** — an operator (not a function, syntactically) that returns the number of bytes a type or variable occupies in memory. [S1] +- **`size_t`** — the unsigned integer type `sizeof` actually returns, requiring the `%zu` format specifier for safe/portable printing (not `%d`). [S1] +- **Practical memory-usage reasoning** — a 1000-element `char` array (1 byte each) occupies exactly 1000 bytes (1 KB), directly connecting type size to real memory footprint. [S1] +- **Motivation** — choosing the right data type for the right purpose saves memory and improves performance, especially in larger programs or memory-constrained environments. [S1] + +## 📖 세부 내용 (Details) +- Basic usage on variables: `int myInt; printf("%zu\n", sizeof(myInt));`. [S1] +- Portability warning: using `%d` instead of `%zu` "might work on some computers" but `%zu` is "safer and more portable" since it matches `size_t`'s actual unsigned type. [S1] +- Memory-footprint reasoning: "if you have an array of 1000 char values, it will occupy 1000 bytes (1 KB) of memory" — 1 byte per char × 1000 elements. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **%d 대신 %zu를 써야 하는 이유**: sizeof가 반환하는 size_t는 부호 없는 정수형이라, %d로 출력하면 일부 컴퓨터에서는 우연히 동작할 수 있어도 이식성이 떨어진다는 점이 명확히 경고됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 1000개짜리 char 배열이 정확히 1KB를 차지한다는 계산이 메모리 제약 환경에서 타입 크기를 실전적으로 따져보는 대표 사례다. [S1] + +## 💻 코드 패턴 (Code patterns) +Correctly printing sizeof() results using the %zu specifier, not %d (C): +```c +int myInt; +float myFloat; +printf("%zu\n", sizeof(myInt)); +printf("%zu\n", sizeof(myFloat)); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Data Types Extended]], [[C Data Types RealLife]], [[C Fixed Width Ints]] +- **참조 맥락:** sizeof 연산자 — 데이터 타입 실전 예제(Data Types RealLife) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C The sizeof Operator — https://www.w3schools.com/c/c_data_types_sizeof.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C The sizeof Operator" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Date_Time.md b/10_Wiki/Dev/Topic_C/C_Date_Time.md new file mode 100644 index 00000000..e85d2252 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Date_Time.md @@ -0,0 +1,72 @@ +--- +id: c-date-time +title: "C Date and Time" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["time.h", "struct tm", "strftime", "C 날짜와 시간"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "date-time", "time.h"] +raw_sources: ["https://www.w3schools.com/c/c_date_time.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Date and Time]] + +## 🎯 한 줄 통찰 (One-line insight) +`struct tm`'s year and month fields are BOTH offset in ways that will silently produce wrong output if you forget to correct them — `tm_year` counts years SINCE 1900 (so you must add 1900 to get the real year) and `tm_mon` is zero-indexed (0 = January, so you must add 1 for a human-readable month) — two unrelated offset conventions bundled into the same struct that both require manual correction before display. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`time(&var)` / `time(NULL)`** — retrieves the current time as a `time_t` value. [S1] +- **`ctime(&time_t_value)`** — converts a raw `time_t` into a human-readable string (e.g. "Mon Jun 24 10:15:00 2025"). [S1] +- **`localtime(&time_t_value)`** — converts a `time_t` into a `struct tm` POINTER, breaking the time into separate fields (year/month/day/hour/minute/second); accessed via `->` since it's a pointer, per the earlier Structs & Pointers rule. [S1] +- **`tm_year` offset** — stores years SINCE 1900; must add 1900 for the actual calendar year. [S1] +- **`tm_mon` offset** — zero-indexed (0=January, 11=December); must add 1 for the conventional 1-12 month number. [S1] +- **`strftime(buffer, size, format, tm_ptr)`** — formats a `struct tm` into a custom string layout (e.g. `"%d-%m-%Y %H:%M:%S"`), writing into a caller-provided buffer. [S1] + +## 📖 세부 내용 (Details) +- Getting and printing the current time as a readable string: `time_t currentTime; time(¤tTime); printf("Current time: %s", ctime(¤tTime));`. [S1] +- Breaking time into fields with the required offset corrections: `time_t now = time(NULL); struct tm *t = localtime(&now); printf("Year: %d\n", t->tm_year + 1900); printf("Month: %d\n", t->tm_mon + 1); printf("Day: %d\n", t->tm_mday);`. [S1] +- Custom-formatted timestamp: `char buffer[100]; strftime(buffer, sizeof(buffer), "%d-%m-%Y %H:%M:%S", t); printf("Formatted time: %s\n", buffer);`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **tm_year와 tm_mon의 오프셋 함정**: tm_year는 1900년 기준 경과 연수이므로 실제 연도를 얻으려면 1900을 더해야 하고, tm_mon은 0부터 시작(0=1월)하므로 실제 월을 얻으려면 1을 더해야 한다는 점이 각각 별개의 주의사항으로 명시됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 로그 기록, 파일/메시지에 타임스탬프 추가, 실행 시간 측정, 난수 시드 설정 등이 날짜/시간 라이브러리의 대표 활용 목적으로 원문에 직접 나열됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Breaking the current time into fields with the mandatory offset corrections (C): +```c +#include +time_t now = time(NULL); +struct tm *t = localtime(&now); +printf("Year: %d\n", t->tm_year + 1900); // tm_year counts from 1900 +printf("Month: %d\n", t->tm_mon + 1); // tm_mon is 0-indexed +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C User Input]], [[C Structs Pointers]], [[C Random Numbers]], [[C Errors]] +- **참조 맥락:** 사용자 입력 및 날짜 섹션 마지막 — 에러 및 디버깅(Errors & Debugging) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Date and Time — https://www.w3schools.com/c/c_date_time.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Date and Time" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Debugging.md b/10_Wiki/Dev/Topic_C/C_Debugging.md new file mode 100644 index 00000000..fe11646e --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Debugging.md @@ -0,0 +1,75 @@ +--- +id: c-debugging +title: "C Debugging" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["print debugging", "breakpoints", "debugging vs error handling", "C 디버깅"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "debugging"] +raw_sources: ["https://www.w3schools.com/c/c_debugging.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Debugging]] + +## 🎯 한 줄 통찰 (One-line insight) +The chapter's closing distinction reframes debugging and error handling as two DIFFERENT PHASES of the same concern, not competing techniques: debugging is about finding/fixing mistakes DURING DEVELOPMENT, while error handling is about gracefully responding to problems WHILE THE PROGRAM RUNS in production — meaning a well-built C program needs both, applied at different times, not one instead of the other. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Print debugging** — sprinkling `printf()` calls to trace how far execution gets before something goes wrong; if an expected message never prints, the crash happened before that line. [S1] +- **Checking variable values** — printing intermediate results to catch LOGIC errors (e.g. expecting 15 but getting 5 reveals a wrong operator, not a crash). [S1] +- **IDE debuggers** — breakpoints, line-by-line stepping, and variable-watching, available in IDEs like Visual Studio/Code::Blocks/VS Code; recommended as a step UP from `printf()` debugging once comfortable with the basics. [S1] +- **Reading error messages literally** — the compiler/runtime often states exactly what's wrong and where (e.g. `expected ';' before 'printf'` → the fix is adding the missing semicolon). [S1] +- **Defensive checks preventing crashes** — proactively checking conditions that are KNOWN to cause crashes (e.g. `if (y != 0)` before dividing, `if (index >= 0 && index < 3)` before array access) converts a crash into a graceful error message. [S1] + +## 📖 세부 내용 (Details) +- Print debugging locating a crash point: `printf("Before division\n"); int z = x / y; printf("After division\n");` — if "After division" never prints, the crash happened at the division. [S1] +- Logic-error detection via variable printing: `int result = x - y; printf("Result: %d\n", result); // Result: 5 (expected 15 — wrong operator used)`. [S1] +- Preventing a divide-by-zero crash with a defensive check: `if (y != 0) { int z = x / y; printf("Result: %d\n", z); } else { printf("Error: Division by zero!\n"); }`. [S1] +- Preventing an out-of-bounds crash with a defensive check: `if (index >= 0 && index < 3) { printf("Value = %d\n", numbers[index]); } else { printf("Error: Index out of bounds!\n"); }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **디버깅과 에러 처리는 서로 다른 단계**: 디버깅은 개발 중 버그를 찾고 고치는 활동이고, 에러 처리는 프로그램이 실제로 실행되는 중 문제에 대응하는 것이라는 점이 명확히 구분되며, 둘 다 필요하다는 점이 결론으로 제시됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +0으로 나누기와 배열 범위 초과 접근이라는 두 가지 대표적 크래시 상황을 사전 조건 검사로 방지하는 방법이 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Preventing a division-by-zero crash with a defensive check instead of a printf-based fix (C): +```c +int x = 10; +int y = 0; +if (y != 0) { + int z = x / y; + printf("Result: %d\n", z); +} else { + printf("Error: Division by zero!\n"); +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Input Validation]], [[C Errors]], [[C Files]] +- **참조 맥락:** 에러 및 디버깅 섹션 마지막 — 파일 입출력(Files) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Debugging — https://www.w3schools.com/c/c_debugging.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Debugging" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Do_While_Loop.md b/10_Wiki/Dev/Topic_C/C_Do_While_Loop.md new file mode 100644 index 00000000..47505c72 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Do_While_Loop.md @@ -0,0 +1,70 @@ +--- +id: c-do-while-loop +title: "C Do/While Loop" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["do while", "at-least-once loop", "scanf input validation loop", "C do-while 반복문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "loops", "do-while"] +raw_sources: ["https://www.w3schools.com/c/c_do_while_loop.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Do/While Loop]] + +## 🎯 한 줄 통찰 (One-line insight) +The core difference from a regular `while` loop isn't cosmetic syntax — it's WHEN the condition is checked: `do/while` runs the body FIRST and evaluates the condition only AFTER, guaranteeing at least one execution even if the condition is false from the very start (`int i = 10; do {...} while (i < 5);` still runs once), which is exactly the opposite of the plain `while` loop's zero-iteration behavior shown in the previous chapter. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`do { ... } while (condition);`** — executes the block ONCE unconditionally, then checks the condition to decide whether to repeat. [S1] +- **Guaranteed first execution** — unlike `while`, the body runs at least once even if the condition is false immediately. [S1] +- **Use case: "at least once" behavior** — ideal for scenarios like showing a message or prompting for user input, where the action must happen before any condition can even be evaluated. [S1] +- **Input-validation pattern** — repeatedly prompting via `scanf()` until the user provides a value that fails the loop condition (e.g. entering 0 or negative to stop). [S1] + +## 📖 세부 내용 (Details) +- Standard case (condition true at start): `int i = 0; do { printf("%d\n", i); i++; } while (i < 5);`. [S1] +- Guaranteed-once case (condition false at start): `int i = 10; do { printf("i is %d\n", i); i++; } while (i < 5);` — still prints once despite `i < 5` being false immediately. [S1] +- Practical input-validation loop: `int number; do { printf("Enter a positive number: "); scanf("%d", &number); } while (number > 0);` — keeps prompting until 0 or a negative number is entered. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **do/while은 조건과 무관하게 최소 1회 실행**: 일반 while 루프는 조건이 처음부터 거짓이면 아예 실행되지 않지만, do/while은 조건이 거짓이어도 반드시 한 번은 실행된다는 점이 직접 대비되어 강조됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +사용자로부터 양수를 입력받되 0이나 음수가 입력될 때까지 반복해서 물어보는 입력 검증 루프가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +An input-validation loop that must prompt at least once before checking the exit condition (C): +```c +int number; +do { + printf("Enter a positive number: "); + scanf("%d", &number); +} while (number > 0); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C While Loop RealLife]], [[C For Loop]], [[C User Input]] +- **참조 맥락:** while 루프의 변형 — for 루프(For Loop) 챕터로 이어짐, 사용자 입력(User Input) 챕터와 연결. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Do/While Loop — https://www.w3schools.com/c/c_do_while_loop.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Do/While Loop" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Enums.md b/10_Wiki/Dev/Topic_C/C_Enums.md new file mode 100644 index 00000000..f64ae1c1 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Enums.md @@ -0,0 +1,73 @@ +--- +id: c-enums +title: "C Enumeration (enum)" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["enum keyword", "named constants", "C 열거형"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "enums"] +raw_sources: ["https://www.w3schools.com/c/c_enums.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Enumeration (enum)]] + +## 🎯 한 줄 통찰 (One-line insight) +Assigning an explicit value to just ONE enum item cascades forward — `enum Level { LOW = 5, MEDIUM, HIGH };` gives `MEDIUM` the value 6 and `HIGH` the value 7 automatically, without being written explicitly — meaning enum numbering isn't independently assigned per item by default; each unlabeled item simply continues incrementing from whatever the PRECEDING item's value was. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`enum`** — a type representing a group of named, unchangeable constants ("specifically listed" values). [S1] +- **Default numbering** — the first item is 0, the second 1, and so on, unless overridden. [S1] +- **Forward-cascading custom values** — setting one item's value shifts all SUBSEQUENT unlabeled items to continue counting up from it. [S1] +- **Enum as an int under the hood** — printing an enum variable with `%d` shows its underlying integer value, enabling direct use in `switch` statements matched against those integers. [S1] +- **`typedef` with enum** — eliminates needing to write `enum` before the type name every time a variable is declared, a pure readability/brevity improvement. [S1] + +## 📖 세부 내용 (Details) +- Default numbering: `enum Level { LOW, MEDIUM, HIGH }; enum Level myVar = MEDIUM; printf("%d", myVar); // 1`. [S1] +- Fully custom values: `enum Level { LOW = 25, MEDIUM = 50, HIGH = 75 };`. [S1] +- Cascading from one custom value: `enum Level { LOW = 5, MEDIUM, HIGH };` — MEDIUM becomes 6, HIGH becomes 7. [S1] +- Enum used in a switch: `enum Level myVar = MEDIUM; switch (myVar) { case 1: ... case 2: ... case 3: ... }` (matching against LOW=1, MEDIUM=2, HIGH=3). [S1] +- typedef shortcut: `typedef enum {MON, TUE, WED, THU, FRI, SAT, SUN} Day; Day today = WED;` instead of `enum Day today = WED;`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **하나의 값 지정이 이후 항목까지 연쇄적으로 영향**: LOW = 5로 지정하면 뒤따르는 MEDIUM, HIGH는 명시하지 않아도 자동으로 6, 7이 된다는 점이 명확히 확인됨 — 각 항목이 독립적으로 0부터 재시작하는 것이 아님. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +요일(Day)이나 월과 같이 절대 변하지 않는 값 집합에 enum을 사용하는 것이 실전 활용의 대표 사례로 원문에 직접 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Setting one enum value causes subsequent items to cascade forward from it (C): +```c +enum Level { + LOW = 5, + MEDIUM, // Now 6 + HIGH // Now 7 +}; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Structs Pointers]], [[C Switch]], [[C Unions]], [[C Typedef]] +- **참조 맥락:** 열거형 — 유니온(Unions) 챕터로 이어짐, typedef 챕터와 직접 연결. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Enumeration (enum) — https://www.w3schools.com/c/c_enums.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Enumeration (enum)" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Error_Handling.md b/10_Wiki/Dev/Topic_C/C_Error_Handling.md new file mode 100644 index 00000000..2274c794 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Error_Handling.md @@ -0,0 +1,78 @@ +--- +id: c-error-handling +title: "C Error Handling" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["perror strerror errno", "exit EXIT_FAILURE", "C 에러 처리"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "error-handling", "errno"] +raw_sources: ["https://www.w3schools.com/c/c_error_handling.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Error Handling]] + +## 🎯 한 줄 통찰 (One-line insight) +C has NO try/catch mechanism at all — the source states this directly — meaning every error-handling technique in this chapter (checking for `NULL` returns, `perror()`, `strerror(errno)`, comparing `errno` to constants like `ENOENT`) is a WORKAROUND built from ordinary control flow (if-statements and return values), not a language feature, which is why disciplined manual NULL-checking after every risky operation is non-negotiable in C in a way it isn't in exception-based languages. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **No built-in exceptions** — C lacks try/catch; error handling relies on return values, global error codes (`errno`), and helper functions. [S1] +- **NULL-return checking** — many functions (like `fopen()`) return `NULL` on failure; checking with `if (ptr == NULL)` is the primary detection mechanism. [S1] +- **`perror(message)`** — prints a custom message plus a system-provided description of the last error. [S1] +- **`errno` + `strerror(errno)`** — `errno` (from ``) holds the last failed operation's error code; `strerror()` converts it to a readable string. [S1] +- **Named error constants** — `ENOENT` (no such file/directory), `EACCES` (permission denied), `ENOMEM` (out of memory), `EINVAL` (invalid argument) — allow branching on the SPECIFIC failure reason. [S1] +- **`exit(code)`** — immediately terminates the program with a status code; `0`/`EXIT_SUCCESS` means success, non-zero/`EXIT_FAILURE` signals an error to the OS. [S1] + +## 📖 세부 내용 (Details) +- Basic NULL check: `FILE *fptr = fopen("nothing.txt", "r"); if (fptr == NULL) { printf("Error opening file.\n"); return 1; }`. [S1] +- Detailed error via `perror()`: `perror("Error opening file"); // "Error opening file: No such file or directory"`. [S1] +- Branching on a specific error code: `if (errno == ENOENT) { printf("The file was not found.\n"); } else { printf("Some other file error occurred.\n"); }`. [S1] +- Exiting cleanly with readable status constants: `if (f == NULL) { perror("Could not open nothing.txt"); exit(EXIT_FAILURE); } return EXIT_SUCCESS;`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C에는 try/catch가 없음**: 다른 언어와 달리 예외 처리 메커니즘이 아예 없고, 반환값·errno·perror()/strerror() 같은 도구를 조합해 직접 에러를 감지하고 대응해야 한다는 점이 명시적으로 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +존재하지 않는 파일(nothing.txt)을 열려는 시도가 실패하는 상황을 NULL 체크, perror(), strerror(errno), errno 비교, exit() 등 다섯 가지 방식으로 반복 제시하며 각 기법의 실전 활용을 직접 보여줌. [S1] + +## 💻 코드 패턴 (Code patterns) +Detecting a specific error condition via errno and reporting it with a custom message (C): +```c +#include +FILE *f = fopen("nothing.txt", "r"); +if (f == NULL) { + if (errno == ENOENT) { + printf("The file was not found.\n"); + } else { + printf("Some other file error occurred.\n"); + } + return 1; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Errors]], [[C Null]], [[C Input Validation]] +- **참조 맥락:** 에러 처리 — 입력 검증(Input Validation) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Error Handling — https://www.w3schools.com/c/c_error_handling.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Error Handling" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Errors.md b/10_Wiki/Dev/Topic_C/C_Errors.md new file mode 100644 index 00000000..8316e9ed --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Errors.md @@ -0,0 +1,69 @@ +--- +id: c-errors +title: "C Errors" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["compile-time vs runtime errors", "use-after-free", "C 에러"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "errors"] +raw_sources: ["https://www.w3schools.com/c/c_errors.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Errors]] + +## 🎯 한 줄 통찰 (One-line insight) +The three runtime error examples (divide-by-zero, out-of-bounds array access, use-after-free) all share a common trait the source doesn't state explicitly but demonstrates through selection: NONE of them are caught by the compiler — all three compile cleanly and only misbehave when actually EXECUTED — meaning C's compile-time checking is fundamentally limited to syntax/type issues, while logic and memory-safety issues are entirely the programmer's responsibility to prevent at runtime. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Compile-time errors** — prevent the program from compiling at all; e.g. missing semicolon, undeclared variable, mismatched types (assigning a string literal to an `int`). [S1] +- **Runtime errors** — the program compiles successfully but crashes or misbehaves when RUN; e.g. division by zero, out-of-bounds array access, using memory after `free()`. [S1] +- **Use-after-free** — reading `*ptr` after `free(ptr)` is explicitly labeled "undefined behavior," not a guaranteed crash — meaning it might appear to work sometimes, making it a particularly dangerous class of bug. [S1] +- **Good habits** — always initialize variables, use meaningful names, keep indentation clean, keep functions short/focused, verify loop/condition behavior, and read error messages carefully (they often pinpoint the exact problem). [S1] + +## 📖 세부 내용 (Details) +- Missing semicolon (compile-time): `int x = 5 printf("%d", x);` → `error: expected ',' or ';' before 'printf'`. [S1] +- Type mismatch (compile-time): `int x = "Hello";` → `error: initialization makes integer from pointer without a cast`. [S1] +- Use-after-free (runtime, undefined behavior): `int* ptr = malloc(sizeof(int)); *ptr = 10; free(ptr); printf("%d\n", *ptr); // accessing freed memory`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **해제된 메모리 접근은 "미정의 동작"**: free() 이후 포인터를 읽는 것이 항상 크래시로 이어지는 것이 아니라 "undefined behavior"로 명시되어, 우연히 정상 동작하는 것처럼 보일 수도 있어 더 위험하다는 점이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 컴파일 타임 에러 3종과 런타임 에러 3종을 나란히 대비시킨 것이 두 에러 범주의 근본적 차이를 이해하는 실전 학습 자료로 활용된다. [S1] + +## 💻 코드 패턴 (Code patterns) +Using memory after it's been freed — compiles fine, but is undefined behavior at runtime (C): +```c +int* ptr = malloc(sizeof(int)); +*ptr = 10; +free(ptr); +printf("%d\n", *ptr); // Undefined behavior - accessing memory that was freed +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Date Time]], [[C Memory Deallocate]], [[C Error Handling]] +- **참조 맥락:** 에러 섹션 첫 챕터 — 에러 처리(Error Handling) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Errors — https://www.w3schools.com/c/c_errors.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Errors" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Files.md b/10_Wiki/Dev/Topic_C/C_Files.md new file mode 100644 index 00000000..17a5a7c2 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Files.md @@ -0,0 +1,70 @@ +--- +id: c-files +title: "C Files" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["fopen fclose", "file mode", "C 파일 핸들링"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "files", "fopen"] +raw_sources: ["https://www.w3schools.com/c/c_files.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Files]] + +## 🎯 한 줄 통찰 (One-line insight) +Opening a file in write mode (`"w"`) doubles as CREATING it — if `"filename.txt"` doesn't already exist, `fopen(filename, "w")` silently creates a brand new empty file instead of failing, meaning "open for writing" and "create if missing" are the same operation in C's file model, not two separate steps a program must handle. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`FILE *fptr`** — a pointer to the special `FILE` data type, required to work with any file operations. [S1] +- **`fopen(filename, mode)`** — opens (or creates) a file; returns a `FILE*` pointer used for all subsequent operations on it. [S1] +- **Three basic modes** — `"w"` (write; creates the file if it doesn't exist), `"a"` (append new data), `"r"` (read). [S1] +- **`fclose(fptr)`** — closes the file, ensuring changes are saved, freeing it for other programs, and releasing unnecessary memory. [S1] +- **Absolute paths need escaped backslashes** — Windows paths like `C:\directoryname\filename.txt` must be written `"C:\\directoryname\\filename.txt"` in C string literals, per the earlier Strings Escape chapter's `\\` rule. [S1] + +## 📖 세부 내용 (Details) +- Creating (or opening for writing) a file: `FILE *fptr; fptr = fopen("filename.txt", "w"); fclose(fptr);`. [S1] +- Creating a file at an absolute Windows path with escaped backslashes: `fptr = fopen("C:\\directoryname\\filename.txt", "w");`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **"w" 모드는 쓰기와 생성을 동시에 수행**: 파일이 존재하지 않아도 fopen(filename, "w")가 실패하지 않고 새 파일을 만들어준다는 점이 명시적으로 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — fclose()를 반드시 호출해 변경사항 저장/메모리 정리/다른 프로그램의 파일 사용을 보장하는 것이 실전 파일 작업의 필수 관행으로 강조된다. [S1] + +## 💻 코드 패턴 (Code patterns) +Opening (and implicitly creating) a file, then closing it (C): +```c +FILE *fptr; +// Create a file (or open it for writing) +fptr = fopen("filename.txt", "w"); +// Close the file +fclose(fptr); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Debugging]], [[C Strings Esc]], [[C Files Read]] +- **참조 맥락:** 파일 섹션 첫 챕터 — 파일 읽기(Files Read) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Files — https://www.w3schools.com/c/c_files.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Files" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Files_Read.md b/10_Wiki/Dev/Topic_C/C_Files_Read.md new file mode 100644 index 00000000..ddeb1923 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Files_Read.md @@ -0,0 +1,76 @@ +--- +id: c-files-read +title: "C Read Files" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["fgets file reading", "read multiple lines", "C 파일 읽기"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "files", "fgets"] +raw_sources: ["https://www.w3schools.com/c/c_files_read.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Read Files]] + +## 🎯 한 줄 통찰 (One-line insight) +A single `fgets()` call only reads ONE LINE, not the whole file — the source's own example proves it by showing "filename.txt" has two lines but only "Hello World!" prints from one call, and the fix (wrapping `fgets()` in a `while` loop) works because `fgets()` naturally returns falsy/NULL once it hits end-of-file, making the loop condition double as the "keep reading until there's nothing left" check with no separate end-of-file test needed. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`fopen(filename, "r")`** — opens a file specifically for reading. [S1] +- **`fgets(buffer, maxSize, fptr)`** — reads UP TO `maxSize` characters (or until a newline) from `fptr` into `buffer`; reads only ONE line per call. [S1] +- **`while (fgets(...))` pattern** — repeatedly calling `fgets()` inside a `while` loop reads the ENTIRE file line by line; the loop naturally stops once `fgets()` reaches end-of-file (returns a falsy value). [S1] +- **NULL-check for missing files** — `fopen()` returns `NULL` if the file doesn't exist for reading; checking `if (fptr == NULL)` before use prevents crashes. [S1] + +## 📖 세부 내용 (Details) +- Reading only the FIRST line (a common early mistake): `FILE *fptr = fopen("filename.txt", "r"); char myString[100]; fgets(myString, 100, fptr); printf("%s", myString); // only "Hello World!", missing the second line`. [S1] +- Reading the ENTIRE file with a while loop: `while(fgets(myString, 100, fptr)) { printf("%s", myString); } // prints both "Hello World!" and "Hi everybody!"`. [S1] +- Combining NULL-checking with the full-file read pattern: `if(fptr != NULL) { while(fgets(myString, 100, fptr)) { printf("%s", myString); } } else { printf("Not able to open the file."); }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **fgets 한 번 호출로는 첫 줄만 읽힘**: 파일에 여러 줄이 있어도 fgets()를 한 번만 호출하면 첫 줄만 읽힌다는 점이 직접 비교 예제로 증명되며, 전체 파일을 읽으려면 while 루프로 감싸야 한다는 해법이 제시됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +파일이 존재하지 않을 경우 NULL을 체크해 "파일을 열 수 없습니다" 메시지를 출력하는 안전한 파일 읽기 패턴이 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Safely reading an entire file line by line, with a NULL check for missing files (C): +```c +FILE *fptr; +fptr = fopen("filename.txt", "r"); +char myString[100]; +if (fptr != NULL) { + while (fgets(myString, 100, fptr)) { + printf("%s", myString); + } +} else { + printf("Not able to open the file."); +} +fclose(fptr); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Files]], [[C User Input]], [[C Files Write]] +- **참조 맥락:** 파일 읽기 — 파일 쓰기(Files Write) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Read Files — https://www.w3schools.com/c/c_files_read.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Read Files" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Files_Write.md b/10_Wiki/Dev/Topic_C/C_Files_Write.md new file mode 100644 index 00000000..6b9f4130 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Files_Write.md @@ -0,0 +1,68 @@ +--- +id: c-files-write +title: "C Write To Files" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["fprintf", "write vs append mode", "C 파일 쓰기"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "files", "fprintf"] +raw_sources: ["https://www.w3schools.com/c/c_files_write.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Write To Files]] + +## 🎯 한 줄 통찰 (One-line insight) +Opening an EXISTING file in `"w"` mode silently DESTROYS its entire prior content the moment `fopen()` succeeds — not when you write, just from opening — the source explicitly warns "you might accidentally erase existing content," meaning `"w"` mode is fundamentally destructive/overwrite-only, and `"a"` (append) exists as the ONLY mode that preserves existing content while adding to it. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`fprintf(fptr, text)`** — writes formatted text to the file pointed to by `fptr`, the file-writing analog of `printf()`. [S1] +- **`"w"` mode is destructive** — opening an existing file for writing immediately discards its old content, even before any `fprintf()` call. [S1] +- **`"a"` (append) mode** — adds new content to the END of the file WITHOUT deleting what's already there. [S1] +- **`"a"` also creates missing files** — just like `"w"`, appending to a non-existent file creates it fresh with the appended content as its initial content. [S1] + +## 📖 세부 내용 (Details) +- Writing (and overwriting) content: `fptr = fopen("filename.txt", "w"); fprintf(fptr, "Some text"); fclose(fptr);` — then reopening with `"w"` again and writing `"Hello World!"` COMPLETELY replaces "Some text". [S1] +- Appending without erasing prior content: `fptr = fopen("filename.txt", "a"); fprintf(fptr, "\nHi everybody!"); fclose(fptr);` — preserves whatever was already in the file. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **"w" 모드는 열자마자 기존 내용을 지움**: 이미 존재하는 파일을 "w" 모드로 열면 새 내용을 쓰기 전에 이미 기존 내용이 사라진다는 점이 명시적으로 경고되며, 실수로 기존 데이터를 날릴 수 있다는 주의사항이 강조됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +"Some text"를 쓴 뒤 같은 파일을 다시 "w" 모드로 열어 "Hello World!"로 덮어쓰는 예제가 기존 내용이 완전히 사라지는 것을 직접 보여주는 실전 경고 사례다. [S1] + +## 💻 코드 패턴 (Code patterns) +Appending to a file without erasing its existing content (C): +```c +FILE *fptr; +fptr = fopen("filename.txt", "a"); // append mode preserves existing content +fprintf(fptr, "\nHi everybody!"); +fclose(fptr); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Files Read]], [[C Files]], [[C Type Conversion]] +- **참조 맥락:** 파일 섹션 마지막 — 타입 변환 및 매크로(Type Conversion & Macros) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Write To Files — https://www.w3schools.com/c/c_files_write.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Write To Files" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Fixed_Width_Ints.md b/10_Wiki/Dev/Topic_C/C_Fixed_Width_Ints.md new file mode 100644 index 00000000..81091baa --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Fixed_Width_Ints.md @@ -0,0 +1,72 @@ +--- +id: c-fixed-width-ints +title: "C Fixed Width Integers" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["stdint.h", "int32_t uint8_t", "C 고정폭 정수"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "fixed-width-integers", "stdint"] +raw_sources: ["https://www.w3schools.com/c/c_fixed_width_ints.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Fixed Width Integers]] + +## 🎯 한 줄 통찰 (One-line insight) +The battery-level example makes the case concrete: since a percentage is always 0-100, using a plain `int` (likely 4 bytes) instead of `uint8_t` (exactly 1 byte) wastes 3 bytes per value for NO benefit — fixed-width types aren't just about portability, they're a deliberate memory-fit-to-range decision that a generic `int` habit obscures. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **The portability problem** — `int`, `short`, `long` sizes vary by system/compiler (e.g. `int` might be 2 bytes on one system, 4 on another). [S1] +- **`` fixed-width types** — `int8_t`/`uint8_t` (1 byte), `int16_t`/`uint16_t` (2 bytes), `int32_t`/`uint32_t` (4 bytes), `int64_t`/`uint64_t` (8 bytes) — guaranteed identical size on every system. [S1] +- **`u` prefix meaning** — unsigned; doubles the maximum positive range compared to the signed version, at the cost of no negative values. [S1] +- **When they matter** — embedded/microcontroller systems, file formats requiring exact byte layouts, and network data exchange needing consistent results across machines. [S1] +- **When they don't matter** — for most everyday programs, a normal `int` is sufficient; fixed-width types are a deliberate choice for specific constraints, not a default habit. [S1] + +## 📖 세부 내용 (Details) +- Declaring across all four sizes: `int8_t a = 100; int16_t b = 30000; int32_t c = 2000000; int64_t d = 9000000000;` printed with `%d`/`%d`/`%d`/`%lld` respectively. [S1] +- Battery-level real-life example: `uint8_t battery = 87; printf("Battery level is %u out of 100\n", battery);` — a value naturally bounded 0-255 fits exactly in 1 byte. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **고정폭 타입은 일상 프로그래밍에는 불필요**: 대부분의 프로그램에서는 일반 int로 충분하며, 고정폭 타입은 임베디드 시스템/파일 포맷/네트워크 통신처럼 정확한 크기가 중요한 특수 상황에서만 필요하다는 점이 명시됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +배터리 잔량(0-100%)처럼 값의 범위가 명확히 제한된 경우 uint8_t를 사용해 메모리를 절약하는 것이 실전 임베디드 프로그래밍의 대표 활용 사례로 원문에 직접 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Using a 1-byte fixed-width type for a value with a known bounded range (C): +```c +#include +#include +int main() { + uint8_t battery = 87; // battery level percentage, fits in 1 byte + printf("Battery level is %u out of 100\n", battery); + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Storage Classes]], [[C Data Types Extended]], [[C Operators]] +- **참조 맥락:** 상수 및 저장 클래스 섹션 마지막 — 연산자(Operators) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Fixed Width Integers — https://www.w3schools.com/c/c_fixed_width_ints.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Fixed Width Integers" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_For_Loop.md b/10_Wiki/Dev/Topic_C/C_For_Loop.md new file mode 100644 index 00000000..fe4e5ae1 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_For_Loop.md @@ -0,0 +1,71 @@ +--- +id: c-for-loop +title: "C For Loop" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["for statement", "three-expression loop", "C for 반복문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "loops", "for-loop"] +raw_sources: ["https://www.w3schools.com/c/c_for_loop.php"] +applied_in: [] +github_commit: "" +--- + +# [[C For Loop]] + +## 🎯 한 줄 통찰 (One-line insight) +The source frames the `for` vs `while` choice as a matter of KNOWING the iteration count in advance — "when you know exactly how many times you want to loop... use the for loop instead of a while loop" — meaning `for` isn't a functionally different tool from `while` (a `for` loop can always be rewritten as a `while`), it's a structural convention that bundles initialization, condition, and increment into one line specifically for the fixed-count use case. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`for (expr1; expr2; expr3) { ... }`** — expr1 runs once before the loop starts; expr2 is the continuation condition checked each iteration; expr3 runs after each iteration's body. [S1] +- **Fixed-count use case** — the recommended tool when the number of iterations is known ahead of time, unlike `while`'s open-ended condition-driven repetition. [S1] +- **Flexible step expressions** — expr3 isn't limited to `++`; any increment/decrement/step size works (`i = i + 2`, `i--`, etc.). [S1] + +## 📖 세부 내용 (Details) +- Basic counting: `int i; for (i = 0; i < 5; i++) { printf("%d\n", i); }` — prints 0 to 4. [S1] +- Custom step size for evens: `int i; for (i = 0; i <= 10; i = i + 2) { printf("%d\n", i); }`. [S1] +- Accumulating a sum across iterations: `int sum = 0; int i; for (i = 1; i <= 5; i++) { sum = sum + i; } printf("Sum is %d", sum);`. [S1] +- Countdown via decrement: `int i; for (i = 5; i > 0; i--) { printf("%d\n", i); }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +1부터 5까지의 합을 for 루프로 누적 계산하는 예제(sum = sum + i)가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Accumulating a running total across for-loop iterations (C): +```c +int sum = 0; +int i; +for (i = 1; i <= 5; i++) { + sum = sum + i; +} +printf("Sum is %d", sum); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Do While Loop]], [[C For Loop Nested]], [[C For Loop RealLife]] +- **참조 맥락:** for 루프 — 중첩 for 루프(For Loop Nested) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C For Loop — https://www.w3schools.com/c/c_for_loop.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C For Loop" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_For_Loop_Nested.md b/10_Wiki/Dev/Topic_C/C_For_Loop_Nested.md new file mode 100644 index 00000000..fc3d1f3b --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_For_Loop_Nested.md @@ -0,0 +1,73 @@ +--- +id: c-for-loop-nested +title: "C Nested Loops" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["inner outer loop", "multiplication table", "C 중첩 반복문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "loops", "nested-loops"] +raw_sources: ["https://www.w3schools.com/c/c_for_loop_nested.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Nested Loops]] + +## 🎯 한 줄 통찰 (One-line insight) +The inner loop's total execution count MULTIPLIES with the outer loop's — the source explicitly annotates a 2-iteration outer loop paired with a 3-iteration inner loop as running the inner body "6 times (2 * 3)," not 2+3=5 — meaning nested loop cost grows multiplicatively, not additively, which is directly why nested loops are the natural fit for 2D structures like tables and matrices where total cells = rows × columns. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Nested loop** — a loop placed entirely inside another loop's body; the inner loop runs to completion once for EVERY single iteration of the outer loop. [S1] +- **Multiplicative execution count** — total inner-body executions = (outer iterations) × (inner iterations per outer iteration), not their sum. [S1] +- **Natural fit for 2D data** — tables, matrices, and multi-dimensional structures map naturally onto outer-loop-as-rows, inner-loop-as-columns. [S1] + +## 📖 세부 내용 (Details) +- Basic nesting with explicit iteration-count annotation: `for (i = 1; i <= 2; ++i) { printf("Outer: %d\n", i); for (j = 1; j <= 3; ++j) { printf(" Inner: %d\n", j); } }` — outer runs 2 times, inner runs 6 times total (2×3). [S1] +- Multiplication table via nested loops: `for (i = 1; i <= 3; i++) { for (j = 1; j <= 3; j++) { printf("%d ", i * j); } printf("\n"); }` — produces a 3×3 grid: `1 2 3 / 2 4 6 / 3 6 9`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **중첩 루프의 실행 횟수는 곱셈**: 바깥 루프 2회 × 안쪽 루프 3회 = 안쪽 코드 총 6회 실행이라는 점이 원문에서 직접 명시되어, 덧셈이 아닌 곱셈 관계임이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +3x3 구구단표를 중첩 for 루프로 출력하는 예제가 원문에서 직접 실전 활용 사례로 제시되며, 표/행렬 같은 2차원 데이터 구조에 중첩 루프가 자연스럽게 맞는다는 점이 강조됨. [S1] + +## 💻 코드 패턴 (Code patterns) +A multiplication table built from two nested for loops (C): +```c +int i, j; +for (i = 1; i <= 3; i++) { + for (j = 1; j <= 3; j++) { + printf("%d ", i * j); + } + printf("\n"); +} +// 1 2 3 +// 2 4 6 +// 3 6 9 +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C For Loop]], [[C For Loop RealLife]], [[C Arrays Multi]] +- **참조 맥락:** 중첩 for 루프 — for 루프 실전 예제(For Loop RealLife) 챕터로 이어짐, 다차원 배열(Arrays Multi) 챕터와 연결. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Nested Loops — https://www.w3schools.com/c/c_for_loop_nested.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Nested Loops" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_For_Loop_RealLife.md b/10_Wiki/Dev/Topic_C/C_For_Loop_RealLife.md new file mode 100644 index 00000000..5d547ac2 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_For_Loop_RealLife.md @@ -0,0 +1,69 @@ +--- +id: c-for-loop-reallife +title: "C For Loop Examples" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["powers of 2", "multiplication table generator", "C for 루프 실전 예제"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "loops", "for-loop", "real-life-example"] +raw_sources: ["https://www.w3schools.com/c/c_for_loop_reallife.php"] +applied_in: [] +github_commit: "" +--- + +# [[C For Loop Examples]] + +## 🎯 한 줄 통찰 (One-line insight) +The powers-of-2 example (`for (i = 2; i <= 512; i *= 2)`) shows the third `for` expression isn't limited to addition or subtraction — MULTIPLICATIVE stepping works identically, meaning the "increment expression" slot in a for loop is really just "any expression that changes the loop variable," and the loop condition (`i <= 512`) naturally still governs when it stops regardless of HOW the variable changes each time. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Additive stepping by an arbitrary amount** — `i += 10` steps by tens; not restricted to `i++`/`i--`. [S1] +- **Multiplicative stepping** — `i *= 2` doubles the value each iteration, producing powers of 2 rather than an arithmetic sequence. [S1] +- **Parameterized multiplication table** — using a variable (`number`) instead of a hardcoded value lets the SAME loop generate any number's table. [S1] + +## 📖 세부 내용 (Details) +- Counting by tens: `for (i = 0; i <= 100; i += 10) { printf("%d\n", i); }`. [S1] +- Odd numbers only: `for (i = 1; i < 10; i = i + 2) { printf("%d\n", i); }`. [S1] +- Powers of 2 via multiplicative stepping: `for (i = 2; i <= 512; i *= 2) { printf("%d\n", i); }` — 2, 4, 8, 16, ..., 512. [S1] +- Parameterized multiplication table: `int number = 2; int i; for (i = 1; i <= 10; i++) { printf("%d x %d = %d\n", number, i, number * i); }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **증가식은 곱셈도 가능**: for 루프의 세 번째 표현식이 i++나 i+=N 뿐 아니라 i *= 2처럼 곱셈으로도 구성될 수 있다는 점이 확인되며, 2의 거듭제곱 수열 생성에 활용됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +2의 거듭제곱을 512까지 출력하는 예제와, 임의의 숫자(number 변수)에 대한 구구단표를 생성하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Multiplicative stepping in a for loop to generate powers of 2 (C): +```c +for (i = 2; i <= 512; i *= 2) { + printf("%d\n", i); +} +// 2, 4, 8, 16, 32, 64, 128, 256, 512 +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C For Loop Nested]], [[C Break Continue]] +- **참조 맥락:** for 루프 실전 예제 — break/continue 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C For Loop Examples — https://www.w3schools.com/c/c_for_loop_reallife.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C For Loop Examples" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Functions.md b/10_Wiki/Dev/Topic_C/C_Functions.md new file mode 100644 index 00000000..dfc8a7a6 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Functions.md @@ -0,0 +1,74 @@ +--- +id: c-functions +title: "C Functions" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["void function", "function call", "C 함수"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "functions"] +raw_sources: ["https://www.w3schools.com/c/c_functions.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Functions]] + +## 🎯 한 줄 통찰 (One-line insight) +The source reveals that `main()` and `printf()` — the two things every C beginner types on day one — are ALREADY functions, meaning the concept being "introduced" in this chapter isn't new at all; the learner has been using functions the entire tutorial without a name for it, and this chapter is really just formalizing vocabulary for a pattern already internalized. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Function** — a block of code that only runs when explicitly CALLED, not automatically at declaration time. [S1] +- **`void` return type** — indicates the function returns no value (covered in more depth in the Parameters chapter). [S1] +- **Declaration vs. execution timing** — declaring a function only "saves it for later use"; nothing inside runs until it's called. [S1] +- **Repeatable calls** — the same function can be called multiple times, each execution independent. [S1] +- **Code reuse motivation** — "define the code once, and use it many times" is the core justification for functions. [S1] + +## 📖 세부 내용 (Details) +- Calling the same function three times: `void myFunction() { printf("I just got executed!"); } int main() { myFunction(); myFunction(); myFunction(); return 0; }` — prints the message three times. [S1] +- A function performing a fixed calculation: `void calculateSum() { int x = 5; int y = 10; int sum = x + y; printf("The sum of x + y is: %d", sum); }` — explicitly noted as LIMITED since x/y are hardcoded, motivating the next chapter's parameters. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — main()과 printf() 자체가 이미 함수라는 사실을 상기시키는 것이 이 챕터의 핵심 실전 통찰이다. [S1] + +## 💻 코드 패턴 (Code patterns) +Calling the same function multiple times (C): +```c +void myFunction() { + printf("I just got executed!"); +} +int main() { + myFunction(); + myFunction(); + myFunction(); + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Memory RealLife]], [[C Functions Decl]] +- **참조 맥락:** 함수 섹션 첫 챕터 — 함수 선언과 정의(Functions Decl) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Functions — https://www.w3schools.com/c/c_functions.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Functions" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Functions_Callback.md b/10_Wiki/Dev/Topic_C/C_Functions_Callback.md new file mode 100644 index 00000000..e2689fc3 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Functions_Callback.md @@ -0,0 +1,75 @@ +--- +id: c-functions-callback +title: "C Callback Functions" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["callback pattern", "qsort callback", "C 콜백 함수"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "functions", "callbacks", "qsort"] +raw_sources: ["https://www.w3schools.com/c/c_functions_callback.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Callback Functions]] + +## 🎯 한 줄 통찰 (One-line insight) +`qsort()` — a real C standard library function, not a toy example — proves that callbacks aren't merely a teaching device but the actual mechanism the STANDARD LIBRARY itself relies on: `qsort()` has no idea how to compare YOUR specific data, so it delegates that decision entirely to a `compare()` function you supply, meaning the library's generic sorting algorithm and your data-specific comparison logic stay completely decoupled. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Callback function** — a function passed AS AN ARGUMENT to another function, which then calls it back whenever needed; implemented in C via function pointers. [S1] +- **Decoupling logic from control flow** — the RECEIVING function (`runCallback`, `calculate`, `greet`) doesn't need to know the callback's name in advance; it just needs a matching function-pointer type. [S1] +- **Parameter-matching requirement** — a callback with parameters requires the function pointer TYPE in the receiving function's signature to match exactly (`void (*callback)(int, int)`). [S1] +- **Real standard-library usage: `qsort()`** — from ``; you supply a `compare()` function, and `qsort()` calls it internally as many times as needed while sorting. [S1] + +## 📖 세부 내용 (Details) +- Basic callback with before/after wrapping: `void runCallback(void (*callback)()) { printf("Before calling the callback...\n"); callback(); printf("After calling the callback.\n"); } runCallback(sayHello);`. [S1] +- Callback with parameters: `void calculate(void (*callback)(int, int), int x, int y) { callback(x, y); } calculate(addNumbers, 5, 3);`. [S1] +- Real-world `qsort()` usage with a user-supplied comparator: `int compare(const void *a, const void *b) { return (*(int*)a - *(int*)b); } qsort(numbers, size, sizeof(int), compare);`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +표준 라이브러리의 qsort() 함수가 사용자 정의 compare() 콜백을 받아 정렬 기준을 위임받는 것이 콜백 패턴의 실제 실전 활용 사례로 원문에 직접 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Using a user-supplied comparison callback with the standard library's qsort() (C): +```c +#include +int compare(const void *a, const void *b) { + return (*(int*)a - *(int*)b); +} +int main() { + int numbers[] = { 5, 2, 9, 1, 7 }; + int size = sizeof(numbers) / sizeof(numbers[0]); + qsort(numbers, size, sizeof(int), compare); + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Functions Pointers]], [[C Functions Inline]], [[C Scope]] +- **참조 맥락:** 콜백 함수 — 인라인 함수(Functions Inline) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Callback Functions — https://www.w3schools.com/c/c_functions_callback.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Callback Functions" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Functions_Decl.md b/10_Wiki/Dev/Topic_C/C_Functions_Decl.md new file mode 100644 index 00000000..8137acc6 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Functions_Decl.md @@ -0,0 +1,83 @@ +--- +id: c-functions-decl +title: "C Function Declaration and Definition" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["function prototype", "forward declaration", "C 함수 선언과 정의"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "functions", "function-declaration"] +raw_sources: ["https://www.w3schools.com/c/c_functions_decl.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Function Declaration and Definition]] + +## 🎯 한 줄 통찰 (One-line insight) +Separating a function's DECLARATION (name/return-type/parameters) from its DEFINITION (actual body) is what allows `main()` to call a function that's physically written BELOW it in the source file — without a forward declaration above `main()`, the compiler would encounter the function call before ever having seen what that function even looks like, since C reads files top to bottom. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Declaration** — the function's name, return type, and parameters ONLY, ending in a semicolon (`void myFunction();`), with no body. [S1] +- **Definition** — the function's actual body/implementation. [S1] +- **Recommended file layout** — declarations placed ABOVE `main()`, definitions placed BELOW `main()`, for organization and readability. [S1] +- **Enables forward reference** — a function can be called from `main()` even though its full definition appears later in the file, as long as its declaration appeared earlier. [S1] +- **Functions calling other functions** — as long as both are DECLARED first, one function's body can call another function that's defined elsewhere in the file. [S1] + +## 📖 세부 내용 (Details) +- Declaration-above, definition-below pattern: `void myFunction(); int main() { myFunction(); return 0; } void myFunction() { printf("I just got executed!"); }`. [S1] +- Same pattern with parameters and a return value: `int myFunction(int x, int y); int main() { int result = myFunction(5, 3); ... } int myFunction(int x, int y) { return x + y; }`. [S1] +- One function calling another, both pre-declared: `void myFunction(); void myOtherFunction(); int main() { myFunction(); return 0; } void myFunction() { printf("Some text in myFunction\n"); myOtherFunction(); } void myOtherFunction() { printf("Hey! Some text in myOtherFunction\n"); }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 함수 선언을 main() 위에, 정의를 아래에 두는 구조가 대부분의 C 프로그램에서 표준적으로 쓰이는 코드 조직 방식이라고 원문에 명시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Declaring functions above main() and defining them below, allowing one to call the other (C): +```c +// Function declarations +void myFunction(); +void myOtherFunction(); + +int main() { + myFunction(); + return 0; +} + +// Function definitions +void myFunction() { + printf("Some text in myFunction\n"); + myOtherFunction(); // calling another function +} +void myOtherFunction() { + printf("Hey! Some text in myOtherFunction\n"); +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Functions]], [[C Functions Parameters]] +- **참조 맥락:** 함수 선언과 정의 — 함수 매개변수(Functions Parameters) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Function Declaration and Definition — https://www.w3schools.com/c/c_functions_decl.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Function Declaration and Definition" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Functions_Inline.md b/10_Wiki/Dev/Topic_C/C_Functions_Inline.md new file mode 100644 index 00000000..98b085c8 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Functions_Inline.md @@ -0,0 +1,72 @@ +--- +id: c-functions-inline +title: "C Inline Function" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["inline keyword", "code bloat", "C 인라인 함수"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "functions", "inline"] +raw_sources: ["https://www.w3schools.com/c/c_functions_inline.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Inline Function]] + +## 🎯 한 줄 통찰 (One-line insight) +`inline` is merely a SUGGESTION, not a command — the compiler decides whether to actually inline the function regardless of the keyword, and the source explicitly warns that overusing it causes "code bloat" (larger, sometimes SLOWER programs) precisely because inlining trades a tiny call-overhead savings for duplicated code at every call site, a trade that only pays off for small, frequently-called functions. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`inline` keyword** — a hint asking the compiler to paste the function's code directly at each call site instead of jumping to a separate function call. [S1] +- **Purely a performance hint** — behaves functionally identically to a regular function; the ONLY potential difference is compiled performance/size, never program logic. [S1] +- **Best suited for small, frequently-called functions** — the call-overhead savings only outweighs code duplication when the function body is tiny and called often. [S1] +- **When to avoid inline** — large functions (bloats the binary), recursive functions (can't sensibly be pasted infinitely), rarely-called functions (no meaningful benefit). [S1] +- **Code bloat** — the risk of overusing `inline`: too many inlined functions make the program BIGGER and can even make it SLOWER overall, the opposite of the intended optimization. [S1] + +## 📖 세부 내용 (Details) +- Regular vs inline version of the same function, functionally identical: `int square(int x) { return x * x; }` versus `inline int square(int x) { return x * x; }`. [S1] +- Compiler potentially replacing a call with its literal computation: `inline int add(int a, int b) { return a + b; } printf("%d", add(5, 3));` — the compiler MIGHT replace `add(5, 3)` directly with `5 + 3`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **inline은 강제가 아니라 힌트**: inline 키워드를 붙여도 실제로 인라인 처리할지는 컴파일러가 최종 결정하며, 너무 많이 사용하면 오히려 프로그램이 더 커지고 느려지는 "코드 블로트" 문제가 생길 수 있다는 점이 명시적으로 경고됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 이 튜토리얼 자체는 이후에도 계속 일반 함수(regular function)를 사용하겠다고 명시하며, inline은 초보자가 자주 쓸 필요는 없다고 밝힘. [S1] + +## 💻 코드 패턴 (Code patterns) +A small, frequently-called function marked inline as a performance hint (C): +```c +inline int add(int a, int b) { + return a + b; +} +int main() { + printf("%d", add(5, 3)); // compiler may replace this with 5 + 3 directly + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Functions Callback]], [[C Scope]] +- **참조 맥락:** 함수 섹션 마지막 — 스코프(Scope) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Inline Function — https://www.w3schools.com/c/c_functions_inline.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Inline Function" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Functions_Parameters.md b/10_Wiki/Dev/Topic_C/C_Functions_Parameters.md new file mode 100644 index 00000000..a2be0477 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Functions_Parameters.md @@ -0,0 +1,77 @@ +--- +id: c-functions-parameters +title: "C Function Parameters" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["parameters vs arguments", "return values", "C 함수 매개변수"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "functions", "parameters", "return-values"] +raw_sources: ["https://www.w3schools.com/c/c_functions_parameters.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Function Parameters]] + +## 🎯 한 줄 통찰 (One-line insight) +Passing an array to a function only requires the ARRAY NAME at the call site (`myFunction(myNumbers)`), but the function's own parameter declaration must still spell out the full array type (`int myNumbers[5]`) — an asymmetry that follows directly from the earlier Pointers-and-Arrays insight that an array name is already a pointer to its first element, so the "argument" being passed really is just that one address, while the parameter declaration exists purely to tell the function how to interpret what's at that address. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Parameter vs. argument** — a parameter is the variable name INSIDE the function signature; an argument is the actual value passed at the CALL site (e.g. `name` is the parameter, `"Liam"` is the argument). [S1] +- **Multiple parameters** — comma-separated in the signature; the call must supply the SAME NUMBER of arguments, IN THE SAME ORDER. [S1] +- **Passing arrays** — call site uses just the array name; the function signature still needs the full array declaration (`int myNumbers[5]`). [S1] +- **Return values via a real return type** — replacing `void` with a type (e.g. `int`) plus a `return` statement lets the function hand back a computed value instead of just performing an action. [S1] +- **Storing results in arrays** — when many result variables would otherwise be needed, storing each function call's result into an array element keeps the code manageable. [S1] + +## 📖 세부 내용 (Details) +- Single string parameter reused across calls: `void myFunction(char name[]) { printf("Hello %s\n", name); } myFunction("Liam"); myFunction("Jenny");`. [S1] +- Passing an array (name-only at call site, full type in signature): `void myFunction(int myNumbers[5]) { for (int i = 0; i < 5; i++) { printf("%d\n", myNumbers[i]); } } int myNumbers[5] = {10,20,30,40,50}; myFunction(myNumbers);`. [S1] +- Returning a value instead of void: `int myFunction(int x, int y) { return x + y; } int result = myFunction(5, 3); // 8`. [S1] +- Storing multiple call results into an array: `resultArr[0] = calculateSum(5, 3); resultArr[1] = calculateSum(8, 2); ...`. [S1] +- Real-life Fahrenheit-to-Celsius conversion: `float toCelsius(float fahrenheit) { return (5.0 / 9.0) * (fahrenheit - 32.0); }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **인자 개수와 순서는 반드시 일치해야 함**: 여러 매개변수를 사용할 때 함수 호출의 인자 개수가 매개변수 개수와 같아야 하고 순서도 동일해야 한다는 점이 명시적으로 강조됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +화씨를 섭씨로 변환하는 toCelsius() 함수가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +A real-life function converting Fahrenheit to Celsius, returning a computed value (C): +```c +float toCelsius(float fahrenheit) { + return (5.0 / 9.0) * (fahrenheit - 32.0); +} +int main() { + float f_value = 98.8; + float result = toCelsius(f_value); + printf("Convert Fahrenheit to Celsius: %.2f\n", result); + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Functions Decl]], [[C Pointers Arrays]], [[C Functions Recursion]] +- **참조 맥락:** 함수 매개변수와 반환값 — 재귀(Functions Recursion) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Function Parameters — https://www.w3schools.com/c/c_functions_parameters.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Function Parameters" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Functions_Pointers.md b/10_Wiki/Dev/Topic_C/C_Functions_Pointers.md new file mode 100644 index 00000000..4dbbfcf8 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Functions_Pointers.md @@ -0,0 +1,78 @@ +--- +id: c-functions-pointers +title: "C Function Pointer" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["pointer to function", "function pointer array", "C 함수 포인터"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "functions", "function-pointers"] +raw_sources: ["https://www.w3schools.com/c/c_functions_pointers.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Function Pointer]] + +## 🎯 한 줄 통찰 (One-line insight) +A function's NAME already acts as a pointer to its own code, even before you declare any explicit function-pointer variable — `ptr = add;` and `ptr = &add;` are shown to be IDENTICAL, meaning `add` (bare, no parentheses) is already an address in the same sense `&myAge` was an address for a variable, and declaring `int (*ptr)(int, int)` just gives you a variable that can hold, reassign, and pass around that already-existing address. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Function pointer declaration** — `returnType (*pointerName)(paramType1, paramType2, ...);` (parentheses around `*pointerName` are required). [S1] +- **Assignment equivalence** — `ptr = add;` and `ptr = &add;` do the same thing, since a function's name is already its address. [S1] +- **Call equivalence** — `ptr(5, 3);` and `(*ptr)(5, 3);` both correctly call the pointed-to function. [S1] +- **Choosing behavior at RUNTIME** — unlike a normal function call (fixed at compile time), a function pointer lets the program decide WHICH function to run while it's already executing. [S1] +- **Function pointer array** — storing multiple function pointers in one array (`void (*operations[3])() = {add, subtract, multiply};`) enables selecting a function by INDEX, e.g. from user input, powering menus/calculators. [S1] + +## 📖 세부 내용 (Details) +- Basic function pointer declaration, assignment, and call: `int add(int a, int b) { return a + b; } int (*ptr)(int, int) = add; int result = ptr(5, 3); // same as add(5,3)`. [S1] +- Passing a function pointer as an argument (a callback): `void greet(void (*func)()) { func(); } greet(greetMorning); greet(greetEvening);`. [S1] +- A calculator selecting among functions by user-entered index: `void (*operations[3])(int, int) = { add, subtract, multiply }; scanf("%d", &choice); operations[choice](x, y);`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **함수 이름은 이미 포인터**: ptr = add와 ptr = &add가 완전히 동일하게 작동한다는 점에서, 함수 이름 자체가 이미 메모리상 코드 시작 주소를 가리키는 포인터 역할을 하고 있음이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +사용자가 숫자를 입력해 덧셈/뺄셈/곱셈 중 하나를 선택하는 계산기 예제가 원문에서 직접 실전 활용 사례로 제시됨(함수 포인터 배열 + scanf 조합). [S1] + +## 💻 코드 패턴 (Code patterns) +Selecting which function to run at runtime via a function pointer array indexed by user input (C): +```c +void add(int a, int b) { printf("Result: %d\n", a + b); } +void subtract(int a, int b) { printf("Result: %d\n", a - b); } +void multiply(int a, int b) { printf("Result: %d\n", a * b); } +int main() { + int choice, x = 10, y = 5; + void (*operations[3])(int, int) = { add, subtract, multiply }; + scanf("%d", &choice); + if (choice >= 0 && choice < 3) { + operations[choice](x, y); + } + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Functions Recursion]], [[C Pointers]], [[C Functions Callback]] +- **참조 맥락:** 함수 포인터 — 콜백 함수(Functions Callback) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Function Pointer — https://www.w3schools.com/c/c_functions_pointers.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Function Pointer" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Functions_Recursion.md b/10_Wiki/Dev/Topic_C/C_Functions_Recursion.md new file mode 100644 index 00000000..37ebb2dc --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Functions_Recursion.md @@ -0,0 +1,72 @@ +--- +id: c-functions-recursion +title: "C Recursion" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["recursive function", "base case", "factorial recursion", "C 재귀"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "functions", "recursion"] +raw_sources: ["https://www.w3schools.com/c/c_functions_recursion.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Recursion]] + +## 🎯 한 줄 통찰 (One-line insight) +Every recursive function in the source's examples relies on a single structural guarantee: the function ONLY calls itself when a shrinking condition still holds (`k > 0`, `n > 0`, `n > 1`) and returns a plain value OTHERWISE — the source's own warning that recursion "can be quite easy to slip into writing a function which never terminates" is really pointing at what happens if that shrinking condition is missing or wrong, not at recursion itself being inherently risky. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Recursion** — a function calling ITSELF, breaking a complex problem into smaller instances of the same problem. [S1] +- **Base case** — the condition under which the function STOPS calling itself and returns directly (e.g. `k > 0` becoming false), essential for termination. [S1] +- **Unwinding accumulation** — each recursive call's `return` combines its own contribution with the result of the smaller sub-call (`return k + sum(k - 1);`), building up the final answer as calls return in reverse order. [S1] +- **Risk of non-termination or excess resource use** — without a solid base case, recursion can run forever or exhaust memory/processor time. [S1] + +## 📖 세부 내용 (Details) +- Summing 1 to 10 via recursion: `int sum(int k) { if (k > 0) { return k + sum(k - 1); } else { return 0; } }` — unfolds as `10 + (9 + (8 + ... + sum(0)))`. [S1] +- Countdown via recursion: `void countdown(int n) { if (n > 0) { printf("%d ", n); countdown(n - 1); } }` — stops calling itself once `n` reaches 0. [S1] +- Factorial via recursion: `int factorial(int n) { if (n > 1) { return n * factorial(n - 1); } else { return 1; } }` — factorial(5) = 5×4×3×2×1 = 120; by definition 0! is also 1. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **재귀의 종료 조건이 핵심 위험 요소**: 종료되지 않는 함수나 과도한 메모리/CPU를 쓰는 함수를 실수로 작성하기 쉽다는 경고가 있지만, 이는 결국 축소 조건(base case)이 없거나 잘못됐을 때 발생하는 문제임이 예제들에서 공통적으로 드러남. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +5의 팩토리얼(5×4×3×2×1=120)을 재귀로 계산하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +A recursive function with a clear base case that guarantees termination (C): +```c +int factorial(int n) { + if (n > 1) { + return n * factorial(n - 1); + } else { + return 1; // base case + } +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Functions Parameters]], [[C Memory Allocate]], [[C Functions Pointers]] +- **참조 맥락:** 재귀 — 함수 포인터(Functions Pointers) 챕터로 이어짐, 스택 메모리(Memory Allocate 챕터의 스택 오버플로우 개념)와 연결. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Recursion — https://www.w3schools.com/c/c_functions_recursion.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Recursion" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Get_Started.md b/10_Wiki/Dev/Topic_C/C_Get_Started.md new file mode 100644 index 00000000..f10cc249 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Get_Started.md @@ -0,0 +1,71 @@ +--- +id: c-get-started +title: "C Get Started" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["installing C", "Code::Blocks", "gcc setup", "C 시작하기"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "setup", "ide"] +raw_sources: ["https://www.w3schools.com/c/c_getstarted.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Get Started]] + +## 🎯 한 줄 통찰 (One-line insight) +Unlike interpreted languages covered elsewhere in this wiki (Python, PHP, JavaScript), C requires a genuinely separate COMPILATION step before execution — the source explicitly frames the whole beginner workflow as "you wrote C code, the compiler turned it into a program, and the computer ran it," meaning even the simplest C setup inherently involves an editor AND a compiler as two distinct required tools, not one interpreter. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Two required tools** — a text editor to write code, and a COMPILER to translate C source into machine code the computer can run directly. [S1] +- **IDE as a bundle** — an IDE (e.g. Code::Blocks, Eclipse, Visual Studio) packages both editor and compiler together, and typically adds error-finding help. [S1] +- **`.c` file extension** — C source files must always end in `.c`. [S1] +- **Web-based editors** — W3Schools' own online editor works without installation but the source notes such tools "often have limited features" compared to a full IDE. [S1] +- **Multi-step build workflow** — write code → Build and Run → compiler translates → OS executes the resulting program, distinct from an interpreted run-immediately model. [S1] + +## 📖 세부 내용 (Details) +- Minimal Hello World used for setup verification: `#include int main() { printf("Hello World!"); return 0; }`. [S1] +- Recommended beginner IDE: Code::Blocks, downloaded via the `mingw-setup.exe` installer which bundles both editor and compiler (MinGW). [S1] +- Expected successful output after Build & Run: `Hello World! Process returned 0 (0x0) execution time : 0.011 s Press any key to continue.`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **웹 기반 에디터의 한계**: 설치 없이 시작할 수 있는 온라인 에디터는 편리하지만 기능이 제한적이라는 점이 명시적으로 언급됨 — 실제 프로젝트에는 로컬 IDE 설치를 권장. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — Code::Blocks + MinGW 조합으로 편집기와 컴파일러를 한 번에 설치하는 것이 실전 초보자 환경 구축의 대표 방법이다. [S1] + +## 💻 코드 패턴 (Code patterns) +The verification program used to confirm a working compiler setup (C): +```c +#include +int main() { + printf("Hello World!"); + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Intro]], [[C Syntax]] +- **참조 맥락:** 개발 환경 설정 — 문법(Syntax) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Get Started — https://www.w3schools.com/c/c_getstarted.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Get Started" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Input_Validation.md b/10_Wiki/Dev/Topic_C/C_Input_Validation.md new file mode 100644 index 00000000..8753b233 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Input_Validation.md @@ -0,0 +1,75 @@ +--- +id: c-input-validation +title: "C Input Validation" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["validate number range", "sscanf validation", "C 입력 검증"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "input-validation", "scanf", "sscanf"] +raw_sources: ["https://www.w3schools.com/c/c_input_validation.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Input Validation]] + +## 🎯 한 줄 통찰 (One-line insight) +The integer-validation example doesn't use `scanf()` directly to detect bad input — it reads the RAW LINE with `fgets()` first, then tries to parse it with `sscanf()` and checks whether that parse SUCCEEDED (`== 1`), meaning robust validation in C separates "getting text from the user" from "trying to interpret that text as a number," rather than trusting `scanf()`'s own format-matching to gracefully reject non-numeric input. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Range validation via a do-while loop** — repeatedly prompt until the entered value falls within an allowed range; `while (getchar() != '\n');` clears any leftover characters in the input buffer after `scanf()`. [S1] +- **Empty-text validation** — read with `fgets()`, strip the trailing newline (`name[strcspn(name, "\n")] = 0;`), then loop while the resulting string length is 0. [S1] +- **Integer-format validation** — read the raw line as a STRING via `fgets()`, then attempt `sscanf(input, "%d", &number)`; if it returns `1` (one successful conversion), the input was a valid integer — otherwise, prompt again. [S1] +- **Buffer-clearing necessity** — leftover characters (like an unconsumed newline) in the input stream after `scanf()` can silently corrupt the NEXT read unless explicitly cleared. [S1] + +## 📖 세부 내용 (Details) +- Range-bounded input with buffer clearing: `do { printf("Choose a number between 1 and 5: "); scanf("%d", &number); while (getchar() != '\n'); } while (number < 1 || number > 5);`. [S1] +- Rejecting empty text input: `do { fgets(name, sizeof(name), stdin); name[strcspn(name, "\n")] = 0; } while (strlen(name) == 0);`. [S1] +- Validating that input is actually an integer via sscanf's return value: `while (fgets(input, sizeof(input), stdin)) { if (sscanf(input, "%d", &number) == 1) { break; } else { printf("Invalid input. Try again: "); } }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **문자열로 먼저 읽고 sscanf로 파싱을 검증하는 전략**: scanf()로 직접 숫자를 받는 대신 fgets()로 원문을 통째로 받은 뒤 sscanf()의 반환값(성공한 변환 개수)을 확인하는 방식이 잘못된 입력을 더 안전하게 걸러낸다는 점이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +1~5 범위의 숫자 선택, 빈 이름 거부, 문자가 아닌 정수만 허용하는 세 가지 검증 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Validating that user input is actually an integer using fgets() + sscanf()'s return value (C): +```c +int number; +char input[100]; +printf("Enter a number: "); +while (fgets(input, sizeof(input), stdin)) { + if (sscanf(input, "%d", &number) == 1) { + break; // valid integer + } else { + printf("Invalid input. Try again: "); + } +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Error Handling]], [[C User Input]], [[C Debugging]] +- **참조 맥락:** 입력 검증 — 디버깅(Debugging) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Input Validation — https://www.w3schools.com/c/c_input_validation.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Input Validation" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Intro.md b/10_Wiki/Dev/Topic_C/C_Intro.md new file mode 100644 index 00000000..4acf0fb6 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Intro.md @@ -0,0 +1,69 @@ +--- +id: c-intro +title: "C Introduction" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["what is c", "C vs C++", "C 소개"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "intro"] +raw_sources: ["https://www.w3schools.com/c/c_intro.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Intro]] + +## 🎯 한 줄 통찰 (One-line insight) +The source frames C's core value proposition as a LEARNING INVESTMENT, not just a language choice — "if you know C, you will have no problem learning other popular programming languages such as Java, Python, C++, C#" — positioning C's tight syntax and manual memory model as the shared ancestor whose concepts transfer forward into most mainstream languages. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Origin** — created by Dennis Ritchie at Bell Labs in 1972; closely tied to UNIX since much of UNIX itself was written in C. [S1] +- **Primary domains** — operating systems, embedded devices, performance-critical software (databases, system tools), game engines/graphics, and core libraries underlying other languages. [S1] +- **Multiple language standards** — C90, C99, C11, C17, and newer; the tutorial focuses on modern widely-supported C and flags standard-specific differences when relevant. [S1] +- **C vs C++** — C++ is an extension of C; C is primarily procedural (function-based), while C++ adds classes/objects for object-oriented programming — but C can still organize data via structs and scale to large programs without C++'s added features. [S1] + +## 📖 세부 내용 (Details) +- Minimal working example: `#include int main() { char name[] = "John"; printf("Hello %s", name); return 0; }` producing `Hello John`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C도 대규모 프로그램이 가능하다는 점**: C++이 클래스라는 추가 기능을 얹은 것뿐이며, C만으로도 구조체를 이용해 데이터를 조직하고 큰 프로그램을 만들 수 있다는 점이 명시적으로 강조됨(C가 단순히 "작은 프로그램용"이라는 오해를 교정). [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — Windows/Linux/macOS의 일부, 자동차·TV 등 임베디드 기기, 게임 엔진 등이 원문에서 언급된 C의 대표적 실전 활용 분야다. [S1] + +## 💻 코드 패턴 (Code patterns) +Minimal C program printing a formatted greeting: +```c +#include +int main() { + char name[] = "John"; + printf("Hello %s", name); + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Get Started]], [[C Syntax]] +- **참조 맥락:** C 튜토리얼 첫 챕터 — 개발 환경 설정(Get Started) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Introduction — https://www.w3schools.com/c/c_intro.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Introduction" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Macros.md b/10_Wiki/Dev/Topic_C/C_Macros.md new file mode 100644 index 00000000..7713cf7d --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Macros.md @@ -0,0 +1,73 @@ +--- +id: c-macros +title: "C Preprocessor and Macros" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["#define", "#ifdef", "conditional compilation", "C 전처리기와 매크로"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "preprocessor", "macros"] +raw_sources: ["https://www.w3schools.com/c/c_macros.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Preprocessor and Macros]] + +## 🎯 한 줄 통찰 (One-line insight) +`#define PI 3.14` doesn't create a variable at all — the preprocessor performs a pure TEXT REPLACEMENT of every literal occurrence of `PI` with `3.14` BEFORE the compiler ever sees the code, meaning macros exist in an entirely different phase from variables/constants (which are compiled), which is also why parameterized macros like `SQUARE(x)` need careful parenthesization — they're substituting raw text, not evaluating an expression with real function-call semantics. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Preprocessor** — runs BEFORE actual compilation; handles directives (lines starting with `#`) like including files and defining macros. [S1] +- **`#include`** — angle brackets `< >` for standard libraries, double quotes `" "` for your own header files. [S1] +- **`#define NAME value`** — creates a macro; every literal occurrence of `NAME` in the code is textually replaced with `value` before compilation. [S1] +- **Parameterized macros** — `#define SQUARE(x) ((x) * (x))` behaves like a function shortcut, but is really TEXT SUBSTITUTION, so careful parenthesization is required to avoid operator-precedence mistakes. [S1] +- **`#ifdef` / `#ifndef`** — conditional compilation; includes or skips code blocks depending on whether a macro is defined, useful for debug builds or program variants. [S1] + +## 📖 세부 내용 (Details) +- Basic value macro: `#define PI 3.14 int main() { printf("Value of PI: %.2f\n", PI); return 0; }`. [S1] +- Parameterized macro: `#define SQUARE(x) ((x) * (x)) printf("Square of 4: %d\n", SQUARE(4));`. [S1] +- Conditional compilation gated on a defined macro: `#define DEBUG int main() { #ifdef DEBUG printf("Debug mode is ON\n"); #endif return 0; }` — if `DEBUG` were undefined, that block would be skipped entirely. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **매크로는 변수가 아니라 텍스트 치환**: #define PI 3.14는 컴파일 전에 코드상의 PI를 문자 그대로 3.14로 바꿔치기하는 전처리 단계 작업이며, 변수나 상수처럼 컴파일되는 개념이 아니라는 점이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +DEBUG 매크로가 정의되어 있을 때만 디버그 메시지를 출력하는 조건부 컴파일이 원문에서 직접 실전 활용 사례로 제시됨(디버깅이나 프로그램 버전 분기에 유용). [S1] + +## 💻 코드 패턴 (Code patterns) +Conditional compilation — code included only if a macro is defined (C): +```c +#define DEBUG +int main() { + #ifdef DEBUG + printf("Debug mode is ON\n"); + #endif + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Type Conversion]], [[C Organize Code]], [[C Null]] +- **참조 맥락:** 전처리기와 매크로 — NULL(Null) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Preprocessor and Macros — https://www.w3schools.com/c/c_macros.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Preprocessor and Macros" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Math.md b/10_Wiki/Dev/Topic_C/C_Math.md new file mode 100644 index 00000000..442b3eef --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Math.md @@ -0,0 +1,69 @@ +--- +id: c-math +title: "C Math Functions" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["math.h", "sqrt ceil floor pow", "C 수학 함수"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "math", "math.h"] +raw_sources: ["https://www.w3schools.com/c/c_math.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Math Functions]] + +## 🎯 한 줄 통찰 (One-line insight) +`ceil()` and `floor()` both return a `float`/`double`, NOT an `int` — printing `ceil(1.4)` with `%f` still shows a decimal-formatted result (`2.000000`), meaning "rounding" in C's math library doesn't convert the value to an integer type; it just replaces the fractional part while preserving the floating-point representation, so further formatting or casting is still the caller's job. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **``** — required header for math functions beyond basic arithmetic operators. [S1] +- **`sqrt(x)`** — returns the square root of `x`. [S1] +- **`ceil(x)`** — rounds UP to the nearest integer value (still returned as a float/double). [S1] +- **`floor(x)`** — rounds DOWN to the nearest integer value (still returned as a float/double). [S1] +- **`pow(x, y)`** — returns x raised to the power of y (xʸ). [S1] + +## 📖 세부 내용 (Details) +- Square root: `printf("%f", sqrt(16));`. [S1] +- Rounding up vs down on the same value: `printf("%f", ceil(1.4)); printf("%f", floor(1.4));` — ceil gives 2.000000, floor gives 1.000000. [S1] +- Exponentiation: `printf("%f", pow(4, 3));` — 4³ = 64. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — sqrt/ceil/floor/pow는 게임 로직이나 그래픽 계산 등에서 흔히 결합해 쓰이는 기본 수학 함수 집합이다. [S1] + +## 💻 코드 패턴 (Code patterns) +Rounding up and down, both still returned as floating-point values (C): +```c +#include +printf("%f", ceil(1.4)); // 2.000000 +printf("%f", floor(1.4)); // 1.000000 +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Strings Functions]], [[C Random Numbers]] +- **참조 맥락:** 수학 함수 — 난수 생성(Random Numbers) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Math Functions — https://www.w3schools.com/c/c_math.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Math Functions" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Memory_Access.md b/10_Wiki/Dev/Topic_C/C_Memory_Access.md new file mode 100644 index 00000000..eda46b4e --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Memory_Access.md @@ -0,0 +1,68 @@ +--- +id: c-memory-access +title: "C Access Memory" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["dynamic memory access", "reinterpreting bytes", "C 동적 메모리 접근"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "memory", "dynamic-memory"] +raw_sources: ["https://www.w3schools.com/c/c_memory_access.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Access Memory]] + +## 🎯 한 줄 통찰 (One-line insight) +Dynamically allocated memory has NO type of its own at all — it's "just a sequence of bytes," and the SAME 4 bytes can be read as one `int` OR as four separate `char` values depending purely on which pointer TYPE you use to view them, proven by the example where `ptr1[0] = 1684234849` (an int) and `ptr2[0..3]` (a char reinterpretation of the identical bytes) both successfully read the same memory as completely different things. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Dynamic memory behaves like an array** — indexable via `ptr[i]` or dereferenceable via `*ptr` for the first element, just like a regular array. [S1] +- **No inherent data type** — allocated memory is raw bytes; its "type" is entirely a matter of interpretation, determined by whatever pointer type is used to access it. [S1] +- **Type reinterpretation via pointer casting** — casting an `int*` to a `char*` (`(char*) ptr1`) lets the SAME underlying bytes be read as individual characters instead of one integer. [S1] +- **Index vs. dereference for the first element** — `ptr[0] = 12;` and `*ptr = 12;` are equivalent ways to write to the first allocated element. [S1] + +## 📖 세부 내용 (Details) +- Allocating and accessing dynamic memory both ways: `int *ptr; ptr = calloc(4, sizeof(*ptr)); *ptr = 2; ptr[1] = 4; ptr[2] = 6;`. [S1] +- Reinterpreting the same 4 bytes as an int vs. four chars: `int *ptr1 = malloc(4); char *ptr2 = (char*) ptr1; ptr1[0] = 1684234849; printf("%d is %c %c %c %c", *ptr1, ptr2[0], ptr2[1], ptr2[2], ptr2[3]);` — the same 4 bytes printed once as a number and once as four ASCII characters. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **할당된 메모리는 타입이 없는 바이트 시퀀스**: 동일한 4바이트 메모리가 포인터 타입에 따라 하나의 int로도, 4개의 char로도 해석될 수 있다는 점이 직접 예시로 증명됨 — 타입은 데이터 자체가 아니라 접근 방식이 결정한다. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 동일한 메모리를 int 포인터와 char 포인터로 각각 해석하는 기법이 저수준 바이트 조작이나 타입 캐스팅이 필요한 실전 상황에서 활용된다. [S1] + +## 💻 코드 패턴 (Code patterns) +The same 4 bytes of allocated memory reinterpreted as an int vs. four chars via pointer casting (C): +```c +int *ptr1 = malloc(4); +char *ptr2 = (char*) ptr1; +ptr1[0] = 1684234849; +printf("%d is %c %c %c %c", *ptr1, ptr2[0], ptr2[1], ptr2[2], ptr2[3]); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Pointer To Pointer]], [[C Memory Management]], [[C Memory Allocate]] +- **참조 맥락:** 동적 메모리 접근 — 메모리 관리(Memory Management) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Access Memory — https://www.w3schools.com/c/c_memory_access.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Access Memory" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Memory_Address.md b/10_Wiki/Dev/Topic_C/C_Memory_Address.md new file mode 100644 index 00000000..385f26a0 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Memory_Address.md @@ -0,0 +1,66 @@ +--- +id: c-memory-address +title: "C Memory Address" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["reference operator", "%p specifier", "C 메모리 주소"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "memory", "pointers"] +raw_sources: ["https://www.w3schools.com/c/c_memory_address.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Memory Address]] + +## 🎯 한 줄 통찰 (One-line insight) +`&myAge` isn't just a debugging curiosity for printing hex addresses — the source explicitly identifies it as a "pointer" in its own right, meaning the concept of "getting a memory address" and "creating a pointer value" are the SAME operation viewed from two angles, setting up the entire next chapter's pointer syntax as a direct extension of this one operator (`&`). [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Memory address** — the physical location where a variable's value is actually stored on the computer. [S1] +- **`&` (reference/address-of operator)** — retrieves a variable's memory address. [S1] +- **`%p` format specifier** — the correct printf specifier for printing a memory address/pointer value (not `%d`). [S1] +- **Hexadecimal representation** — memory addresses print in `0x...` form; the exact value varies by machine/run and isn't meant to be predicted. [S1] +- **Why pointers matter** — they let a program manipulate memory directly, reducing code size and improving performance — described as one of the things that distinguishes C from languages like Python and Java. [S1] + +## 📖 세부 내용 (Details) +- Getting and printing a variable's address: `int myAge = 43; printf("%p", &myAge); // Outputs 0x7ffe5367e044`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 이 챕터의 & 연산자 개념이 다음 챕터(Pointers)에서 실제 포인터 변수 선언의 기초로 그대로 이어진다. [S1] + +## 💻 코드 패턴 (Code patterns) +Getting a variable's memory address with the reference operator (C): +```c +int myAge = 43; +printf("%p", &myAge); // Outputs 0x7ffe5367e044 +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Typedef]], [[C Pointers]] +- **참조 맥락:** 포인터/메모리 섹션 첫 챕터 — 포인터(Pointers) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Memory Address — https://www.w3schools.com/c/c_memory_address.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Memory Address" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Memory_Allocate.md b/10_Wiki/Dev/Topic_C/C_Memory_Allocate.md new file mode 100644 index 00000000..9ac62553 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Memory_Allocate.md @@ -0,0 +1,73 @@ +--- +id: c-memory-allocate +title: "C Allocate Memory" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["malloc calloc", "static vs dynamic memory", "stack memory", "C 메모리 할당"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "memory-management", "malloc", "calloc"] +raw_sources: ["https://www.w3schools.com/c/c_memory_allocate.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Allocate Memory]] + +## 🎯 한 줄 통찰 (One-line insight) +`sizeof(*ptr1)` and `sizeof(ptr1)` look nearly identical but measure two completely different things — the FIRST measures the size of the data the pointer points to (correct for allocation), while the SECOND measures the size of the pointer variable itself (usually 8 bytes, the address size) — and the source explicitly flags forgetting the `*` as a real, easy-to-make mistake that silently allocates the wrong amount of memory. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Static memory** — reserved automatically at COMPILE time for regular variables; fixed size, cannot be resized after creation (e.g. an array declared for 20 elements always occupies that space, even if only 12 are used). [S1] +- **Dynamic memory** — reserved at RUNTIME, giving full programmer control over how much memory is used; only accessible via pointers, never owned by a plain variable. [S1] +- **`malloc(size)`** — allocates `size` bytes; the content is UNPREDICTABLE/uninitialized until written. [S1] +- **`calloc(amount, size)`** — allocates `amount` items of `size` bytes each, AND zero-initializes all of it; slightly less efficient than `malloc()` because of the zeroing step. [S1] +- **`sizeof(*ptr)` vs `sizeof(ptr)`** — the former measures the pointed-to data's size (correct for sizing an allocation); the latter measures the pointer variable's own size (usually 8 bytes on 64-bit systems), a common mistake. [S1] +- **`sizeof` can't measure total allocated memory** — it only reports the size of ONE element's type, so total dynamic allocation size must be computed manually (`count * sizeof(type)`). [S1] +- **Stack memory** — a form of dynamic memory automatically reserved for variables declared INSIDE functions; freed automatically when the function returns; excessive recursion can exhaust it, causing a "stack overflow." [S1] + +## 📖 세부 내용 (Details) +- Static memory waste example: `int students[20]; // reserves 80 bytes even if only 12 students actually attend`. [S1] +- Correctly sizing a dynamic allocation with `sizeof(*ptr)`: `int *ptr1, *ptr2; ptr1 = malloc(sizeof(*ptr1)); ptr2 = calloc(1, sizeof(*ptr2));`. [S1] +- Computing total dynamic memory manually (sizeof alone can't do it): `int *students; int numStudents = 12; students = calloc(numStudents, sizeof(*students)); printf("%d", numStudents * sizeof(*students)); // 48 bytes`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **sizeof(*ptr) vs sizeof(ptr)의 차이**: 별표를 빠뜨리면 포인터가 가리키는 데이터의 크기가 아니라 포인터 자체의 크기(보통 8바이트)를 측정하게 된다는 점이 실수하기 쉬운 부분으로 명시적으로 경고됨. [S1] +- **정적 메모리의 낭비 가능성**: 20명분 배열을 만들었는데 실제 12명만 참여하면 8명분 공간이 낭비되지만, 프로그램은 정상 작동하며 손상되지 않는다는 점이 확인됨(단지 비효율적일 뿐). [S1] + +## 🛠️ 적용 사례 (Applied in summary) +학생 수(numStudents)만큼만 calloc으로 메모리를 할당해 정적 배열의 낭비 문제를 해결하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Correctly sizing an allocation using sizeof(*ptr), not sizeof(ptr) (C): +```c +int *ptr1, *ptr2; +ptr1 = malloc(sizeof(*ptr1)); // correct: size of the pointed-to int +ptr2 = calloc(1, sizeof(*ptr2)); // correct: size of the pointed-to int +// sizeof(ptr1) would instead measure the pointer itself (usually 8 bytes) +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Memory Management]], [[C Data Types Sizeof]], [[C Memory Deallocate]] +- **참조 맥락:** 메모리 할당 — 메모리 해제(Memory Deallocate) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Allocate Memory — https://www.w3schools.com/c/c_memory_allocate.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Allocate Memory" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Memory_Deallocate.md b/10_Wiki/Dev/Topic_C/C_Memory_Deallocate.md new file mode 100644 index 00000000..c3f8ba2c --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Memory_Deallocate.md @@ -0,0 +1,77 @@ +--- +id: c-memory-deallocate +title: "C Deallocate Memory" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["free() function", "memory leak", "set pointer to NULL", "C 메모리 해제"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "memory-management", "free", "memory-leak"] +raw_sources: ["https://www.w3schools.com/c/c_memory_deallocate.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Deallocate Memory]] + +## 🎯 한 줄 통찰 (One-line insight) +A memory leak isn't caused by forgetting `free()` in the obvious sense — the source's three worked examples show it happens when the POINTER itself is lost (overwritten to point elsewhere, scoped inside a function that ends, or clobbered by a failed `realloc()` returning NULL) while the memory it referenced is STILL allocated but now permanently unreachable — meaning the memory isn't the problem, losing the only handle to it is. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`free(pointer)`** — releases previously allocated dynamic memory back for reuse by other parts of the program or other programs. [S1] +- **Set to NULL after freeing** — best practice; prevents accidentally continuing to use a freed (now invalid) pointer. [S1] +- **Memory leak** — dynamically allocated memory that is never freed, typically because the ONLY pointer referencing it was lost, not because `free()` was simply forgotten in an obvious spot. [S1] +- **Leak pattern 1: pointer overwritten** — reassigning a pointer variable to a new address (e.g. `&x`) severs its only link to the previously `calloc()`'d memory. [S1] +- **Leak pattern 2: pointer scoped to a function** — a local pointer variable disappears when its function returns, but the memory it pointed to remains allocated and now unreachable. [S1] +- **Leak pattern 3: failed `realloc()` overwrites the original pointer** — if `realloc()` fails and returns `NULL`, assigning that `NULL` directly back to the SAME variable destroys the only reference to the still-valid original memory. [S1] + +## 📖 세부 내용 (Details) +- Basic free with error checking and NULL-setting: `int *ptr; ptr = malloc(sizeof(*ptr)); if (ptr == NULL) { printf("Unable to allocate memory"); return 1; } *ptr = 20; free(ptr); ptr = NULL;`. [S1] +- Leak via pointer reassignment: `int x = 5; int *ptr; ptr = calloc(2, sizeof(*ptr)); ptr = &x;` — the calloc'd memory is now unreachable. [S1] +- Leak via function-scoped pointer: `void myFunction() { int *ptr; ptr = malloc(sizeof(*ptr)); }` — memory allocated inside persists after the function returns but can never be freed or accessed again. [S1] +- Leak via unchecked realloc failure: `ptr = realloc(ptr, 2*sizeof(*ptr));` — if this fails, `ptr` becomes NULL and the original memory address is lost forever (the correct fix, shown in the Reallocate chapter, is to use a TEMPORARY pointer for the realloc result). [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **메모리 누수의 진짜 원인은 포인터 분실**: free()를 안 써서가 아니라, 메모리를 가리키던 유일한 포인터가 덮어써지거나(재대입/함수 종료/realloc 실패) 사라져서 더 이상 접근할 수 없게 되는 것이 메모리 누수의 실제 메커니즘이라는 점이 세 가지 예제로 구체적으로 증명됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — free() 후 포인터를 NULL로 설정하는 습관이 실수로 해제된 메모리를 재사용하는 버그를 방지하는 실전 관행으로 강조된다. [S1] + +## 💻 코드 패턴 (Code patterns) +Freeing memory and setting the pointer to NULL to prevent accidental reuse (C): +```c +int *ptr; +ptr = malloc(sizeof(*ptr)); +if (ptr == NULL) { + printf("Unable to allocate memory"); + return 1; +} +*ptr = 20; +free(ptr); +ptr = NULL; // prevents accidental use-after-free +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Memory Allocate]], [[C Memory Reallocate]], [[C Null]] +- **참조 맥락:** 메모리 해제 — 메모리 재할당(Memory Reallocate) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Deallocate Memory — https://www.w3schools.com/c/c_memory_deallocate.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Deallocate Memory" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Memory_Management.md b/10_Wiki/Dev/Topic_C/C_Memory_Management.md new file mode 100644 index 00000000..a6fadbf3 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Memory_Management.md @@ -0,0 +1,71 @@ +--- +id: c-memory-management +title: "C Memory Management" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["memory management overview", "C 메모리 관리"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "memory-management"] +raw_sources: ["https://www.w3schools.com/c/c_memory_management.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Memory Management]] + +## 🎯 한 줄 통찰 (One-line insight) +Manual memory management is presented as a genuine TRADE, not a burden imposed for no reason — the source frames it explicitly as "complicated... but also quite powerful when used correctly," meaning C hands the programmer full responsibility for allocation/deallocation specifically because that same responsibility is what enables performance optimization impossible in languages with automatic garbage collection. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Memory management** — the process of controlling how much memory a program uses, via three operations: allocation, reallocation, and deallocation ("freeing"). [S1] +- **Automatic sizing for basic variables** — C automatically reserves the correct byte size for `int`/`float`/`double`/`char` variables; `sizeof` reveals these sizes (4/4/8/1 bytes respectively). [S1] +- **Manual responsibility** — unlike some languages, C requires the PROGRAMMER to manage memory explicitly, which is more error-prone but enables finer performance control. [S1] +- **Pointers as the memory-management tool** — since dynamic memory is only reachable via pointers, memory management is inherently pointer-based work. [S1] + +## 📖 세부 내용 (Details) +- Confirming basic type sizes via sizeof: `int myInt; float myFloat; double myDouble; char myChar; printf("%zu\n", sizeof(myInt)); // 4 printf("%zu\n", sizeof(myDouble)); // 8`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **수동 메모리 관리는 강력함과 위험의 트레이드오프**: 복잡하지만 제대로 사용하면 매우 강력하다는 점, 그리고 포인터를 다룰 때는 다른 메모리 주소의 데이터를 손상시킬 위험이 있으니 주의해야 한다는 점이 함께 강조됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 이 챕터가 개관하는 할당/재할당/해제 세 가지 개념이 다음 챕터들(Memory Allocate/Reallocate/Deallocate)에서 각각 상세히 다뤄지는 로드맵 역할을 한다. [S1] + +## 💻 코드 패턴 (Code patterns) +Checking the actual byte sizes of C's basic types with sizeof (C): +```c +int myInt; +float myFloat; +double myDouble; +char myChar; +printf("%zu\n", sizeof(myInt)); // 4 bytes +printf("%zu\n", sizeof(myFloat)); // 4 bytes +printf("%zu\n", sizeof(myDouble)); // 8 bytes +printf("%zu\n", sizeof(myChar)); // 1 byte +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Memory Access]], [[C Memory Allocate]] +- **참조 맥락:** 메모리 관리 개관 — 메모리 할당(Memory Allocate) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Memory Management — https://www.w3schools.com/c/c_memory_management.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Memory Management" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Memory_RealLife.md b/10_Wiki/Dev/Topic_C/C_Memory_RealLife.md new file mode 100644 index 00000000..f52c1007 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Memory_RealLife.md @@ -0,0 +1,81 @@ +--- +id: c-memory-reallife +title: "C Memory Management Example" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["dynamic array list", "growable list implementation", "C 메모리 관리 실전 예제"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "memory-management", "dynamic-array"] +raw_sources: ["https://www.w3schools.com/c/c_memory_reallife.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Memory Management Example]] + +## 🎯 한 줄 통찰 (One-line insight) +The chapter directly answers WHY growable lists grow by a chunk of 10 rather than 1-at-a-time: reallocating memory too FREQUENTLY is inefficient even though it wastes less space, so the design deliberately trades a small amount of unused memory for far fewer (and cheaper) reallocation calls — an explicit memory-vs-performance balancing act rather than an arbitrary constant. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Growable list via struct + dynamic memory** — a `struct list { int *data; int numItems; int size; }` tracks the actual data pointer, how many items are currently used, and how much capacity is currently allocated. [S1] +- **Batch-growth strategy** — when the list fills up, capacity grows by a FIXED CHUNK (+10 items) rather than exactly by 1, trading some unused memory for fewer, cheaper reallocation calls. [S1] +- **Safe realloc pattern reused** — `addToList()` uses a temporary pointer (`tmp`) for the `realloc()` result, only committing `myList->data`/`myList->size` AFTER confirming `tmp` isn't NULL. [S1] +- **Struct passed by pointer to a function** — `addToList(struct list *myList, int item)` receives the list by pointer (using `->`) so it can permanently mutate the caller's actual list state, not a copy. [S1] +- **Fixed-size arrays can't do this** — the chapter opens by contrasting this against regular C arrays, whose length is fixed at creation and can never grow. [S1] + +## 📖 세부 내용 (Details) +- The list struct and its three roles: `struct list { int *data; int numItems; int size; };` — `data` points to the dynamic storage, `numItems` tracks current fill level, `size` tracks total current capacity. [S1] +- The growth-trigger check inside `addToList()`: `if (myList->numItems == myList->size) { int newSize = myList->size + 10; int *tmp = realloc(myList->data, newSize * sizeof(int)); if (tmp == NULL) { printf("Memory resize failed\n"); return; } myList->data = tmp; myList->size = newSize; }`. [S1] +- Appending after ensuring capacity: `myList->data[myList->numItems] = item; myList->numItems++;`. [S1] +- Explicit rationale for the +10 chunk size: "Optimizing is a balancing act between memory and performance... reallocating memory too frequently can be inefficient." [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **+10씩 늘리는 이유는 메모리와 성능의 균형**: 정확히 필요한 만큼만 늘리지 않고 10개씩 뭉텅이로 늘리는 이유가 재할당을 너무 자주 하면 비효율적이기 때문이라는 점이 명시적으로 설명됨 — 정확한 개수(예: 44개)를 미리 안다면 한 번에 그만큼만 할당하는 것이 더 낫다고도 언급됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +44개의 항목을 하나씩 추가하면서 필요할 때마다 자동으로 용량을 10개씩 늘려가는 리스트 구현이 원문에서 직접 실전 활용 사례로 제시되며, 배열/구조체/포인터/동적 메모리 챕터 전체를 종합한 완결편 역할을 한다. [S1] + +## 💻 코드 패턴 (Code patterns) +Growing a dynamic list by a fixed chunk size using the safe temporary-pointer realloc pattern (C): +```c +void addToList(struct list *myList, int item) { + if (myList->numItems == myList->size) { + int newSize = myList->size + 10; + int *tmp = realloc(myList->data, newSize * sizeof(int)); + if (tmp == NULL) { + printf("Memory resize failed\n"); + return; + } + myList->data = tmp; + myList->size = newSize; + } + myList->data[myList->numItems] = item; + myList->numItems++; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Memory Struct]], [[C Functions]], [[C Structs Pointers]] +- **참조 맥락:** 포인터 및 메모리 섹션 마지막 — 함수(Functions) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Memory Management Example — https://www.w3schools.com/c/c_memory_reallife.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Memory Management Example" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Memory_Reallocate.md b/10_Wiki/Dev/Topic_C/C_Memory_Reallocate.md new file mode 100644 index 00000000..5d6c4bb2 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Memory_Reallocate.md @@ -0,0 +1,72 @@ +--- +id: c-memory-reallocate +title: "C Reallocate Memory" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["realloc() function", "temporary pointer pattern", "C 메모리 재할당"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "memory-management", "realloc"] +raw_sources: ["https://www.w3schools.com/c/c_memory_reallocate.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Reallocate Memory]] + +## 🎯 한 줄 통찰 (One-line insight) +`realloc()` may or may not move the data to a NEW address — it tries to resize in place first, but if it can't, it silently allocates elsewhere and returns the new address, which means the ORIGINAL address becomes immediately unsafe to use the moment reallocation succeeds at a different location, making it essential to always capture `realloc()`'s return value into a SEPARATE temporary pointer rather than overwriting the original variable directly (since a failed call returns NULL and would otherwise destroy the only reference to the still-valid original memory). [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`realloc(ptr, newSize)`** — resizes previously allocated memory while PRESERVING its existing contents; returns either the SAME address (if resized in place) or a NEW address (if it had to move the data). [S1] +- **Old address becomes invalid on move** — once `realloc()` returns a different address, the original address is no longer safe to use. [S1] +- **NULL on failure** — if reallocation fails, `realloc()` returns `NULL`, and (per the previous chapter) the ORIGINAL memory remains valid and allocated. [S1] +- **Temporary-pointer safety pattern** — assign `realloc()`'s result to a SEPARATE variable first, check it for `NULL`, and only then update the original pointer — directly overwriting the original pointer risks losing it if the call fails. [S1] + +## 📖 세부 내용 (Details) +- Growing an allocation from 4 to 6 integers: `size = 4 * sizeof(*ptr1); ptr1 = malloc(size); size = 6 * sizeof(*ptr1); ptr2 = realloc(ptr1, size);`. [S1] +- Safe NULL-check pattern before committing the resized pointer: `ptr1 = malloc(4); ptr2 = realloc(ptr1, 8); if (ptr2 == NULL) { printf("Failed. Unable to resize memory"); } else { printf("Success..."); ptr1 = ptr2; }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **realloc 결과를 임시 포인터에 먼저 받아야 하는 이유**: realloc()이 실패하면 NULL을 반환하는데, 이를 원래 포인터 변수에 바로 대입해버리면 여전히 유효한 원본 메모리 주소를 잃어버리게 된다는 점이 명시적으로 경고됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 4개 정수에서 6개 정수로 메모리를 확장하는 예제가 실전에서 배열 크기를 동적으로 늘려야 할 때의 대표 패턴이다. [S1] + +## 💻 코드 패턴 (Code patterns) +Safely resizing memory using a temporary pointer to avoid losing the original on failure (C): +```c +int *ptr1, *ptr2; +ptr1 = malloc(4); +ptr2 = realloc(ptr1, 8); +if (ptr2 == NULL) { + printf("Failed. Unable to resize memory"); +} else { + ptr1 = ptr2; // safe to commit only after success +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Memory Deallocate]], [[C Memory Struct]], [[C Memory RealLife]] +- **참조 맥락:** 메모리 재할당 — 구조체와 동적 메모리(Memory Struct) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Reallocate Memory — https://www.w3schools.com/c/c_memory_reallocate.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Reallocate Memory" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Memory_Struct.md b/10_Wiki/Dev/Topic_C/C_Memory_Struct.md new file mode 100644 index 00000000..a1751001 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Memory_Struct.md @@ -0,0 +1,76 @@ +--- +id: c-memory-struct +title: "C Structures and Dynamic Memory" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["malloc struct", "array of structs", "realloc struct array", "C 구조체 동적 메모리"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "memory-management", "structs"] +raw_sources: ["https://www.w3schools.com/c/c_memory_struct.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Structures and Dynamic Memory]] + +## 🎯 한 줄 통찰 (One-line insight) +Growing a dynamically-allocated array of structs with `realloc()` only extends the ALLOCATION — the newly added slots are explicitly UNINITIALIZED, meaning code that grows a 2-car array to 3 cars must manually `strcpy()`/assign values into the new index (`cars[2]`) before using it, or risk reading garbage; `realloc()` never zero-fills or default-constructs the extra space it creates. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`malloc(sizeof(struct Type))`** — allocates memory for exactly ONE struct instance, accessed via a pointer and the `->` arrow operator. [S1] +- **`malloc(N * sizeof(struct Type))`** — allocates memory for an ARRAY of N structs at once, accessible via normal bracket indexing (`cars[0].brand`). [S1] +- **`strcpy()` still required for string members** — even in dynamically allocated structs, `char[]` fields can't be assigned via `=` and still need `strcpy()`. [S1] +- **Growing with `realloc()` + temporary pointer** — resizing a struct array follows the same safe pattern as the previous chapter (store the result in a temp pointer, check for NULL, only commit on success). [S1] +- **New space from `realloc()` is uninitialized** — expanding from 2 to 3 struct elements leaves the new element's fields with undefined content until explicitly assigned. [S1] + +## 📖 세부 내용 (Details) +- Allocating memory for one struct: `struct Car *ptr = (struct Car*) malloc(sizeof(struct Car)); if (ptr == NULL) { ... } strcpy(ptr->brand, "Honda"); ptr->year = 2022; free(ptr);`. [S1] +- Allocating an array of 3 structs at once: `struct Car *cars = (struct Car*) malloc(3 * sizeof(struct Car)); strcpy(cars[0].brand, "Ford"); cars[0].year = 2015;`. [S1] +- Safely growing the array from 2 to 3 elements, then initializing the new slot: `struct Car *tmp = (struct Car*) realloc(cars, newCount * sizeof(struct Car)); if (tmp == NULL) { free(cars); ... } cars = tmp; strcpy(cars[2].brand, "Kia"); cars[2].year = 2022;` — the new element MUST be manually initialized since realloc leaves it undefined. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **realloc으로 늘어난 공간은 초기화되지 않음**: 배열을 2개에서 3개로 늘려도 새로 생긴 3번째 요소의 필드는 값이 정의되지 않은 상태이므로, 사용 전에 반드시 직접 초기화(strcpy/대입)해야 한다는 점이 명시적으로 경고됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +자동차 대수가 고정되지 않은 중고차 딜러십 프로그램에서 필요한 만큼만 구조체 메모리를 동적으로 할당하는 것이 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Growing a struct array and initializing the newly added, uninitialized slot (C): +```c +struct Car *tmp = (struct Car*) realloc(cars, newCount * sizeof(struct Car)); +if (tmp == NULL) { + free(cars); + printf("Reallocation failed.\n"); + return 1; +} +cars = tmp; +// Must manually initialize the new element — realloc leaves it undefined +strcpy(cars[2].brand, "Kia"); +cars[2].year = 2022; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Memory Reallocate]], [[C Structs Pointers]], [[C Memory RealLife]] +- **참조 맥락:** 구조체 동적 메모리 — 메모리 관리 실전 예제(Memory RealLife) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Structures and Dynamic Memory — https://www.w3schools.com/c/c_memory_struct.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Structures and Dynamic Memory" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Newline.md b/10_Wiki/Dev/Topic_C/C_Newline.md new file mode 100644 index 00000000..44c11d6c --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Newline.md @@ -0,0 +1,68 @@ +--- +id: c-newline +title: "C New Lines" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["\\n escape sequence", "blank line", "C 줄바꿈"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "newline", "escape-sequences"] +raw_sources: ["https://www.w3schools.com/c/c_newline.php"] +applied_in: [] +github_commit: "" +--- + +# [[C New Lines]] + +## 🎯 한 줄 통찰 (One-line insight) +`\n` isn't a "print a new line" command — it's an ESCAPE SEQUENCE representing a special character (moving the cursor to the start of the next line), placing it in the same category as `\t`, `\\`, and `\"` from earlier chapters, meaning "printing on multiple lines" in C is really just "printing one string that happens to contain a cursor-movement character," which is why doubling it up (`\n\n`) produces a blank line — the SAME character, repeated, moves the cursor down twice. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`\n`** — an escape sequence that moves the cursor to the beginning of the next line. [S1] +- **Escape sequence** — a backslash-prefixed representation of a special character that can't be typed directly (this chapter's specific instance of the general pattern from the earlier Special Characters chapter). [S1] +- **Multiple `\n` in a row = blank line(s)** — since each `\n` moves the cursor down one line, two in a row (`\n\n`) skips an entire visual line. [S1] +- **Single printf(), multiple lines** — one `printf()` call CAN contain several `\n` characters to produce multi-line output, though the source notes this can hurt readability if overused. [S1] + +## 📖 세부 내용 (Details) +- Newline between two separate printf calls: `printf("Hello World!\n"); printf("I am learning C.");`. [S1] +- Multiple lines from one printf call: `printf("Hello World!\nI am learning C.\nAnd it is awesome!");`. [S1] +- Producing a blank line with doubled `\n`: `printf("Hello World!\n\n"); printf("I am learning C.");`. [S1] +- Other common escape sequences reiterated: `\t` (horizontal tab), `\\` (literal backslash), `\"` (literal double quote). [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **\n\n이 빈 줄을 만드는 이유**: \n 하나가 커서를 다음 줄로 한 번 이동시키므로, 두 번 연속 쓰면 한 줄을 건너뛰어 빈 줄처럼 보이게 된다는 점이 확인됨 — 특별한 "빈 줄" 문법이 있는 것이 아니라 동일한 이스케이프 문자의 반복일 뿐. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 여러 문장을 하나의 printf() 호출에 \n으로 이어붙이는 것이 코드를 짧게 만들지만 가독성을 해칠 수 있다는 점이 트레이드오프로 언급됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Producing a blank line by repeating the newline escape sequence (C): +```c +printf("Hello World!\n\n"); +printf("I am learning C."); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Null]], [[C Strings Esc]], [[C Output]] +- **참조 맥락:** C 튜토리얼 전체의 마지막 챕터 — 출력(Output)과 특수문자(Strings Esc) 챕터의 개념을 마무리로 재확인. + +## 📚 출처 (Sources) +- [S1] W3Schools — C New Lines — https://www.w3schools.com/c/c_newline.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C New Lines" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Null.md b/10_Wiki/Dev/Topic_C/C_Null.md new file mode 100644 index 00000000..f642aaef --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Null.md @@ -0,0 +1,71 @@ +--- +id: c-null +title: "C NULL" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["null pointer", "malloc NULL check", "C NULL"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "null", "pointers"] +raw_sources: ["https://www.w3schools.com/c/c_null.php"] +applied_in: [] +github_commit: "" +--- + +# [[C NULL]] + +## 🎯 한 줄 통찰 (One-line insight) +`NULL` is the single unifying failure signal shared by two completely unrelated operations — `fopen()` (file access) and `malloc()` (memory allocation) — meaning the SAME defensive pattern (`if (ptr == NULL) { ...handle error... }`) applies whether the resource that might not exist is a file on disk or a block of RAM, because both operations return an ordinary pointer that's simply set to NULL on failure rather than raising any special error mechanism. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`NULL`** — represents a "null pointer": a pointer that points to nothing/nowhere. [S1] +- **Failure signal, not an exception** — many C functions (`fopen()`, `malloc()`) return `NULL` when they fail, rather than throwing any error (since C has no exceptions). [S1] +- **Universal safety check** — comparing any pointer to `NULL` before using it prevents crashes from accessing invalid memory. [S1] +- **Same pattern across different resources** — the identical `if (ptr == NULL)` check applies whether guarding against a missing file OR a failed memory allocation. [S1] + +## 📖 세부 내용 (Details) +- File-open failure check: `FILE *fptr = fopen("nothing.txt", "r"); if (fptr == NULL) { printf("Could not open file.\n"); return 1; }`. [S1] +- Memory-allocation failure check (deliberately requesting an absurd amount): `int *numbers = (int*) malloc(100000000000000 * sizeof(int)); if (numbers == NULL) { printf("Memory allocation failed.\n"); return 1; }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **NULL 체크는 사용 전 필수 습관**: 크래시를 피하려면 포인터를 사용하기 전 항상 NULL인지 확인해야 한다는 점이 팁으로 강조되며, fopen()과 malloc() 모두 같은 방식으로 실패를 알린다는 공통점이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 지나치게 큰 메모리를 요청해 malloc()이 실패하는 상황을 의도적으로 재현한 예제가 NULL 체크의 실전 필요성을 직접 보여준다. [S1] + +## 💻 코드 패턴 (Code patterns) +The same NULL-check pattern applying to both file access and memory allocation (C): +```c +// File access failure +FILE *fptr = fopen("nothing.txt", "r"); +if (fptr == NULL) { printf("Could not open file.\n"); return 1; } + +// Memory allocation failure +int *numbers = (int*) malloc(100000000000000 * sizeof(int)); +if (numbers == NULL) { printf("Memory allocation failed.\n"); return 1; } +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Macros]], [[C Memory Deallocate]], [[C Error Handling]], [[C Newline]] +- **참조 맥락:** NULL — 줄바꿈(Newline) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C NULL — https://www.w3schools.com/c/c_null.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C NULL" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Operators.md b/10_Wiki/Dev/Topic_C/C_Operators.md new file mode 100644 index 00000000..fde33dd9 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Operators.md @@ -0,0 +1,65 @@ +--- +id: c-operators +title: "C Operators" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["operator categories", "C 연산자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "operators"] +raw_sources: ["https://www.w3schools.com/c/c_operators.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Operators]] + +## 🎯 한 줄 통찰 (One-line insight) +The chapter's own chained example — `sum1 = 100 + 50; sum2 = sum1 + 250; sum3 = sum2 + sum2;` — demonstrates that `+` works identically whether combining two literals, a variable and a literal, or two variables, establishing early that C operators operate on VALUES regardless of whether those values come from literals or variable lookups. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Operator** — performs an operation on variables and/or values. [S1] +- **Five operator categories** — Arithmetic, Assignment, Comparison, Logical, and Bitwise (marked "advanced"). [S1] +- **Uniform operand handling** — the same operator (e.g. `+`) works on literal-literal, variable-literal, and variable-variable combinations identically. [S1] + +## 📖 세부 내용 (Details) +- Chained addition using literals and variables interchangeably: `int sum1 = 100 + 50; int sum2 = sum1 + 250; int sum3 = sum2 + sum2;` — evaluates to 150, 400, 800. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 이 챕터가 제시하는 5개 연산자 분류가 이후 각 챕터(산술/대입/비교/논리/비트) 학습의 로드맵 역할을 한다. [S1] + +## 💻 코드 패턴 (Code patterns) +The + operator working uniformly across literals, a variable+literal, and variable+variable (C): +```c +int sum1 = 100 + 50; // 150 (100 + 50) +int sum2 = sum1 + 250; // 400 (150 + 250) +int sum3 = sum2 + sum2; // 800 (400 + 400) +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Fixed Width Ints]], [[C Operators Arithmetic]] +- **참조 맥락:** 연산자 섹션 개관 — 산술 연산자(Operators Arithmetic) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Operators — https://www.w3schools.com/c/c_operators.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Operators" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Operators_Arithmetic.md b/10_Wiki/Dev/Topic_C/C_Operators_Arithmetic.md new file mode 100644 index 00000000..c3c46640 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Operators_Arithmetic.md @@ -0,0 +1,71 @@ +--- +id: c-operators-arithmetic +title: "C Arithmetic Operators" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["integer division", "increment decrement", "C 산술 연산자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "operators", "arithmetic"] +raw_sources: ["https://www.w3schools.com/c/c_operators_arithmetic.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Arithmetic Operators]] + +## 🎯 한 줄 통찰 (One-line insight) +Dividing two `int` values ALWAYS produces an `int` result, silently truncating any decimal — `10 / 3` gives `3`, not `3.33` — and the ONLY way to get a decimal result is to make at least the operand types `float`/`double` (`10.0 / 3` gives `3.333...`), meaning integer division isn't a rounding behavior to configure, it's an unavoidable consequence of the operand types chosen. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Seven core arithmetic operators** — `+` (add), `-` (subtract), `*` (multiply), `/` (divide), `%` (modulus/remainder), `++` (increment), `--` (decrement). [S1] +- **Integer division truncation** — dividing two `int`s always yields an `int`, discarding any decimal remainder; use `float`/`double` operands to get a decimal result. [S1] +- **Increment/decrement round-trip** — incrementing then decrementing the same variable (or vice versa) returns it to its original value. [S1] + +## 📖 세부 내용 (Details) +- All seven operators demonstrated together: `int x = 10; int y = 3; x + y; // 13`, `x - y; // 7`, `x * y; // 30`, `x / y; // 3`, `x % y; // 1`, plus `++z`/`--z` on a separate variable. [S1] +- Integer vs decimal division contrast: `int a = 10; int b = 3; printf("%d\n", a / b); // 3 (integer division)` versus `double c = 10.0; double d = 3.0; printf("%f\n", c / d); // 3.333...`. [S1] +- Real-life counting example: `int peopleInRoom = 0; peopleInRoom++; peopleInRoom++; peopleInRoom++; // 3 people enter, count = 3` then `peopleInRoom--; // 1 leaves, count = 2`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **정수 나눗셈의 소수점 절삭**: int끼리 나누면 항상 int 결과가 나와 소수점이 버려진다는 점이 명시되며, 소수 결과를 원하면 최소 한쪽을 float/double로 만들어야 한다는 해결책이 함께 제시됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +방에 들어오고 나가는 사람 수를 ++/--로 세는 카운터 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Integer division truncates; use float/double operands for a decimal result (C): +```c +int a = 10; +int b = 3; +printf("%d\n", a / b); // Integer division, result is 3 + +double c = 10.0; +double d = 3.0; +printf("%f\n", c / d); // Decimal division, result is 3.333... +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Operators]], [[C Operators Assignment]] +- **참조 맥락:** 산술 연산자 — 대입 연산자(Operators Assignment) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Arithmetic Operators — https://www.w3schools.com/c/c_operators_arithmetic.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Arithmetic Operators" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Operators_Assignment.md b/10_Wiki/Dev/Topic_C/C_Operators_Assignment.md new file mode 100644 index 00000000..66c87d0c --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Operators_Assignment.md @@ -0,0 +1,67 @@ +--- +id: c-operators-assignment +title: "C Assignment Operators" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["+= -= *=", "compound assignment", "C 대입 연산자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "operators", "assignment"] +raw_sources: ["https://www.w3schools.com/c/c_operators_assignment.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Assignment Operators]] + +## 🎯 한 줄 통찰 (One-line insight) +Every compound assignment operator — including the bitwise ones (`&=`, `|=`, `^=`, `>>=`, `<<=`) covered later in the Bitwise chapter — follows the identical expansion pattern `x OP= y` ≡ `x = x OP y`, meaning learning this ONE rule (rather than memorizing 11 separate operators) is enough to understand every assignment shorthand in the language, arithmetic or bitwise alike. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`=`** — basic assignment. [S1] +- **Arithmetic compound operators** — `+=`, `-=`, `*=`, `/=`, `%=`, each expanding to `x = x value`. [S1] +- **Bitwise compound operators** — `&=`, `|=`, `^=`, `>>=`, `<<=`, following the SAME expansion pattern as the arithmetic ones. [S1] +- **Purpose** — pure shorthand for readability/brevity; functionally identical to the fully-spelled-out form. [S1] + +## 📖 세부 내용 (Details) +- Full expansion table: `x += 3` ≡ `x = x + 3`; `x -= 3` ≡ `x = x - 3`; `x *= 3` ≡ `x = x * 3`; `x /= 3` ≡ `x = x / 3`; `x %= 3` ≡ `x = x % 3`; `x &= 3` ≡ `x = x & 3`; `x |= 3` ≡ `x = x | 3`; `x ^= 3` ≡ `x = x ^ 3`; `x >>= 3` ≡ `x = x >> 3`; `x <<= 3` ≡ `x = x << 3`. [S1] +- Real-life savings tracker: `int savings = 100; savings += 50; // add 50 to savings printf("Total savings: %d\n", savings);`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +저축액에 50을 더하는 savings += 50 예제가 원문에서 직접 실전 활용 사례로 제시됨(계좌 잔액 누적 갱신). [S1] + +## 💻 코드 패턴 (Code patterns) +Tracking a running total using the compound addition-assignment operator (C): +```c +int savings = 100; +savings += 50; // add 50 to savings +printf("Total savings: %d\n", savings); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Operators Arithmetic]], [[C Operators Comparison]], [[C Bitwise Operators]] +- **참조 맥락:** 대입 연산자 — 비교 연산자(Operators Comparison) 챕터로 이어짐, 비트 대입 연산자는 Bitwise Operators 챕터와 연결. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Assignment Operators — https://www.w3schools.com/c/c_operators_assignment.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Assignment Operators" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Operators_Comparison.md b/10_Wiki/Dev/Topic_C/C_Operators_Comparison.md new file mode 100644 index 00000000..1e9e5e34 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Operators_Comparison.md @@ -0,0 +1,67 @@ +--- +id: c-operators-comparison +title: "C Comparison Operators" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["== != > <", "boolean 1 or 0", "C 비교 연산자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "operators", "comparison"] +raw_sources: ["https://www.w3schools.com/c/c_operators_comparison.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Comparison Operators]] + +## 🎯 한 줄 통찰 (One-line insight) +Unlike languages with a dedicated `bool`/`Boolean` type, C's comparison operators return plain INTEGERS — `1` for true, `0` for false — meaning the result of `x > y` can be printed with `%d` just like any other int, stored in an `int` variable, and used in arithmetic, because C has no separate boolean type at this point in the tutorial; true/false IS just 1/0. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Six comparison operators** — `==` (equal), `!=` (not equal), `>` (greater than), `<` (less than), `>=` (greater or equal), `<=` (less or equal). [S1] +- **Integer return value** — every comparison returns `1` (true) or `0` (false), printable with `%d`. [S1] +- **Practical decision-making use** — comparisons are the mechanism for finding answers and making decisions in a program, foreshadowing the upcoming if/else chapters. [S1] + +## 📖 세부 내용 (Details) +- Basic greater-than check: `int x = 5; int y = 3; printf("%d", x > y); // returns 1 (true)`. [S1] +- Voting age eligibility check: `int age = 18; printf("%d\n", age >= 18); // 1 (true) printf("%d\n", age < 18); // 0 (false)`. [S1] +- Password length check: `int passwordLength = 5; printf("%d\n", passwordLength >= 8); // 0 (false), too short`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **비교 결과는 진짜 정수형**: 별도의 불리언 타입 없이 비교 연산 결과가 그냥 1 또는 0인 정수로 반환된다는 점이 명시되며, 이는 이후 Booleans 챕터에서 더 자세히 다뤄질 예정임이 언급됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +투표 가능 연령 확인(age >= 18)과 비밀번호 길이 확인(passwordLength >= 8)이 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Comparison operators returning plain integers (1 or 0), used for real-world eligibility checks (C): +```c +int age = 18; +printf("%d\n", age >= 18); // 1 (true), old enough to vote +printf("%d\n", age < 18); // 0 (false) +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Operators Assignment]], [[C Operators Logical]], [[C Booleans]] +- **참조 맥락:** 비교 연산자 — 논리 연산자(Operators Logical) 챕터로 이어짐, 불리언(Booleans) 챕터와 직접 연결. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Comparison Operators — https://www.w3schools.com/c/c_operators_comparison.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Comparison Operators" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Operators_Logical.md b/10_Wiki/Dev/Topic_C/C_Operators_Logical.md new file mode 100644 index 00000000..a4214085 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Operators_Logical.md @@ -0,0 +1,68 @@ +--- +id: c-operators-logical +title: "C Logical Operators" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["&& || !", "logical AND OR NOT", "C 논리 연산자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "operators", "logical"] +raw_sources: ["https://www.w3schools.com/c/c_operators_logical.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Logical Operators]] + +## 🎯 한 줄 통찰 (One-line insight) +The login-check example combines a comparison-like value (`isLoggedIn`) with its NEGATION (`!isAdmin`) inside a single `&&` expression (`isLoggedIn && !isAdmin` = "regular user") — showing that logical operators aren't just for combining two independent conditions, but are routinely used to express compound business rules like "authenticated AND NOT privileged" as one evaluable expression. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`&&` (AND)** — returns 1 only if BOTH operands are true. [S1] +- **`||` (OR)** — returns 1 if AT LEAST ONE operand is true. [S1] +- **`!` (NOT)** — reverses the result: 1 becomes 0, 0 becomes 1. [S1] +- **1 = true, 0 = false** — the same convention as Comparison Operators; logical operators combine these int-valued truth results. [S1] + +## 📖 세부 내용 (Details) +- Login/permission check combining AND and NOT: `int isLoggedIn = 1; int isAdmin = 0; printf("Regular user: %d\n", isLoggedIn && !isAdmin); printf("Has access: %d\n", isLoggedIn || isAdmin); printf("Not logged in: %d\n", !isLoggedIn);` — outputs `1`, `1`, `0` respectively. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +로그인 여부와 관리자 권한을 조합해 "일반 사용자인지", "접근 권한이 있는지"를 판단하는 예제가 원문에서 직접 실전 활용 사례로 제시됨(인증/인가 로직의 기초). [S1] + +## 💻 코드 패턴 (Code patterns) +Combining AND and NOT to express a compound access-control rule (C): +```c +int isLoggedIn = 1; +int isAdmin = 0; +printf("Regular user: %d\n", isLoggedIn && !isAdmin); // 1 +printf("Has access: %d\n", isLoggedIn || isAdmin); // 1 +printf("Not logged in: %d\n", !isLoggedIn); // 0 +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Operators Comparison]], [[C Bitwise Operators]], [[C Conditions Logical]] +- **참조 맥락:** 논리 연산자 — 비트 연산자(Bitwise Operators) 챕터로 이어짐, 조건문의 논리 연산(Conditions Logical) 챕터와 직접 연결. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Logical Operators — https://www.w3schools.com/c/c_operators_logical.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Logical Operators" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Operators_Precedence.md b/10_Wiki/Dev/Topic_C/C_Operators_Precedence.md new file mode 100644 index 00000000..c3c93440 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Operators_Precedence.md @@ -0,0 +1,66 @@ +--- +id: c-operators-precedence +title: "C Operator Precedence" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["order of operations", "parentheses precedence", "C 연산자 우선순위"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "operators", "precedence"] +raw_sources: ["https://www.w3schools.com/c/c_operators_precedence.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Operator Precedence]] + +## 🎯 한 줄 통찰 (One-line insight) +Same-precedence operators like `+` and `-` are evaluated strictly LEFT TO RIGHT, not right-to-left or by some other rule — `10 - 2 + 5` equals `(10 - 2) + 5 = 13`, not `10 - (2 + 5) = 3` — meaning precedence alone doesn't fully determine evaluation order for operators at the same tier; associativity direction matters too, and parentheses are the only reliable way to override either. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Precedence hierarchy (highest to lowest)** — `()` parentheses → `*`/`/`/`%` → `+`/`-` → comparison (`>`,`<`,`>=`,`<=`) → equality (`==`,`!=`) → `&&` → `||` → `=`. [S1] +- **Multiplication before addition** — `2 + 3 * 4` evaluates the `*` first, giving `14`, not `20`. [S1] +- **Parentheses override precedence entirely** — `(2 + 3) * 4` forces the addition first, giving `20`. [S1] +- **Left-to-right associativity for same-tier operators** — `10 - 2 + 5` evaluates as `(10 - 2) + 5 = 13` since `-` and `+` share the same precedence tier and are evaluated left to right. [S1] + +## 📖 세부 내용 (Details) +- Precedence demonstration: `int result1 = 2 + 3 * 4; // 2 + 12 = 14` versus `int result2 = (2 + 3) * 4; // 5 * 4 = 20`. [S1] +- Left-to-right associativity demonstration: `int result1 = 10 - 2 + 5; // (10 - 2) + 5 = 13` versus `int result2 = 10 - (2 + 5); // 10 - 7 = 3`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **동일 우선순위 연산자의 결합 방향**: +와 -가 같은 우선순위 등급이라도 왼쪽에서 오른쪽으로 순서대로 계산된다는 점이 별도로 확인되며, 괄호 없이는 이 순서를 바꿀 수 없다는 것이 강조됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 계산 순서가 애매할 때 항상 괄호를 사용하라는 권고가 이 챕터 전체를 관통하는 실전 원칙이다. [S1] + +## 💻 코드 패턴 (Code patterns) +Same-precedence operators evaluate strictly left to right unless parentheses override it (C): +```c +int result1 = 10 - 2 + 5; // (10 - 2) + 5 = 13 +int result2 = 10 - (2 + 5); // 10 - 7 = 3 +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Bitwise Operators]], [[C Strings]] +- **참조 맥락:** 연산자 섹션 마지막 — 문자열(Strings) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Operator Precedence — https://www.w3schools.com/c/c_operators_precedence.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Operator Precedence" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Organize_Code.md b/10_Wiki/Dev/Topic_C/C_Organize_Code.md new file mode 100644 index 00000000..3fe46258 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Organize_Code.md @@ -0,0 +1,76 @@ +--- +id: c-organize-code +title: "C Organize Code" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["header files", "include guard", "modular programming", "C 코드 조직화"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "header-files", "modular-programming"] +raw_sources: ["https://www.w3schools.com/c/c_organize_code.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Organize Code]] + +## 🎯 한 줄 통찰 (One-line insight) +The `#ifndef`/`#define`/`#endif` include guard exists to solve a problem that's invisible in small single-file programs but inevitable in multi-file ones — preventing the SAME header from being included twice (directly or transitively through other headers) which would otherwise cause duplicate-declaration compile errors, making the include guard a defensive pattern every C header should carry regardless of whether the problem has actually occurred yet. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Modular programming** — splitting code into smaller, reusable `.c`/`.h` file pairs for readability, maintainability, and debuggability; optional for small programs, valuable for larger ones. [S1] +- **Header files (`.h`)** — declare functions, share variables/constants/macros across files, and organize code into logical modules; typically contain declarations, macros, and struct definitions (not full function bodies). [S1] +- **Include guard (`#ifndef`/`#define`/`#endif`)** — prevents a header from being included more than once by accident, avoiding duplicate-declaration errors; a standard, recommended practice in every C header. [S1] +- **Separation of declaration and definition** — the `.h` file declares function signatures; the corresponding `.c` file provides the actual function bodies. [S1] +- **Multi-file compilation** — the compiler must be given ALL relevant `.c` files at once (e.g. `gcc main.c calc.c -o program`) to link them into one executable. [S1] + +## 📖 세부 내용 (Details) +- Header file with include guard: `#ifndef CALC_H #define CALC_H int add(int x, int y); int subtract(int x, int y); #endif` (calc.h). [S1] +- Corresponding source file: `#include "calc.h" int add(int x, int y) { return x + y; } int subtract(int x, int y) { return x - y; }` (calc.c). [S1] +- Consuming the module: `#include #include "calc.h" int main() { printf("5 + 5 = %d\n", add(5, 5)); printf("6 - 4 = %d\n", subtract(6, 4)); return 0; }` (main.c). [S1] +- Compiling multiple files together: `gcc main.c calc.c -o program`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **include guard의 필요성**: 작은 프로그램에서는 문제가 드러나지 않지만, 헤더가 여러 파일에서 직간접적으로 중복 포함될 경우 중복 선언 에러가 발생할 수 있어 모든 C 헤더에 include guard를 넣는 것이 표준 관행으로 권장됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — calc.h/calc.c/main.c로 나눈 계산기 모듈 예제가 여러 파일로 나뉜 프로그램을 gcc로 함께 컴파일하는 실전 워크플로우를 그대로 보여준다. [S1] + +## 💻 코드 패턴 (Code patterns) +A header file with an include guard, plus the gcc command to compile the multi-file project (C): +```c +// calc.h +#ifndef CALC_H +#define CALC_H +int add(int x, int y); +int subtract(int x, int y); +#endif +``` +```bash +gcc main.c calc.c -o program +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Comments]], [[C Functions]], [[C Variables]] +- **참조 맥락:** Basics 섹션 마지막 — 변수(Variables) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Organize Code — https://www.w3schools.com/c/c_organize_code.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Organize Code" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Output.md b/10_Wiki/Dev/Topic_C/C_Output.md new file mode 100644 index 00000000..5e9d4823 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Output.md @@ -0,0 +1,71 @@ +--- +id: c-output +title: "C Output (Print Text)" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["printf", "C 출력"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "output", "printf"] +raw_sources: ["https://www.w3schools.com/c/c_output.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Output (Print Text)]] + +## 🎯 한 줄 통찰 (One-line insight) +`printf()` never adds a trailing newline automatically — three consecutive `printf()` calls in the source's example all render on the SAME line with no separation, meaning C output concatenation is entirely the programmer's responsibility, unlike languages whose default print function appends a newline by convention. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`printf()`** — the standard function for printing text to the screen. [S1] +- **Double-quote requirement** — text to print must be wrapped in `""`; omitting the quotes causes a compile error. [S1] +- **No automatic newline** — calling `printf()` multiple times concatenates all output onto one line unless the programmer explicitly inserts a newline (covered in the next chapter). [S1] + +## 📖 세부 내용 (Details) +- Basic print: `printf("Hello World!");`. [S1] +- Quote requirement demonstrated by contrast: `printf("This sentence will work!");` versus the error-producing `printf(This sentence will produce an error.);`. [S1] +- Newline-less concatenation: `printf("Hello World!"); printf("I am learning C."); printf("And it is awesome!");` — all three render on one continuous line. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **printf()는 줄바꿈을 자동 삽입하지 않음**: 세 개의 printf() 호출 결과가 모두 한 줄에 이어져 출력된다는 점이 직접 예시로 증명되며, 줄바꿈을 원한다면 별도로 처리해야 함이 다음 챕터로 예고됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 여러 printf() 호출을 한 줄에 이어붙이는 특성을 이해하는 것이 다음 챕터(줄바꿈)로 넘어가는 실전 동기가 된다. [S1] + +## 💻 코드 패턴 (Code patterns) +Multiple printf() calls concatenating onto one line with no automatic newline (C): +```c +#include +int main() { + printf("Hello World!"); + printf("I am learning C."); + printf("And it is awesome!"); + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Statements]], [[C Comments]], [[C Newline]] +- **참조 맥락:** 텍스트 출력 기초 — 주석(Comments) 챕터로 이어짐, 줄바꿈(Newline) 챕터와 직접 연결. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Output (Print Text) — https://www.w3schools.com/c/c_output.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Output (Print Text)" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Pointer_To_Pointer.md b/10_Wiki/Dev/Topic_C/C_Pointer_To_Pointer.md new file mode 100644 index 00000000..96cd45a3 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Pointer_To_Pointer.md @@ -0,0 +1,69 @@ +--- +id: c-pointer-to-pointer +title: "C Pointer to Pointer" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["double pointer", "int**", "C 포인터의 포인터"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "pointers", "double-pointer"] +raw_sources: ["https://www.w3schools.com/c/c_pointer_to_pointer.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Pointer to Pointer]] + +## 🎯 한 줄 통찰 (One-line insight) +The source's own analogy nails the concept exactly: "a normal pointer is like a note with an address on it; a pointer to pointer is like another note telling you where that first note is kept" — meaning `**pptr` isn't some special new operation, it's just applying the SAME dereference (`*`) operator TWICE in a row, following one address to find a second address, then following that to find the actual value. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Pointer to pointer (double pointer, `int **pptr`)** — a pointer whose stored value is the ADDRESS OF ANOTHER POINTER, not a regular variable. [S1] +- **One extra level of indirection** — `*ptr` gives a variable's value directly; `**pptr` gives the same value by following TWO addresses in sequence (pptr → ptr → myNum). [S1] +- **Mutability through both levels** — assigning through `**pptr = 20;` changes the ORIGINAL variable (`myNum`), just as `*ptr = 20;` would. [S1] +- **Use cases** — passing pointers into functions (so the function can modify what a pointer points to) and working with complex/nested data structures. [S1] + +## 📖 세부 내용 (Details) +- Declaring and reading through two levels: `int myNum = 10; int *ptr = &myNum; int **pptr = &ptr; printf("**pptr = %d\n", **pptr); // 10`. [S1] +- Modifying the original variable through the double pointer: `int myNum = 5; int *ptr = &myNum; int **pptr = &ptr; **pptr = 20; printf("myNum = %d\n", myNum); // 20`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 함수에 포인터를 전달해 그 포인터 자체를 함수 안에서 바꿔야 할 때, 그리고 복잡한 자료구조를 다룰 때 포인터의 포인터가 유용하다고 원문에 명시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Modifying the original variable through two levels of pointer indirection (C): +```c +int myNum = 5; +int *ptr = &myNum; +int **pptr = &ptr; +**pptr = 20; // changes myNum +printf("myNum = %d\n", myNum); // prints 20 +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Pointers Arrays]], [[C Memory Access]], [[C Functions Pointers]] +- **참조 맥락:** 포인터의 포인터 — 동적 메모리 접근(Memory Access) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Pointer to Pointer — https://www.w3schools.com/c/c_pointer_to_pointer.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Pointer to Pointer" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Pointers.md b/10_Wiki/Dev/Topic_C/C_Pointers.md new file mode 100644 index 00000000..1dd00bd0 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Pointers.md @@ -0,0 +1,70 @@ +--- +id: c-pointers +title: "C Pointers" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["pointer declaration", "dereference operator", "C 포인터"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "pointers"] +raw_sources: ["https://www.w3schools.com/c/c_pointers.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Pointers]] + +## 🎯 한 줄 통찰 (One-line insight) +The `*` symbol does two OPPOSITE jobs depending on where it appears — in a declaration (`int* ptr`) it CREATES a pointer, but everywhere else (`*ptr`) it DEREFERENCES one to retrieve the pointed-to value — and the source explicitly flags this dual meaning as a common source of confusion, since the same character means "this variable will hold an address" in one context and "give me what's at this address" in another. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Pointer** — a variable that stores another variable's memory address as its value. [S1] +- **Type-matched declaration** — a pointer's declared type must match the type of variable it points to (`int* ptr` for an `int`). [S1] +- **`*` in declaration vs. elsewhere** — `int* ptr;` creates a pointer variable; `*ptr` (outside declaration) dereferences it to get the pointed-to value. [S1] +- **Two equivalent declaration styles** — `int* myNum;` and `int *myNum;` are functionally identical; spacing around `*` is purely stylistic. [S1] +- **Why pointers matter** — enable direct memory manipulation (reducing code, improving performance), are essential for implementing data structures (lists, trees, graphs), and are sometimes REQUIRED (e.g. file I/O, memory management). [S1] + +## 📖 세부 내용 (Details) +- Creating a pointer and reading the address it stores: `int myAge = 43; int* ptr = &myAge; printf("%p\n", ptr); // same address as &myAge`. [S1] +- Dereferencing to get the pointed-to value: `printf("%d\n", *ptr); // 43 (myAge's value, accessed via the pointer)`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **`*`의 이중 의미**: 선언에서 쓰인 int* ptr는 포인터 변수를 만들지만, 선언이 아닌 곳에서 쓰인 *ptr는 역참조 연산자로 동작한다는 점이 혼동 요소로 명시적으로 지적됨. [S1] +- **포인터 취급 시 주의사항**: 다른 메모리 주소에 저장된 데이터를 손상시킬 수 있으므로 포인터는 신중하게 다뤄야 한다고 경고됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 리스트/트리/그래프 같은 자료구조를 구현하거나 파일 및 메모리 관리 작업을 할 때 포인터가 필수적으로 쓰인다고 원문에서 직접 언급됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Creating a pointer, then reading the address vs. the dereferenced value (C): +```c +int myAge = 43; // Variable declaration +int* ptr = &myAge; // Pointer declaration +printf("%p\n", ptr); // Reference: memory address of myAge +printf("%d\n", *ptr); // Dereference: value of myAge (43) +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Memory Address]], [[C Pointers Arithmetic]] +- **참조 맥락:** 포인터 기초 — 포인터 연산(Pointers Arithmetic) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Pointers — https://www.w3schools.com/c/c_pointers.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Pointers" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Pointers_Arithmetic.md b/10_Wiki/Dev/Topic_C/C_Pointers_Arithmetic.md new file mode 100644 index 00000000..4b1145e7 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Pointers_Arithmetic.md @@ -0,0 +1,75 @@ +--- +id: c-pointers-arithmetic +title: "C Pointer Arithmetic" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["pointer increment", "pointer subtraction", "type-scaled pointer movement", "C 포인터 연산"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "pointers", "pointer-arithmetic"] +raw_sources: ["https://www.w3schools.com/c/c_pointers_arithmetic.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Pointer Arithmetic]] + +## 🎯 한 줄 통찰 (One-line insight) +Adding `1` to a pointer never means "move forward by 1 byte" — it means "move forward by the SIZE of whatever type the pointer points to" — so from the same starting address, `int* + 1` jumps 4 bytes while `char* + 1` jumps only 1 byte, meaning pointer arithmetic is silently type-scaled, and mixing up pointer types is explicitly called out as a common mistake that lands you at the wrong memory location entirely. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Pointer arithmetic** — changing a pointer's VALUE to make it reference a different element, exploiting the fact that array elements sit contiguously in memory. [S1] +- **`++`/`--`/`+=`/`-=` on pointers** — move the pointer forward/backward by one (or N) elements, just like a loop counter. [S1] +- **Type-scaled movement** — `p + 1` advances by `sizeof(pointed-to type)` bytes, not literally 1 byte; an `int*` moves 4 bytes per step while a `char*` moves 1 byte per step. [S1] +- **Pointer subtraction (distance)** — subtracting two pointers INTO THE SAME ARRAY yields the number of ELEMENTS between them, not bytes; only valid when both pointers reference the same array. [S1] +- **Pointer-driven loop** — looping by incrementing the pointer itself (`p++`) instead of indexing (`myNumbers[i]`) needs no separate index variable at all. [S1] + +## 📖 세부 내용 (Details) +- Accessing array elements via pointer offset: `int myNumbers[4] = {25, 50, 75, 100}; int *p = myNumbers; printf("%d\n", *p); printf("%d\n", *(p + 1)); // 50`. [S1] +- Moving a pointer with increment/decrement/step: `p++; // next element p--; // previous element p += 2; // jump 2 elements`. [S1] +- Pointer subtraction giving element count: `int *start = &myNumbers[1]; int *end = &myNumbers[4]; printf("%ld\n", end - start); // 3 elements apart`. [S1] +- Type-dependent step size proven side by side: `int *pi = myNumbers; // moves by sizeof(int), typically 4 bytes char *pc = letters; // moves by 1 byte`. [S1] +- Pointer-only loop (no index variable): `int *p = myNumbers; for (int i = 0; i < 4; i++) { printf("%d\n", *p); p++; }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **포인터 이동은 타입에 따라 크기가 다름**: int*는 한 칸 이동 시 보통 4바이트, char*는 1바이트만 이동한다는 점이 동일한 시작 주소에서 직접 비교되어 확인되며, 타입을 혼동하면 잘못된 메모리 위치를 가리키게 된다고 경고됨. [S1] +- **배열 경계를 벗어나는 이동 금지**: 배열의 끝을 한 칸 넘어선 위치까지는 포인터 비교용으로만 안전하며, 그 값을 실제로 역참조해서는 안 된다는 점이 명시됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 인덱스 변수 없이 포인터 자체를 증가시키며 배열을 순회하는 방식이 메모리를 직접 다루는 실전 코드에서 흔히 쓰이는 패턴으로 소개됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Looping through an array by advancing the pointer itself, with no index variable (C): +```c +int myNumbers[4] = {25, 50, 75, 100}; +int *p = myNumbers; // start of array +for (int i = 0; i < 4; i++) { + printf("%d\n", *p); + p++; // move to next element +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Pointers]], [[C Pointers Arrays]] +- **참조 맥락:** 포인터 연산 — 포인터와 배열(Pointers Arrays) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Pointer Arithmetic — https://www.w3schools.com/c/c_pointers_arithmetic.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Pointer Arithmetic" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Pointers_Arrays.md b/10_Wiki/Dev/Topic_C/C_Pointers_Arrays.md new file mode 100644 index 00000000..0f976125 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Pointers_Arrays.md @@ -0,0 +1,71 @@ +--- +id: c-pointers-arrays +title: "C Pointers and Arrays" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["array name as pointer", "array-pointer equivalence", "C 포인터와 배열"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "pointers", "arrays"] +raw_sources: ["https://www.w3schools.com/c/c_pointers_arrays.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Pointers and Arrays]] + +## 🎯 한 줄 통찰 (One-line insight) +An array's NAME already IS a pointer to its first element — proven directly by printing `myNumbers` and `&myNumbers[0]` and getting the IDENTICAL address — meaning `*myNumbers` (dereferencing the bare array name) works exactly like `myNumbers[0]`, and the entire array-indexing syntax `arr[i]` is really syntactic sugar over pointer arithmetic (`*(arr + i)`) that's been running underneath the whole time. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Array name = pointer to first element** — `myNumbers` and `&myNumbers[0]` evaluate to the exact same address. [S1] +- **`*arrayName`** — dereferences the array's implicit pointer to get the FIRST element's value, equivalent to `arrayName[0]`. [S1] +- **`*(arrayName + i)`** — equivalent to `arrayName[i]`; offsetting the array-as-pointer by `i` and dereferencing reaches the same element as bracket indexing. [S1] +- **Mutation via dereference** — `*myNumbers = 13;` changes the first element just like `myNumbers[0] = 13;` would. [S1] +- **Element memory layout confirms the size math** — consecutive `int` elements' addresses differ by exactly `sizeof(int)` (4 bytes), so an array of 4 ints occupies 16 bytes total. [S1] + +## 📖 세부 내용 (Details) +- Proving array-name-equals-pointer: `printf("%p\n", myNumbers); printf("%p\n", &myNumbers[0]); // identical addresses`. [S1] +- Dereferencing the bare array name for the first element: `printf("%d", *myNumbers); // 25 (same as myNumbers[0])`. [S1] +- Offsetting to reach later elements: `printf("%d\n", *(myNumbers + 1)); // 50 printf("%d", *(myNumbers + 2)); // 75`. [S1] +- Mutating through dereference: `*myNumbers = 13; *(myNumbers + 1) = 17;` changes the first and second elements. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **배열 이름은 이미 포인터**: 배열 이름을 그대로 출력한 주소와 &배열[0]으로 얻은 주소가 완전히 동일하다는 점이 직접 증명되며, 이는 배열 인덱싱(arr[i])이 실제로는 포인터 연산(*(arr+i))의 편의 문법임을 시사함. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +대용량 배열이나 2차원 배열, 그리고 배열인 문자열(string)에 접근할 때 포인터 방식이 더 효율적이고 빠르다는 점이 원문에서 직접 언급됨. [S1] + +## 💻 코드 패턴 (Code patterns) +An array's name and the address of its first element are identical (C): +```c +int myNumbers[4] = {25, 50, 75, 100}; +printf("%p\n", myNumbers); // e.g. 0x7ffe70f9d8f0 +printf("%p\n", &myNumbers[0]); // same address: 0x7ffe70f9d8f0 +printf("%d", *myNumbers); // 25, same as myNumbers[0] +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Pointers Arithmetic]], [[C Pointer To Pointer]], [[C Arrays Multi]] +- **참조 맥락:** 포인터와 배열의 관계 — 포인터의 포인터(Pointer To Pointer) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Pointers and Arrays — https://www.w3schools.com/c/c_pointers_arrays.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Pointers and Arrays" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Random_Numbers.md b/10_Wiki/Dev/Topic_C/C_Random_Numbers.md new file mode 100644 index 00000000..4f79fa16 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Random_Numbers.md @@ -0,0 +1,78 @@ +--- +id: c-random-numbers +title: "C Random Numbers" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["rand() srand()", "seeding random", "dice roll example", "C 난수"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "random", "stdlib"] +raw_sources: ["https://www.w3schools.com/c/c_random_numbers.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Random Numbers]] + +## 🎯 한 줄 통찰 (One-line insight) +Without calling `srand()`, `rand()` produces the EXACT SAME sequence of numbers every single time the program runs — it's not "random" by default at all, just deterministic-looking — and the standard fix (seeding with `time(NULL)`) works only because the current time is itself always different, meaning C's "randomness" is really pseudo-randomness bootstrapped from an ever-changing external value. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`rand()`** (from ``) — returns a random integer, but deterministic/repeatable unless seeded. [S1] +- **`srand(seed)`** — sets the starting point for `rand()`'s sequence; without it, the sequence repeats identically on every run. [S1] +- **Time as a seed** — `srand(time(NULL))` (requiring ``) uses the current time as the seed since it's always changing, producing different sequences run to run. [S1] +- **Call `srand()` exactly once** — specifically at the start of `main()`, NOT repeatedly inside a loop (re-seeding inside a loop would reset the sequence and undermine randomness). [S1] +- **Range restriction via modulo** — `rand() % N` maps the result into the range `0` to `N-1`; adding an offset shifts the range further (e.g. `(rand() % 6) + 1` for 1-6). [S1] + +## 📖 세부 내용 (Details) +- Unseeded rand() (repeats every run): `int r = rand(); printf("%d\n", r);`. [S1] +- Properly seeded rand(): `srand(time(NULL)); printf("%d\n", rand());` — different results each run. [S1] +- Restricting to a 0-9 range: `int x = rand() % 10; // 0..9`. [S1] +- Dice-roll simulation combining modulo and offset: `int dice1 = (rand() % 6) + 1; int dice2 = (rand() % 6) + 1; printf("You rolled %d and %d (total = %d)\n", dice1, dice2, dice1 + dice2);`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **시드 없이는 진짜 랜덤이 아님**: srand()를 호출하지 않으면 프로그램을 몇 번을 실행해도 항상 같은 숫자가 나온다는 점이 명시적으로 경고됨 — 진짜 다른 결과를 원하면 반드시 시드를 설정해야 함. [S1] +- **srand()는 반복문 안에서 재호출 금지**: main 시작 시 딱 한 번만 호출해야 하며, 루프 안에서 반복 호출하면 안 된다는 점이 팁으로 강조됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +주사위 두 개를 굴려 1-6 범위의 숫자를 뽑고 합계를 계산하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Simulating a dice roll using rand(), modulo, and an offset (C): +```c +#include +#include +#include +int main() { + srand(time(NULL)); // seed once, with the current time + int dice1 = (rand() % 6) + 1; + int dice2 = (rand() % 6) + 1; + printf("You rolled %d and %d (total = %d)\n", dice1, dice2, dice1 + dice2); + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Math]], [[C Date Time]], [[C Booleans]] +- **참조 맥락:** 수학 및 난수 섹션 마지막 — 불리언(Booleans) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Random Numbers — https://www.w3schools.com/c/c_random_numbers.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Random Numbers" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Scope.md b/10_Wiki/Dev/Topic_C/C_Scope.md new file mode 100644 index 00000000..6f88fffc --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Scope.md @@ -0,0 +1,79 @@ +--- +id: c-scope +title: "C Variable Scope" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["local scope", "global scope", "shadowing", "C 변수 스코프"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "scope"] +raw_sources: ["https://www.w3schools.com/c/c_scope.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Variable Scope]] + +## 🎯 한 줄 통찰 (One-line insight) +When a local variable shares a name with a global variable, C doesn't merge or conflict them — it silently treats them as TWO COMPLETELY SEPARATE variables, and the source's own example proves it: the function prints its local `x` (22) while `main()` prints the untouched global `x` (5), meaning name collision between scopes causes no error at all, just quiet shadowing that can confuse anyone reading the code without realizing two different `x`s exist. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Scope** — the region of code where a variable is accessible; in C, a variable is only usable within the region it was created. [S1] +- **Local scope** — a variable declared INSIDE a function belongs only to that function; using it outside causes a compile error. [S1] +- **Global scope** — a variable declared OUTSIDE any function is accessible from ANY scope, both other functions and `main()`. [S1] +- **Name collision = shadowing, not conflict** — a local variable with the SAME NAME as a global one creates two independent variables; inside the function, the LOCAL one takes precedence and the global remains untouched. [S1] +- **Global mutability risk** — because globals are reachable from anywhere, any function can silently modify one (e.g. `++x`), making the program's state harder to reason about. [S1] +- **Recommended practice** — prefer local variables for maintainability; understand globals because they appear often in existing/collaborative C code. [S1] + +## 📖 세부 내용 (Details) +- Local variable inaccessible outside its function (produces an error): `void myFunction() { int x = 5; } int main() { myFunction(); printf("%d", x); /* error: x not accessible here */ }`. [S1] +- Global variable accessible everywhere: `int x = 5; void myFunction() { printf("%d", x); } int main() { myFunction(); printf("%d", x); }`. [S1] +- Same-name shadowing — two independent variables coexist: `int x = 5; void myFunction() { int x = 22; printf("%d\n", x); // 22, local } int main() { myFunction(); printf("%d\n", x); // 5, global — untouched }`. [S1] +- A function silently mutating a global: `int x = 5; void myFunction() { printf("%d\n", ++x); } int main() { myFunction(); printf("%d\n", x); } // x is now 6`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **동일 이름의 지역/전역 변수는 충돌이 아니라 완전히 별개의 변수**: 함수 안의 지역 x(22)와 함수 밖의 전역 x(5)가 이름은 같지만 서로 독립적으로 존재하며, 함수 내부에서는 지역 변수가 우선한다는 점이 직접 예제로 증명됨. [S1] +- **전역 변수는 어디서든 수정 가능**: 어떤 함수든 전역 변수를 조용히 변경할 수 있으므로 주의해서 다뤄야 한다고 명시적으로 경고됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 기존 C 프로그램이나 협업 코드에서 전역 변수를 마주칠 가능성이 높으므로 스코프 동작 원리를 이해해두는 것이 실전에서 유용하다고 원문에 명시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +A local variable shadowing a global variable of the same name (C): +```c +int x = 5; // global +void myFunction() { + int x = 22; // local, shadows the global + printf("%d\n", x); // 22 (local x) +} +int main() { + myFunction(); + printf("%d\n", x); // 5 (global x, untouched) + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Functions Inline]], [[C Storage Classes]], [[C User Input]] +- **참조 맥락:** 스코프 섹션 유일 챕터 — 사용자 입력(User Input) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Variable Scope — https://www.w3schools.com/c/c_scope.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Variable Scope" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Statements.md b/10_Wiki/Dev/Topic_C/C_Statements.md new file mode 100644 index 00000000..c6cab434 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Statements.md @@ -0,0 +1,67 @@ +--- +id: c-statements +title: "C Statements" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["semicolon", "C 명령문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "statements"] +raw_sources: ["https://www.w3schools.com/c/c_statements.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Statements]] + +## 🎯 한 줄 통찰 (One-line insight) +Forgetting a single semicolon produces a compiler error that points to the WRONG line — the source's own example shows a missing `;` after one `printf()` call raising `error: expected ';' before 'return'`, meaning the compiler flags the token immediately AFTER the missing semicolon rather than the actual offending line, a common beginner confusion worth knowing in advance. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Statement** — one instruction in a C program; the building block of all C code. [S1] +- **Mandatory semicolon termination** — every statement must end with `;`; omitting it causes a compile-time error. [S1] +- **Sequential execution** — multiple statements in a program execute strictly in the order they are written, one at a time. [S1] + +## 📖 세부 내용 (Details) +- Single statement: `printf("Hello World!");`. [S1] +- Missing-semicolon error demonstration: `printf("Hello World!")` (no trailing `;`) produces `error: expected ';' before 'return'` — the error references the NEXT statement, not the line actually missing the semicolon. [S1] +- Sequential multi-statement execution: `printf("Hello World!"); printf("Have a good day!"); return 0;` — runs top to bottom, printing "Hello World!" then "Have a good day!" before ending. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **에러 메시지의 위치 오프셋**: 세미콜론이 누락된 실제 줄이 아니라 그 다음 토큰(예: return)을 기준으로 에러가 보고된다는 점이 실전 디버깅 시 혼동을 일으킬 수 있다고 경고됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 세미콜론 누락 에러의 위치가 실제 원인과 다르다는 점을 미리 알아두면 실전 디버깅 시간을 단축할 수 있다. [S1] + +## 💻 코드 패턴 (Code patterns) +Three statements executing sequentially in source order (C): +```c +printf("Hello World!"); +printf("Have a good day!"); +return 0; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Syntax]], [[C Output]] +- **참조 맥락:** 명령문과 세미콜론 규칙 — 출력(Output) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Statements — https://www.w3schools.com/c/c_statements.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Statements" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Storage_Classes.md b/10_Wiki/Dev/Topic_C/C_Storage_Classes.md new file mode 100644 index 00000000..f2fa487a --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Storage_Classes.md @@ -0,0 +1,76 @@ +--- +id: c-storage-classes +title: "C Storage Classes" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["auto static register extern", "static local variable", "C 저장 클래스"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "storage-classes", "static"] +raw_sources: ["https://www.w3schools.com/c/c_storage_classes.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Storage Classes]] + +## 🎯 한 줄 통찰 (One-line insight) +A `static` local variable inside a function survives BETWEEN separate calls to that function — the source's `count()` example prints `1`, `2`, `3` across three separate calls specifically because `static` makes the variable retain its value instead of resetting to 0 each time, whereas an ordinary local variable would print `1`, `1`, `1` — demonstrating that `static` fundamentally changes a variable's LIFETIME, not just its scope. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Scope vs. storage class** — scope defines WHERE a variable can be used; storage class defines HOW LONG it lasts and WHERE it's stored — two independent concepts. [S1] +- **`auto`** — the default storage class for local variables inside functions; rarely written explicitly since it's already the default. [S1] +- **`static`** — a local variable keeps its value across separate function calls (rather than resetting each call); a global variable/function marked `static` becomes invisible outside its own file. [S1] +- **`register`** — suggests storing a variable in a CPU register for faster access; its address cannot be taken with `&`; considered mostly obsolete since modern compilers auto-optimize register allocation. [S1] +- **`extern`** — tells the compiler a variable/function is DEFINED in another file, used for sharing variables across multiple source files. [S1] + +## 📖 세부 내용 (Details) +- `static` preserving value across calls: `void count() { static int myNum = 0; myNum++; printf("num = %d\n", myNum); } int main() { count(); count(); count(); return 0; }` — outputs `num = 1`, `num = 2`, `num = 3` (removing `static` would reset to 1 each time). [S1] +- `extern` sharing a variable across files: `main.c` declares `extern int shared;` while `data.c` defines `int shared = 50;`, compiled together via `gcc main.c data.c -o program`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **static은 값을 유지, register는 사실상 구식**: static이 함수 호출 간 값을 보존한다는 점과, register 키워드는 현대 컴파일러가 알아서 최적화하므로 명시적으로 쓸 필요가 거의 없다는 점이 함께 언급됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — count() 함수가 호출될 때마다 값을 누적하는 static 카운터 패턴이 함수 호출 횟수를 추적하는 실전 활용의 대표 사례다. [S1] + +## 💻 코드 패턴 (Code patterns) +A static local variable retaining its value across separate function calls (C): +```c +void count() { + static int myNum = 0; // Keeps its value between calls + myNum++; + printf("num = %d\n", myNum); +} +int main() { + count(); // num = 1 + count(); // num = 2 + count(); // num = 3 + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Constants]], [[C Scope]], [[C Fixed Width Ints]] +- **참조 맥락:** 저장 클래스와 변수 생명주기 — 고정폭 정수(Fixed Width Ints) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Storage Classes — https://www.w3schools.com/c/c_storage_classes.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Storage Classes" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Strings.md b/10_Wiki/Dev/Topic_C/C_Strings.md new file mode 100644 index 00000000..95fc79af --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Strings.md @@ -0,0 +1,73 @@ +--- +id: c-strings +title: "C Strings" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["char array", "null terminator", "C 문자열"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "strings"] +raw_sources: ["https://www.w3schools.com/c/c_strings.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Strings]] + +## 🎯 한 줄 통찰 (One-line insight) +C has no true `String` type at all — a string is just an array of `char`s ending in a special `\0` null-terminator character, proven directly by the fact that `sizeof()` reports the SAME size (13 bytes) whether the string was written as a convenient literal (`"Hello World!"`) or manually spelled out character-by-character with an explicit `\0` at the end (`{'H','e',...,'!','\0'}`) — the literal syntax is pure convenience, not a different underlying type. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **No dedicated String type** — a C "string" is a `char` array; `char greetings[] = "Hello World!";` is the idiomatic way to create one. [S1] +- **`%s` format specifier** — used to print an entire string (as opposed to `%c` for a single character). [S1] +- **Index access** — since a string is an array, `greetings[0]` accesses its first character, printed with `%c`. [S1] +- **Mutable characters** — individual characters can be reassigned via index (`greetings[0] = 'J';`), changing the string in place. [S1] +- **Null terminator (`\0`)** — required at the end of a manually-built character-list string; string literals get it added automatically. [S1] +- **Loop-through pattern** — iterating a string's characters via a `for` loop, ideally using `sizeof(arr)/sizeof(arr[0])` for the length instead of a hardcoded number. [S1] + +## 📖 세부 내용 (Details) +- Modifying a single character: `char greetings[] = "Hello World!"; greetings[0] = 'J'; printf("%s", greetings); // Outputs Jello World!`. [S1] +- Manual character-list construction requiring an explicit null terminator: `char greetings[] = {'H','e','l','l','o',' ','W','o','r','l','d','!','\0'};`. [S1] +- Proving both construction methods produce identically-sized arrays: `printf("%zu\n", sizeof(greetings)); // 13` and `printf("%zu\n", sizeof(greetings2)); // 13` (literal form auto-adds `\0`). [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **문자열 리터럴과 수동 문자 나열의 동등성**: 두 방식 모두 결국 동일한 크기(13바이트, \0 포함)의 char 배열을 만든다는 점이 sizeof 비교로 직접 증명됨 — 리터럴은 단지 \0을 자동으로 추가해주는 편의 문법일 뿐. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +인사말과 이름을 조합해 환영 메시지를 만드는 예제(`"%s %s!", message, fname`)가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Looping through a string's characters using sizeof for a portable length calculation (C): +```c +char carName[] = "Volvo"; +int length = sizeof(carName) / sizeof(carName[0]); +int i; +for (i = 0; i < length; ++i) { + printf("%c\n", carName[i]); +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Operators Precedence]], [[C Arrays]], [[C Strings Esc]] +- **참조 맥락:** 문자열 섹션 첫 챕터 — 특수문자/이스케이프(Strings Esc) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Strings — https://www.w3schools.com/c/c_strings.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Strings" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Strings_Esc.md b/10_Wiki/Dev/Topic_C/C_Strings_Esc.md new file mode 100644 index 00000000..4efd62fa --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Strings_Esc.md @@ -0,0 +1,66 @@ +--- +id: c-strings-esc +title: "C Special Characters" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["escape characters", "backslash escape", "C 이스케이프 문자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "strings", "escape-characters"] +raw_sources: ["https://www.w3schools.com/c/c_strings_esc.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Special Characters]] + +## 🎯 한 줄 통찰 (One-line insight) +A literal double-quote inside a double-quoted string is fundamentally AMBIGUOUS to the compiler — `"We are the so-called "Vikings" from the north."` looks like three separate adjacent strings, not one string containing quotes — so `\"` isn't just a stylistic escape, it's the only way to disambiguate where the enclosing string actually ends. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **The core problem** — double quotes delimit C strings, so a literal `"` inside one prematurely ends the string as far as the compiler is concerned. [S1] +- **Core escape sequences** — `\'` (single quote), `\"` (double quote), `\\` (literal backslash). [S1] +- **Other common escapes** — `\n` (newline), `\t` (tab), `\0` (null terminator). [S1] +- **Backslash as the universal escape prefix** — turns the following character into a literal string character rather than a syntactic delimiter. [S1] + +## 📖 세부 내용 (Details) +- Escaping double quotes inside a string: `char txt[] = "We are the so-called \"Vikings\" from the north.";`. [S1] +- Escaping a single quote: `char txt[] = "It\'s alright.";`. [S1] +- Escaping a literal backslash: `char txt[] = "The character \\ is called backslash.";`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 큰따옴표가 포함된 인용문(예: "Vikings")을 문자열에 그대로 담아야 할 때 \" 이스케이프가 실전에서 바로 쓰인다. [S1] + +## 💻 코드 패턴 (Code patterns) +Escaping a literal double quote so it doesn't prematurely end the string (C): +```c +char txt[] = "We are the so-called \"Vikings\" from the north."; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Strings]], [[C Strings Functions]] +- **참조 맥락:** 이스케이프 문자 — 문자열 함수(Strings Functions) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Special Characters — https://www.w3schools.com/c/c_strings_esc.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Special Characters" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Strings_Functions.md b/10_Wiki/Dev/Topic_C/C_Strings_Functions.md new file mode 100644 index 00000000..0a3815db --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Strings_Functions.md @@ -0,0 +1,71 @@ +--- +id: c-strings-functions +title: "C String Functions" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["strlen strcat strcpy strcmp", "string.h", "C 문자열 함수"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "strings", "string-functions"] +raw_sources: ["https://www.w3schools.com/c/c_strings_functions.php"] +applied_in: [] +github_commit: "" +--- + +# [[C String Functions]] + +## 🎯 한 줄 통찰 (One-line insight) +`strlen()` and `sizeof()` measure fundamentally different things and diverge sharply once a buffer is oversized — for a 26-letter alphabet stored in a 50-byte array, `strlen()` still correctly reports 26 (it counts up to the `\0`), while `sizeof()` reports 50 (the array's total allocated memory), meaning `sizeof` is NEVER a reliable way to get "string length" once the array is larger than the string it holds. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **``** — the header required to use C's built-in string functions. [S1] +- **`strlen(str)`** — returns the string's character count UP TO (not including) the `\0` terminator. [S1] +- **`sizeof(arr)`** — returns the array's total allocated memory in bytes, INCLUDING the `\0` and any unused trailing space — not the string's actual content length. [S1] +- **`strcat(dest, src)`** — appends `src` onto the end of `dest`; `dest`'s buffer must be large enough to hold both strings combined. [S1] +- **`strcpy(dest, src)`** — copies `src`'s value into `dest`; `dest`'s buffer must be large enough for the copied content. [S1] +- **`strcmp(str1, str2)`** — returns `0` if the strings are equal, a non-zero value otherwise. [S1] + +## 📖 세부 내용 (Details) +- `strlen` vs `sizeof` on an exactly-sized array: `char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; strlen(alphabet) // 26, sizeof(alphabet) // 27` (27 includes `\0`). [S1] +- `strlen` vs `sizeof` on an OVERSIZED array — the critical divergence: `char alphabet[50] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; strlen(alphabet) // still 26, sizeof(alphabet) // 50` (the array's declared capacity, not content length). [S1] +- Concatenation requiring a big-enough destination buffer: `char str1[20] = "Hello "; char str2[] = "World!"; strcat(str1, str2); printf("%s", str1);`. [S1] +- Comparison returning 0 for equal strings, non-zero otherwise: `strcmp(str1, str2); // 0 if equal` / `strcmp(str1, str3); // -4 if not equal`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **sizeof는 문자열 길이 측정 도구가 아님**: 배열 크기가 실제 문자열보다 클 경우 sizeof는 할당된 전체 메모리(50)를 반환하지만 strlen은 여전히 실제 내용 길이(26)를 정확히 반환한다는 점이 명시적으로 대비됨 — sizeof를 문자열 길이 측정에 쓰면 안 된다는 강력한 경고. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — strcat으로 "Hello "와 "World!"를 합치는 예제가 문자열 연결의 표준 실전 활용이며, 대상 버퍼 크기를 미리 충분히 확보해야 한다는 주의사항이 함께 강조된다. [S1] + +## 💻 코드 패턴 (Code patterns) +strlen() and sizeof() diverging once the buffer is larger than the actual string content (C): +```c +char alphabet[50] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +printf("%zu\n", strlen(alphabet)); // 26 (actual content length) +printf("%zu\n", sizeof(alphabet)); // 50 (total allocated buffer size) +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Strings Esc]], [[C Data Types Sizeof]], [[C Math]] +- **참조 맥락:** 문자열 섹션 마지막 — 수학 함수(Math) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C String Functions — https://www.w3schools.com/c/c_strings_functions.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C String Functions" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Structs.md b/10_Wiki/Dev/Topic_C/C_Structs.md new file mode 100644 index 00000000..f2d8a05c --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Structs.md @@ -0,0 +1,80 @@ +--- +id: c-structs +title: "C Structures (structs)" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["struct keyword", "dot syntax", "C 구조체"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "structs"] +raw_sources: ["https://www.w3schools.com/c/c_structs.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Structures (structs)]] + +## 🎯 한 줄 통찰 (One-line insight) +Directly assigning a string literal to a struct's `char[]` member (`s1.myString = "Some text";`) produces a compile ERROR ("assignment to expression with array type") — the exact same restriction from the Strings chapter (arrays can't be reassigned wholesale) applies inside structs too, requiring `strcpy()` UNLESS the assignment happens at declaration time using the comma-separated initializer syntax, which is the one place string literals ARE allowed directly. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Structure (`struct`)** — groups multiple MIXED-type variables ("members") into one unit, unlike arrays which require a single uniform type. [S1] +- **Declaration + variable creation** — the `struct Name {...};` block only defines the TEMPLATE; you must separately declare `struct Name variableName;` to create an actual instance. [S1] +- **Dot syntax (`.`)** — accesses/assigns individual members (`s1.myNum = 13;`). [S1] +- **String members require `strcpy()`** — direct assignment (`s1.myString = "text";`) fails to compile; use `strcpy(s1.myString, "text");` instead. [S1] +- **Initializer-list exception** — at DECLARATION time, `struct myStructure s1 = {13, 'B', "Some text"};` allows string literals directly, no `strcpy()` needed — values must be listed in the same order as the members were declared. [S1] +- **Struct-to-struct copy** — `s2 = s1;` copies ALL members at once, including string arrays, without needing `strcpy()` per-field. [S1] +- **Template reuse** — one struct definition (e.g. `Car`) can be instantiated repeatedly with different values (`car1`, `car2`, `car3`), avoiding separate ad-hoc variable sets per entity. [S1] + +## 📖 세부 내용 (Details) +- The string-assignment error case: `s1.myString = "Some text"; // error: assignment to expression with array type`. [S1] +- The `strcpy()` fix: `strcpy(s1.myString, "Some text");`. [S1] +- Initializer-list shortcut bypassing `strcpy()`: `struct myStructure s1 = {13, 'B', "Some text"};`. [S1] +- Real-life template reuse: `struct Car { char brand[30]; char model[30]; int year; }; struct Car car1 = {"BMW", "X5", 1999}; struct Car car2 = {"Ford", "Mustang", 1969};`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **문자열 멤버 직접 대입 불가**: 구조체 안의 char 배열 멤버에도 배열 챕터와 동일한 제약이 적용되어 strcpy()가 필요하지만, 선언 시 초기화 리스트({...}) 문법에서는 예외적으로 문자열 리터럴을 직접 쓸 수 있다는 점이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +Car 구조체 하나로 BMW/Ford/Toyota 세 대의 서로 다른 자동차 정보를 저장하는 예제가 원문에서 직접 실전 활용 사례로 제시됨(하나의 템플릿, 여러 인스턴스). [S1] + +## 💻 코드 패턴 (Code patterns) +One struct template reused for multiple distinct real-world entities (C): +```c +struct Car { + char brand[30]; + char model[30]; + int year; +}; +int main() { + struct Car car1 = {"BMW", "X5", 1999}; + struct Car car2 = {"Ford", "Mustang", 1969}; + printf("%s %s %d\n", car1.brand, car1.model, car1.year); + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Arrays RealLife]], [[C Strings Functions]], [[C Structs Nested]] +- **참조 맥락:** 구조체 섹션 첫 챕터 — 중첩 구조체(Structs Nested) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Structures (structs) — https://www.w3schools.com/c/c_structs.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Structures (structs)" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Structs_Nested.md b/10_Wiki/Dev/Topic_C/C_Structs_Nested.md new file mode 100644 index 00000000..e6aab781 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Structs_Nested.md @@ -0,0 +1,79 @@ +--- +id: c-structs-nested +title: "C Nested Structures" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["struct inside struct", "layered data", "C 중첩 구조체"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "structs", "nested-structs"] +raw_sources: ["https://www.w3schools.com/c/c_structs_nested.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Nested Structures]] + +## 🎯 한 줄 통찰 (One-line insight) +Accessing a nested struct's member requires CHAINING dot syntax (`car1.owner.firstName`) rather than a single dot — each additional layer of nesting adds one more `.` hop, meaning the access path itself mirrors the data's logical hierarchy exactly (car → owner → firstName), making deeply nested structures self-documenting about their own structure just from how you reach a value. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Nested structure** — a struct that contains ANOTHER struct as one of its members, useful for grouping related data in layers. [S1] +- **Chained dot access** — reaching a nested member requires one `.` per layer of nesting (`car1.owner.firstName`, not a shortcut). [S1] +- **Composition over flattening** — instead of cramming an owner's first/last name directly into the `Car` struct, a separate `Owner` struct is composed INTO `Car`, keeping each struct focused on one concept. [S1] + +## 📖 세부 내용 (Details) +- Defining and nesting: `struct Owner { char firstName[30]; char lastName[30]; }; struct Car { char brand[30]; int year; struct Owner owner; };`. [S1] +- Initializing a nested struct by passing an already-built inner struct as one field: `struct Owner person = {"John", "Doe"}; struct Car car1 = {"Toyota", 2010, person};`. [S1] +- Chained access to reach the innermost value: `printf("Owner: %s %s\n", car1.owner.firstName, car1.owner.lastName);`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +자동차(Car) 구조체 안에 소유자(Owner) 구조체를 중첩시켜 자동차와 소유자 정보를 계층적으로 묶는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Chained dot-access to reach a value inside a nested struct (C): +```c +struct Owner { + char firstName[30]; + char lastName[30]; +}; +struct Car { + char brand[30]; + int year; + struct Owner owner; // Nested structure +}; +int main() { + struct Owner person = {"John", "Doe"}; + struct Car car1 = {"Toyota", 2010, person}; + printf("Owner: %s %s\n", car1.owner.firstName, car1.owner.lastName); + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Structs]], [[C Structs Padding]] +- **참조 맥락:** 중첩 구조체 — 구조체 정렬/패딩(Structs Padding) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Nested Structures — https://www.w3schools.com/c/c_structs_nested.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Nested Structures" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Structs_Padding.md b/10_Wiki/Dev/Topic_C/C_Structs_Padding.md new file mode 100644 index 00000000..edb05824 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Structs_Padding.md @@ -0,0 +1,70 @@ +--- +id: c-structs-padding +title: "C Struct Alignment and Padding" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["struct padding", "member reordering", "struct vs union size", "C 구조체 패딩"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "structs", "memory-alignment"] +raw_sources: ["https://www.w3schools.com/c/c_structs_padding.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Struct Alignment and Padding]] + +## 🎯 한 줄 통찰 (One-line insight) +Simply REORDERING a struct's members — with no change to what data it holds — can shrink its total size by a third: the exact same three members (`char`, `int`, `char`) occupy 12 bytes when declared `char, int, char` but only 8 bytes when reordered to `int, char, char`, because the compiler only needs to insert padding to align the LARGEST member (int) once, at the front, instead of bracketing it awkwardly between two chars. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Padding** — extra, unused bytes the compiler inserts between struct members so each member starts at a memory address aligned to its own size (e.g. an `int` starting at a multiple of 4), because aligned reads are faster for the CPU. [S1] +- **Size ≠ sum of members** — a struct with 1+4+1=6 bytes of actual data can occupy 12 bytes total once padding is added. [S1] +- **Reordering reduces padding** — placing larger members FIRST (before smaller ones) minimizes the total padding needed, shrinking overall struct size. [S1] +- **Structs vs unions: no padding in unions** — a union's members all share ONE memory location (sized to the largest member), so there's no padding BETWEEN members, though alignment rules for the shared location itself still apply. [S1] + +## 📖 세부 내용 (Details) +- Unpadded-looking struct that's actually 12 bytes: `struct Example { char a; int b; char c; };` — expected 6 bytes, actual 12 (1 + 3 padding + 4 + 1 + 3 padding, so `b` starts at a 4-byte-aligned offset and the total is also a multiple of 4). [S1] +- Reordered struct shrinking to 8 bytes: `struct Example { int b; char a; char c; };` — same three members, less padding needed since the int comes first. [S1] +- Struct vs union size contrast with identical members: `struct S { char a; int b; char c; };` (12 bytes) versus `union U { char a; int b; char c; };` (4 bytes, sized to the largest member `int`). [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **멤버 순서만으로 구조체 크기가 달라짐**: 동일한 세 멤버라도 char-int-char 순서면 12바이트, int-char-char 순서면 8바이트가 된다는 점이 직접 비교로 증명되며, 큰 타입을 앞에 배치하면 패딩을 줄일 수 있다는 실용적 팁으로 이어짐. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +저수준 메모리나 파일 포맷을 다루지 않는 한 이 문제를 신경 쓸 필요는 거의 없다고 원문에 명시되지만, 메모리가 중요한 대규모 프로그램에서는 멤버 순서 재배치로 구조체 크기를 줄이는 것이 실전 최적화 기법으로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Reordering struct members (larger types first) to reduce padding and shrink total size (C): +```c +// 12 bytes (char, int, char — more padding needed) +struct Example { char a; int b; char c; }; + +// 8 bytes (int, char, char — less padding needed) +struct Example { int b; char a; char c; }; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Structs Nested]], [[C Unions]], [[C Structs Pointers]] +- **참조 맥락:** 구조체 정렬/패딩 — 구조체와 포인터(Structs Pointers) 챕터로 이어짐, 유니온(Unions) 챕터와 직접 대비됨. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Struct Alignment and Padding — https://www.w3schools.com/c/c_structs_padding.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Struct Alignment and Padding" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Structs_Pointers.md b/10_Wiki/Dev/Topic_C/C_Structs_Pointers.md new file mode 100644 index 00000000..d870631c --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Structs_Pointers.md @@ -0,0 +1,77 @@ +--- +id: c-structs-pointers +title: "C Structs and Pointers" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["arrow operator", "struct pointer", "C 구조체 포인터"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "structs", "pointers"] +raw_sources: ["https://www.w3schools.com/c/c_structs_pointers.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Structs and Pointers]] + +## 🎯 한 줄 통찰 (One-line insight) +Passing a struct pointer into a function is the difference between the function seeing a temporary COPY versus the ORIGINAL — the `updateYear()` example modifies `c->year` inside the function and the change is visible back in `main()` afterward, specifically because a pointer (address) was passed rather than the struct itself, which would have been copied and discarded when the function returned. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`struct Type *ptr`** — declares a pointer to a struct, same `*` syntax as any other pointer type. [S1] +- **`->` (arrow operator)** — REPLACES the dot syntax when accessing members through a pointer; `ptr->member` is required instead of `ptr.member`. [S1] +- **Function mutation via pointer** — passing `&myCar` (the struct's address) lets a function permanently modify the original struct's members, unlike passing the struct by value. [S1] +- **Three motivations for struct pointers** — avoid copying large structs (performance/memory), allow functions to modify the original values, and enable dynamic struct creation via `malloc()` (previewed, covered later in Memory Management). [S1] + +## 📖 세부 내용 (Details) +- Basic pointer declaration and arrow-operator access: `struct Car car = {"Toyota", 2020}; struct Car *ptr = &car; printf("Brand: %s\n", ptr->brand); printf("Year: %d\n", ptr->year);`. [S1] +- Function that mutates the original struct via a pointer parameter: `void updateYear(struct Car *c) { c->year = 2025; } int main() { struct Car myCar = {"Toyota", 2020}; updateYear(&myCar); printf("Year: %d\n", myCar.year); }` — prints 2025, not 2020, because the function received the original struct's address. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **포인터 접근에는 화살표 연산자 필수**: 구조체 변수는 점(.) 문법을 쓰지만, 포인터를 통한 접근은 반드시 화살표(->) 연산자를 써야 한다는 점이 문법적 차이로 명시됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +자동차 구조체의 연식(year)을 함수 안에서 포인터를 통해 2025로 변경하고 그 변경이 main()에도 반영되는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +A function permanently modifying the original struct's field via a pointer parameter (C): +```c +struct Car { + char brand[30]; + int year; +}; +void updateYear(struct Car *c) { + c->year = 2025; // Change the year +} +int main() { + struct Car myCar = {"Toyota", 2020}; + updateYear(&myCar); // Pass a pointer so the function can change the year + printf("Year: %d\n", myCar.year); // 2025 + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Structs Padding]], [[C Pointers]], [[C Enums]] +- **참조 맥락:** 구조체와 포인터 — 열거형(Enums) 챕터로 이어짐, 포인터(Pointers) 챕터와 직접 연결. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Structs and Pointers — https://www.w3schools.com/c/c_structs_pointers.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Structs and Pointers" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Switch.md b/10_Wiki/Dev/Topic_C/C_Switch.md new file mode 100644 index 00000000..db139250 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Switch.md @@ -0,0 +1,77 @@ +--- +id: c-switch +title: "C Switch" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["switch case", "break keyword", "default keyword", "C switch 문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "switch"] +raw_sources: ["https://www.w3schools.com/c/c_switch.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Switch]] + +## 🎯 한 줄 통찰 (One-line insight) +`break` isn't optional cleanup — without it, C would keep executing every subsequent `case` block regardless of whether it matches, since `switch` on its own only decides WHERE to jump in, not where to stop; the source frames `break` as actively saving execution time by "ignoring" the rest of the switch block once a match is handled, implying that omitting it (fall-through) is a real and easy-to-make mistake in C, unlike languages where each case implicitly breaks. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`switch (expression)`** — evaluates the expression ONCE, then compares it against each `case` value to find a match. [S1] +- **`case x:`** — a candidate value to match against; its code block runs if the switch expression equals `x`. [S1] +- **`break`** — exits the switch block immediately once a matching case has been handled, preventing execution from continuing into subsequent cases. [S1] +- **`default:`** — optional; runs if no case matches; must be the LAST statement in the switch and does not need its own `break`. [S1] + +## 📖 세부 내용 (Details) +- Weekday-name lookup via switch: `int day = 4; switch (day) { case 1: printf("Monday"); break; ... case 4: printf("Thursday"); break; ... }` — outputs "Thursday" for day 4. [S1] +- Using default for unmatched cases: `int day = 4; switch (day) { case 6: printf("Today is Saturday"); break; case 7: printf("Today is Sunday"); break; default: printf("Looking forward to the Weekend"); }` — day 4 matches neither case 6 nor 7, so default runs. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **break 생략 시 다음 case로 계속 진행됨**: switch는 일치하는 case를 찾아 진입점만 결정할 뿐, break가 없으면 이후 모든 case의 코드가 계속 실행된다는 점(fall-through)이 암묵적으로 경고됨. [S1] +- **default는 반드시 마지막에 위치**: default 키워드는 switch 블록의 마지막 statement여야 하며 break가 필요 없다는 점이 명시적으로 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +요일 번호(1-7)를 요일 이름으로 변환하는 예제와, 주말이 아닌 요일에 대해 default로 "주말이 기대된다"는 메시지를 출력하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Using default to handle any value not matched by an explicit case (C): +```c +int day = 4; +switch (day) { + case 6: + printf("Today is Saturday"); + break; + case 7: + printf("Today is Sunday"); + break; + default: + printf("Looking forward to the Weekend"); +} +// Outputs "Looking forward to the Weekend" +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Conditions RealLife]], [[C While Loop]] +- **참조 맥락:** switch 섹션 유일 챕터 — 반복문(Loops) 섹션의 while 루프(While Loop) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Switch — https://www.w3schools.com/c/c_switch.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Switch" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Syntax.md b/10_Wiki/Dev/Topic_C/C_Syntax.md new file mode 100644 index 00000000..fec500e5 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Syntax.md @@ -0,0 +1,71 @@ +--- +id: c-syntax +title: "C Syntax" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["main function", "include stdio", "C 문법"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "syntax"] +raw_sources: ["https://www.w3schools.com/c/c_syntax.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Syntax]] + +## 🎯 한 줄 통찰 (One-line insight) +The compiler is explicitly indifferent to whitespace and line breaks — the source shows the ENTIRE `main()` body collapsible onto a single line (`int main(){printf("Hello World!");return 0;}`) and produces identical behavior — meaning C's multi-line formatting convention exists purely for human readability, not because the language requires it, unlike languages where indentation/newlines are syntactically meaningful. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`#include `** — includes a header enabling input/output functions like `printf()`; described as something that "almost always appears" in a C program. [S1] +- **`main()`** — the special function where program execution begins; code inside its `{}` is what actually runs. [S1] +- **Statement termination** — every C statement must end with a semicolon `;`. [S1] +- **`return 0`** — ends `main()` and sends a value back to the operating system; `0` conventionally signals "everything worked." [S1] +- **Whitespace insignificance** — blank lines and extra spaces are ignored by the compiler; used only to aid human readability. [S1] + +## 📖 세부 내용 (Details) +- Standard multi-line form: `#include int main() { printf("Hello World!"); return 0; }`. [S1] +- Equivalent single-line form (compiler behaves identically): `int main(){printf("Hello World!");return 0;}`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **줄바꿈/공백은 순전히 가독성 목적**: 컴파일러가 여러 줄로 쓰인 코드와 한 줄로 압축한 코드를 동일하게 처리한다는 점이 직접적인 코드 비교로 증명됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 이 챕터의 문장 단위 분해 설명이 이후 모든 C 코드를 읽는 기초 독해 능력의 토대가 된다. [S1] + +## 💻 코드 패턴 (Code patterns) +The canonical C program structure, annotated line by line: +```c +#include + +int main() { + printf("Hello World!"); + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Get Started]], [[C Statements]] +- **참조 맥락:** C 프로그램 구조 설명 — 명령문(Statements) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Syntax — https://www.w3schools.com/c/c_syntax.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Syntax" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Type_Conversion.md b/10_Wiki/Dev/Topic_C/C_Type_Conversion.md new file mode 100644 index 00000000..0d29dd46 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Type_Conversion.md @@ -0,0 +1,73 @@ +--- +id: c-type-conversion +title: "C Type Conversion" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["implicit conversion", "explicit conversion", "casting", "C 타입 변환"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "type-conversion", "casting"] +raw_sources: ["https://www.w3schools.com/c/c_type_conversion.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Type Conversion]] + +## 🎯 한 줄 통찰 (One-line insight) +Casting the RESULT of a division after the fact doesn't fix precision loss — `float sum = 5 / 2;` still prints `2.000000` because `5 / 2` is computed as INTEGER division BEFORE ever being assigned to `sum` — the cast must be applied to an OPERAND inside the division itself (`(float) 5 / 2`), proving that explicit conversion timing matters as much as the conversion existing at all. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Type conversion** — converting a value from one data type to another, either automatically (implicit) or manually (explicit). [S1] +- **Implicit conversion** — done automatically by the compiler (e.g. assigning `int` to `float`); risky in the REVERSE direction, since assigning `float` to `int` silently TRUNCATES the decimal part with no warning. [S1] +- **Explicit conversion (casting)** — manually placing a type in parentheses `(type)` before a value or variable to force conversion at a SPECIFIC point in an expression. [S1] +- **Casting must happen INSIDE the expression, not after** — `float sum = 5 / 2;` still integer-divides first (yielding 2.000000); only `float sum = (float) 5 / 2;` produces the correct 2.5, because casting one operand to `float` before the division forces the WHOLE division to be floating-point. [S1] + +## 📖 세부 내용 (Details) +- Implicit int-to-float (safe direction): `float myFloat = 9; // 9.000000`. [S1] +- Implicit float-to-int (risky, silently truncates): `int myInt = 9.99; // 9, the .99 is silently lost`. [S1] +- The casting-timing trap: `float sum = 5 / 2; // still 2.000000 — integer division happens BEFORE assignment`. [S1] +- The correct fix — casting an operand INSIDE the division: `float sum = (float) 5 / 2; // 2.500000`. [S1] +- Cleaning up the display with decimal precision: `printf("%.1f", sum); // 2.5`. [S1] +- Real-life percentage calculation combining casting with arithmetic: `int maxScore = 500; int userScore = 423; float percentage = (float) userScore / maxScore * 100.0; printf("User's percentage is %.2f", percentage);`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **결과가 아닌 피연산자에 캐스팅해야 함**: float sum = 5 / 2;처럼 결과 변수만 float로 선언해서는 정수 나눗셈이 먼저 일어나 여전히 2.000000이 나오며, (float) 5 / 2처럼 나눗셈 안의 피연산자를 캐스팅해야만 올바른 2.5가 나온다는 점이 명확히 대비됨. [S1] +- **암묵적 float→int 변환은 소수점을 조용히 버림**: 9.99를 int에 대입하면 경고 없이 9가 되어 .99가 사라진다는 점이 위험 요소로 명시됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +게임 점수(423/500)를 백분율로 정확히 계산하기 위해 userScore를 float로 캐스팅한 뒤 나누는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Casting an operand inside the division to force floating-point arithmetic (C): +```c +int maxScore = 500; +int userScore = 423; +float percentage = (float) userScore / maxScore * 100.0; +printf("User's percentage is %.2f", percentage); // 84.60 +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Files Write]], [[C Data Types Dec]], [[C Macros]] +- **참조 맥락:** 타입 변환 및 매크로 섹션 첫 챕터 — 전처리기와 매크로(Macros) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Type Conversion — https://www.w3schools.com/c/c_type_conversion.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Type Conversion" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Typedef.md b/10_Wiki/Dev/Topic_C/C_Typedef.md new file mode 100644 index 00000000..92900f92 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Typedef.md @@ -0,0 +1,80 @@ +--- +id: c-typedef +title: "C typedef" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["type alias", "typedef struct", "C typedef"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "typedef"] +raw_sources: ["https://www.w3schools.com/c/c_typedef.php"] +applied_in: [] +github_commit: "" +--- + +# [[C typedef]] + +## 🎯 한 줄 통찰 (One-line insight) +`typedef` changes ZERO runtime behavior — the source explicitly states "your code will work the same without it" — meaning its entire value is communicative: `Temperature today = 25.5;` behaves byte-for-byte identically to `float today = 25.5;`, but tells a HUMAN reader what the number represents, which is exactly why it becomes essential once structs nest three levels deep (Owner inside Car inside Dealership) and repeatedly typing `struct` at every level would obscure the actual hierarchy being expressed. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`typedef existingType NewName;`** — creates an alias for an existing type; purely a naming convenience with no behavioral effect. [S1] +- **Purely optional** — code behaves identically with or without it; the only benefit is readability/maintainability. [S1] +- **`typedef struct {...} Name;`** — the common pattern that lets you write `Name variable;` instead of `struct Name variable;` everywhere afterward. [S1] +- **Compounding benefit with nested structs** — as struct nesting grows deeper (Owner → Car → Dealership), typedef keeps each declaration and access chain readable by removing repeated `struct` keywords. [S1] + +## 📖 세부 내용 (Details) +- Simple type alias for clarity: `typedef float Temperature; Temperature today = 25.5; Temperature tomorrow = 18.6;` — `Temperature` communicates INTENT beyond just "this is a float." [S1] +- typedef with struct, side by side: `struct Car { char brand[30]; int year; }; // needs "struct" everywhere` versus `typedef struct { char brand[30]; int year; } Car; // "Car car2 = ..." works directly`. [S1] +- Three-level nested typedef'd structs kept readable: `typedef struct {...} Owner; typedef struct { ...; Owner owner; } Car; typedef struct { ...; Car featuredCar; } Dealership;` accessed via `d.featuredCar.owner.firstName`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **typedef는 선택 사항이며 동작에 영향 없음**: typedef 없이도 코드는 완전히 동일하게 동작하며, 유일한 이득은 가독성/유지보수성이라는 점이 원문에서 직접 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +Owner→Car→Dealership 3단계로 중첩된 구조체를 typedef로 깔끔하게 유지하는 예제가 원문에서 직접 실전 활용 사례로 제시됨(중첩이 깊어질수록 typedef의 이점이 커짐). [S1] + +## 💻 코드 패턴 (Code patterns) +typedef keeping deeply nested struct declarations readable (C): +```c +typedef struct { + char firstName[20]; + char lastName[20]; +} Owner; + +typedef struct { + char brand[20]; + int year; + Owner owner; +} Car; + +typedef struct { + char name[30]; + Car featuredCar; +} Dealership; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Unions]], [[C Enums]], [[C Structs Nested]], [[C Memory Address]] +- **참조 맥락:** 구조체·열거형·유니온 섹션 마지막 — 포인터 및 메모리(Pointers & Memory) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C typedef — https://www.w3schools.com/c/c_typedef.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C typedef" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Unions.md b/10_Wiki/Dev/Topic_C/C_Unions.md new file mode 100644 index 00000000..7f47e72f --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Unions.md @@ -0,0 +1,77 @@ +--- +id: c-unions +title: "C Unions" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["union keyword", "shared memory members", "C 유니온"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "unions"] +raw_sources: ["https://www.w3schools.com/c/c_unions.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Unions]] + +## 🎯 한 줄 통찰 (One-line insight) +Writing to ANY member of a union silently invalidates every other member's previously-stored value — the source's example shows `u1.myNum = 1000;` followed by `u1.myLetter = 'A';` leaves `myNum` printing "no longer reliable" garbage, because unlike a struct where each member owns separate memory, a union's members OVERLAP the exact same bytes, so the last write always wins and there's no compiler warning when you accidentally read a stale member. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`union`** — syntactically similar to `struct` (same declaration/dot-access style), but semantically opposite: all members share ONE memory location instead of each having its own. [S1] +- **Only one valid member at a time** — writing to any member overwrites the shared memory, silently invalidating whatever the previous member held. [S1] +- **Size = largest member** — `sizeof(union)` equals the size of its biggest member, NOT the sum of all members (unlike a struct, whose size is roughly the sum of members plus padding). [S1] +- **Use case** — when you only need to store ONE of several possible types at a time and memory savings matter; structs remain the default choice for storing/accessing multiple values simultaneously. [S1] + +## 📖 세부 내용 (Details) +- The stale-value trap: `union myUnion { int myNum; char myLetter; char myString[30]; }; u1.myNum = 1000; u1.myLetter = 'A'; printf("myNum: %d\n", u1.myNum); // no longer reliable printf("myLetter: %c\n", u1.myLetter); // 'A'`. [S1] +- Size determined by the largest member: `union myUnion { int myNum; char myString[36]; }; sizeof(u1); // 36 (the size of myString, the largest member)`. [S1] +- Contrast with an equivalent struct's size: the same two members (`int` + `char[36]`) as a STRUCT would total ~40 bytes (4 + 36), versus the union's 36 bytes. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **유니온의 마지막 대입만 유효**: 서로 다른 멤버에 순서대로 값을 쓰면 이전에 쓴 멤버의 값은 조용히 무효화된다는 점이 명시적으로 경고됨 — 컴파일러가 이를 알려주지 않으므로 프로그래머가 직접 관리해야 함. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 여러 타입 중 한 번에 하나만 저장하면서 메모리를 절약해야 하는 상황(예: 프로토콜 파싱)이 유니온의 대표적 활용 사례로 원문에 조건으로만 언급됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Writing to one union member silently invalidates the previously-stored member (C): +```c +union myUnion { + int myNum; + char myLetter; + char myString[30]; +}; +int main() { + union myUnion u1; + u1.myNum = 1000; + u1.myLetter = 'A'; // myNum is now invalid — same memory was overwritten + printf("myLetter: %c\n", u1.myLetter); // Prints 'A' + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Enums]], [[C Structs Padding]], [[C Typedef]] +- **참조 맥락:** 유니온 — typedef 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Unions — https://www.w3schools.com/c/c_unions.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Unions" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_User_Input.md b/10_Wiki/Dev/Topic_C/C_User_Input.md new file mode 100644 index 00000000..d8a84461 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_User_Input.md @@ -0,0 +1,71 @@ +--- +id: c-user-input +title: "C User Input" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["scanf function", "fgets function", "C 사용자 입력"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "user-input", "scanf", "fgets"] +raw_sources: ["https://www.w3schools.com/c/c_user_input.php"] +applied_in: [] +github_commit: "" +--- + +# [[C User Input]] + +## 🎯 한 줄 통찰 (One-line insight) +`scanf("%s", ...)` treats WHITESPACE as a terminator — the source's own demonstration types "John Doe" but the program only prints "John," silently dropping everything after the first space — which is exactly why `fgets()` exists as a SEPARATE tool specifically for multi-word input, meaning the choice between `scanf()` and `fgets()` isn't stylistic, it's dictated by whether the expected input could ever contain a space. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`scanf(format, &variable)`** — reads user input matching the given format specifier; requires the `&` reference operator for basic types (but NOT for strings, since an array name is already a pointer). [S1] +- **Multiple inputs in one call** — `scanf("%d %c", &myNum, &myChar);` reads several values matched to their respective format specifiers in order. [S1] +- **String input via `scanf("%s", name)`** — no `&` needed (array name = pointer); requires a large-enough buffer declared in advance (e.g. `char firstName[30]`). [S1] +- **`scanf`'s whitespace-termination limitation** — treats spaces/tabs as a terminating character, so it can only capture a SINGLE WORD even if the user types multiple words. [S1] +- **`fgets(buffer, sizeof(buffer), stdin)`** — reads a full LINE of text including spaces, the correct tool for multi-word input like a full name. [S1] + +## 📖 세부 내용 (Details) +- Basic numeric input: `int myNum; scanf("%d", &myNum);`. [S1] +- Multiple inputs in one call: `int myNum; char myChar; scanf("%d %c", &myNum, &myChar);`. [S1] +- String input demonstrating the space-termination trap: `char fullName[30]; scanf("%s", &fullName); // "Type your full name: John Doe" → prints only "Hello John"`. [S1] +- The `fgets()` fix for multi-word input: `char fullName[30]; fgets(fullName, sizeof(fullName), stdin); // "John Doe" → prints "Hello John Doe"`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **scanf("%s", ...)는 공백에서 끊김**: "John Doe"를 입력해도 공백을 종료 문자로 취급해 "John"만 출력된다는 점이 직접 예제로 증명되며, 여러 단어를 받으려면 fgets()를 써야 한다는 대안이 명확히 제시됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +사용자의 전체 이름(공백 포함)을 정확히 입력받기 위해 scanf() 대신 fgets()를 사용하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Reading a full line of text (including spaces) with fgets() instead of scanf() (C): +```c +char fullName[30]; +printf("Type your full name: \n"); +fgets(fullName, sizeof(fullName), stdin); +printf("Hello %s", fullName); // "John Doe" prints in full +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Scope]], [[C Do While Loop]], [[C Date Time]] +- **참조 맥락:** 사용자 입력 — 날짜와 시간(Date Time) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C User Input — https://www.w3schools.com/c/c_user_input.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C User Input" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Variables.md b/10_Wiki/Dev/Topic_C/C_Variables.md new file mode 100644 index 00000000..1730ff78 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Variables.md @@ -0,0 +1,69 @@ +--- +id: c-variables +title: "C Variables" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["variable declaration", "int float char", "C 변수"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "variables"] +raw_sources: ["https://www.w3schools.com/c/c_variables.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Variables]] + +## 🎯 한 줄 통찰 (One-line insight) +Directly `printf()`-ing a variable like `printf(myNum)` is explicitly called out as an ERROR — unlike Python, Java, or C++ where a print function can accept a variable directly, C requires a separate "format specifier" placeholder mechanism to print any value, meaning the most natural instinct coming from another language (just print the variable) is a compile-breaking mistake in C. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Variable** — a named container for storing a data value; must have a specific TYPE that dictates what kind of data it can hold. [S1] +- **Three introductory types** — `int` (whole numbers), `float` (decimal numbers), `char` (a single character in single quotes). [S1] +- **Declaration syntax** — `type variableName = value;`, or declare first and assign later (`int myNum; myNum = 15;`). [S1] +- **No direct variable printing** — `printf(myNum)` is invalid; C requires format specifiers (covered in the next chapter) to print variable values. [S1] + +## 📖 세부 내용 (Details) +- Declare-and-assign in one line: `int myNum = 15;`. [S1] +- Declare first, assign later: `int myNum; myNum = 15;`. [S1] +- The explicit error case: `int myNum = 15; printf(myNum); // This will cause an error`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **다른 언어와의 출력 방식 차이**: Python/Java/C++와 달리 C에서는 printf()에 변수를 직접 넣어 출력할 수 없고 반드시 포맷 지정자를 사용해야 한다는 점이 명시적으로 경고됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 변수를 먼저 선언만 하고 나중에 값을 대입하는 패턴이 조건에 따라 값이 결정되는 실전 로직에서 흔히 쓰인다. [S1] + +## 💻 코드 패턴 (Code patterns) +Declaring a variable first, then assigning its value later (C): +```c +// Declare a variable +int myNum; +// Assign a value later +myNum = 15; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Organize Code]], [[C Variables Names]], [[C Variables Format]] +- **참조 맥락:** 변수 섹션 첫 챕터 — 변수 이름 규칙(Variables Names) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Variables — https://www.w3schools.com/c/c_variables.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Variables" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Variables_Change.md b/10_Wiki/Dev/Topic_C/C_Variables_Change.md new file mode 100644 index 00000000..7128874b --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Variables_Change.md @@ -0,0 +1,69 @@ +--- +id: c-variables-change +title: "C Variable Values" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["reassignment", "self-referential assignment", "C 변수 값 변경"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "variables", "assignment"] +raw_sources: ["https://www.w3schools.com/c/c_variables_change.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Variable Values]] + +## 🎯 한 줄 통찰 (One-line insight) +`x = x + 1` is explicitly explained not as a mathematical equation (which would be false — x can never equal x+1) but as an INSTRUCTION: "take the current value of x and add 1 to it, [then store the result back into x]" — a reframing crucial for anyone whose intuition for `=` comes from algebra rather than programming's assignment semantics. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Reassignment overwrites** — assigning a new value to an existing variable replaces the old value entirely; this is normal/expected behavior, not an error. [S1] +- **Variable-to-variable copying** — `myNum = myOtherNum;` copies the CURRENT value of one variable into another; the two remain independent afterward (no live link). [S1] +- **Copying into a previously-unassigned variable** — a variable declared without an initial value can still receive a value via copy-assignment later. [S1] +- **Self-referential assignment (`x = x + 1`)** — reads the current value of `x`, computes `x + 1`, and stores the result back into `x`; this is an instruction/mutation, not an algebraic equality. [S1] + +## 📖 세부 내용 (Details) +- Simple reassignment: `int myNum = 15; myNum = 10; // Now myNum is 10`. [S1] +- Variable-to-variable copy: `int myNum = 15; int myOtherNum = 23; myNum = myOtherNum; // myNum is now 23`. [S1] +- Adding two variables into a third: `int x = 5; int y = 6; int sum = x + y;`. [S1] +- Self-referential update: `int x = 5; x = x + 1; // x is now 6`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **= 기호는 수학적 등식이 아님**: x = x + 1이 대수적으로는 성립할 수 없는 식이지만, 프로그래밍에서는 "현재 x값에 1을 더해 다시 x에 저장하라"는 명령으로 해석되어야 한다는 점이 명시적으로 설명됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — x = x + 1 패턴이 이후 반복문(Loops) 챕터에서 카운터 증가 로직의 기초가 된다. [S1] + +## 💻 코드 패턴 (Code patterns) +Self-referential assignment — reading and updating the same variable (C): +```c +int x = 5; +x = x + 1; // x is now 6 +printf("%d", x); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Variables Names]], [[C Variables Multiple]], [[C While Loop]] +- **참조 맥락:** 변수 값 변경과 재대입 — 여러 변수 한번에 선언하기(Variables Multiple) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Variable Values — https://www.w3schools.com/c/c_variables_change.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Variable Values" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Variables_Format.md b/10_Wiki/Dev/Topic_C/C_Variables_Format.md new file mode 100644 index 00000000..1f24f345 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Variables_Format.md @@ -0,0 +1,70 @@ +--- +id: c-variables-format +title: "C Format Specifiers" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["%d %f %c", "printf placeholders", "C 포맷 지정자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "printf", "format-specifiers"] +raw_sources: ["https://www.w3schools.com/c/c_variables_format.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Format Specifiers]] + +## 🎯 한 줄 통찰 (One-line insight) +Format specifiers work identically whether the value comes from a VARIABLE or is a LITERAL typed directly (`printf("%d", 15)` behaves the same as `printf("%d", myNum)` when `myNum` is 15) — meaning the specifier's job is purely to describe the TYPE of whatever value follows in the argument list, not to reference a variable specifically, which is why C's earlier restriction against printing a bare variable (from the Variables chapter) is really a restriction about missing type information, not about variables per se. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Format specifier** — a `%`-prefixed placeholder inside a `printf()` string that tells C what type of value to expect and how to render it. [S1] +- **Type-specific specifiers** — `%d` (integer), `%f` (floating point), `%c` (character); each must match the type of the value being printed. [S1] +- **Text + variable combination** — mixing literal text and a specifier in one format string, separated by a comma for the argument: `printf("My favorite number is: %d", myNum);`. [S1] +- **Multiple specifiers in one call** — `printf("My number is %d and my letter is %c", myNum, myLetter);` — arguments are matched to specifiers in left-to-right order. [S1] +- **Specifiers work on literals too** — `printf("My favorite number is: %d", 15);` — the value need not be stored in a variable first. [S1] + +## 📖 세부 내용 (Details) +- Basic integer print: `int myNum = 15; printf("%d", myNum); // Outputs 15`. [S1] +- Three types, three specifiers: `int myNum = 15; float myFloatNum = 5.99; char myLetter = 'D'; printf("%d\n", myNum); printf("%f\n", myFloatNum); printf("%c\n", myLetter);`. [S1] +- Multiple specifiers in one printf: `printf("My number is %d and my letter is %c", myNum, myLetter);`. [S1] +- Printing literals directly without variables: `printf("My favorite letter is: %c", 'D');`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **변수 없이도 리터럴에 포맷 지정자 적용 가능**: 값을 변수에 저장하지 않고도 리터럴을 직접 %d/%c 등으로 출력할 수 있다는 점이 확인되지만, 재사용/변경 가능성 때문에 변수 사용이 일반적으로 더 낫다고 언급됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 한 printf() 호출에 여러 타입(정수+문자)을 함께 출력하는 패턴이 이후 Real-Life 예제(학생 정보 출력)에서 그대로 확장 활용된다. [S1] + +## 💻 코드 패턴 (Code patterns) +Printing multiple different types in one printf() call using matching format specifiers (C): +```c +int myNum = 15; +char myLetter = 'D'; +printf("My number is %d and my letter is %c", myNum, myLetter); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Variables]], [[C Variables Multiple]], [[C Variables RealLife]], [[C Data Types]] +- **참조 맥락:** 포맷 지정자 — 실전 변수 활용 예제(Variables RealLife) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Format Specifiers — https://www.w3schools.com/c/c_variables_format.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Format Specifiers" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Variables_Multiple.md b/10_Wiki/Dev/Topic_C/C_Variables_Multiple.md new file mode 100644 index 00000000..0b140757 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Variables_Multiple.md @@ -0,0 +1,67 @@ +--- +id: c-variables-multiple +title: "C Declare Multiple Variables" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["chained assignment", "comma-separated declaration", "C 여러 변수 선언"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "variables"] +raw_sources: ["https://www.w3schools.com/c/c_variables_multiple.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Declare Multiple Variables]] + +## 🎯 한 줄 통찰 (One-line insight) +Both shortcuts covered here — comma-separated declaration (`int x = 5, y = 6, z = 50;`) and chained assignment (`x = y = z = 50;`) — REQUIRE all variables to share the exact same type, meaning these conveniences only apply within a single type declaration and cannot be used to initialize variables of different types in one statement. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Comma-separated declaration** — `type a = v1, b = v2, c = v3;` declares and initializes multiple same-type variables in one statement. [S1] +- **Same-type restriction** — all variables in one comma-separated declaration must be of the SAME type; mixing types in one statement is not allowed. [S1] +- **Chained assignment** — `x = y = z = 50;` assigns the same value to multiple already-declared variables at once. [S1] +- **Readability tradeoff** — the source explicitly notes that declaring on one line is convenient, but separate lines are often easier to read. [S1] + +## 📖 세부 내용 (Details) +- Comma-separated declaration with individual values: `int x = 5, y = 6, z = 50; printf("%d", x + y + z);`. [S1] +- Chained assignment of one shared value: `int x, y, z; x = y = z = 50; printf("%d", x + y + z);`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 여러 카운터 변수를 0으로 동시에 초기화하는 상황(x = y = z = 0)이 체이닝 대입의 대표 실전 활용이다. [S1] + +## 💻 코드 패턴 (Code patterns) +Chained assignment giving multiple variables the same value at once (C): +```c +int x, y, z; +x = y = z = 50; +printf("%d", x + y + z); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Variables Change]], [[C Variables Format]] +- **참조 맥락:** 여러 변수 동시 선언 — 포맷 지정자(Variables Format) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Declare Multiple Variables — https://www.w3schools.com/c/c_variables_multiple.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Declare Multiple Variables" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Variables_Names.md b/10_Wiki/Dev/Topic_C/C_Variables_Names.md new file mode 100644 index 00000000..cdfcca6f --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Variables_Names.md @@ -0,0 +1,69 @@ +--- +id: c-variables-names +title: "C Variable Names (Identifiers)" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["identifiers", "camelCase", "C 변수 이름 규칙"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "variables", "naming"] +raw_sources: ["https://www.w3schools.com/c/c_variables_names.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Variable Names (Identifiers)]] + +## 🎯 한 줄 통찰 (One-line insight) +Variable names in C are strictly CASE-SENSITIVE at the identifier level — `myVar` and `myvar` are two completely distinct variables, not a warning or a style issue — meaning a single accidental capitalization typo silently creates a second, separate variable rather than referencing the intended one, a class of bug the compiler won't catch as a naming error. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Identifier** — the unique name given to a variable. [S1] +- **Naming rules** — letters, digits, and underscores allowed; must begin with a letter or underscore; case-sensitive; no whitespace or special characters (`!`, `#`, `%`, etc.); reserved words (e.g. `int`) cannot be used as names. [S1] +- **Descriptive naming recommended** — `minutesPerHour` over `m`, for maintainability, even though both compile correctly. [S1] +- **Two common naming styles** — camelCase (`totalScore`) or underscore-separated (`total_score`); the source recommends picking one and staying consistent. [S1] + +## 📖 세부 내용 (Details) +- Valid names: `age`, `_count`, `totalSum`. [S1] +- Invalid names and why: `1age` (starts with a digit), `my-age` (contains a hyphen), `int` (reserved word). [S1] +- Descriptive vs terse naming contrast: `int minutesPerHour = 60;` (clear) versus `int m = 60;` (compiles, but unclear intent). [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **대소문자 구분의 함정**: myVar와 myvar가 서로 다른 변수로 취급된다는 점이 명시되며, 이는 오타로 인한 미묘한 버그의 원인이 될 수 있다는 점을 시사함. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — camelCase나 언더스코어 스타일 중 하나를 프로젝트 전체에 일관되게 적용하는 것이 실전 코드 컨벤션의 기본이다. [S1] + +## 💻 코드 패턴 (Code patterns) +Descriptive vs. terse variable naming (C): +```c +// Good variable name +int minutesPerHour = 60; +// OK, but not so easy to understand what m actually is +int m = 60; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Variables]], [[C Variables Change]] +- **참조 맥락:** 변수 이름 규칙 — 변수 값 변경(Variables Change) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Variable Names (Identifiers) — https://www.w3schools.com/c/c_variables_names.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Variable Names (Identifiers)" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_Variables_RealLife.md b/10_Wiki/Dev/Topic_C/C_Variables_RealLife.md new file mode 100644 index 00000000..512537bf --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_Variables_RealLife.md @@ -0,0 +1,68 @@ +--- +id: c-variables-reallife +title: "C Variables - Examples" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["real-life variables", "rectangle area example", "C 변수 실전 예제"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "variables", "real-life-example"] +raw_sources: ["https://www.w3schools.com/c/c_variables_reallife.php"] +applied_in: [] +github_commit: "" +--- + +# [[C Variables - Examples]] + +## 🎯 한 줄 통찰 (One-line insight) +The source explicitly admits its own teaching convention (naming variables `myInt`/`myNum`/`myChar` after their TYPE) is an artificial simplification "to avoid confusion" — and this real-life chapter exists specifically to break that habit, showing that real variables should be named after what they REPRESENT (`studentID`, `studentGrade`) not what type they are, reinforcing the earlier Variable Names chapter's descriptive-naming advice with a concrete before/after contrast. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Type-based teaching names vs. domain names** — tutorial examples use `myNum`/`myChar` for clarity during learning, but real programs should name variables after their real-world meaning. [S1] +- **Multiple variables of different types working together** — one program can combine `int`, `float`, and `char` variables all representing facets of the same real-world entity (a student record). [S1] +- **Calculate-then-print pattern** — perform a calculation first, store the result in a variable, and only then print it — rather than computing inline inside the print call. [S1] + +## 📖 세부 내용 (Details) +- Student record combining three types: `int studentID = 15; int studentAge = 23; float studentFee = 75.25; char studentGrade = 'B';` printed with matching `%d`/`%f`/`%c` specifiers. [S1] +- Rectangle area calculate-then-print: `int length = 4; int width = 6; int area; area = length * width; printf("Area of the rectangle is: %d", area);`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 학생 정보(ID/나이/수수료/학점)를 하나의 프로그램에서 함께 다루는 예제가 서로 다른 타입의 변수를 실제 데이터 모델링에 사용하는 대표 사례다. [S1] + +## 💻 코드 패턴 (Code patterns) +Calculating a value first, then printing the stored result (C): +```c +int length = 4; +int width = 6; +int area; +area = length * width; +printf("Area of the rectangle is: %d", area); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Variables Format]], [[C Variables Names]], [[C Data Types]] +- **참조 맥락:** 변수 섹션 마지막 — 데이터 타입(Data Types) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C Variables - Examples — https://www.w3schools.com/c/c_variables_reallife.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C Variables - Examples" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_While_Loop.md b/10_Wiki/Dev/Topic_C/C_While_Loop.md new file mode 100644 index 00000000..8278d5a2 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_While_Loop.md @@ -0,0 +1,70 @@ +--- +id: c-while-loop +title: "C While Loop" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["while statement", "zero-iteration loop", "C while 반복문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "loops", "while"] +raw_sources: ["https://www.w3schools.com/c/c_while_loop.php"] +applied_in: [] +github_commit: "" +--- + +# [[C While Loop]] + +## 🎯 한 줄 통찰 (One-line insight) +A `while` loop can run ZERO times — if its condition is already false the very first time it's checked (e.g. `int i = 10; while (i < 5) {...}`), the body never executes at all, not even once — a behavior the source explicitly contrasts against the upcoming do/while chapter, which guarantees at least one execution regardless of the initial condition. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`while (condition) { ... }`** — repeats the block as long as the condition remains true, checked BEFORE each iteration (including the first). [S1] +- **Zero-iteration possibility** — if the condition is false from the start, the loop body never runs at all. [S1] +- **Mandatory condition-variable update** — forgetting to change the loop-controlling variable inside the body (e.g. omitting `i++`) causes an infinite loop. [S1] +- **`i` as a counter convention** — the source explains `i` is traditionally used because it's short and stands for "index"/"iterator," not an arbitrary choice. [S1] + +## 📖 세부 내용 (Details) +- Basic counting loop: `int i = 0; while (i < 5) { printf("%d\n", i); i++; }`. [S1] +- Countdown loop: `int countdown = 3; while (countdown > 0) { printf("%d\n", countdown); countdown--; } printf("Happy New Year!!\n");`. [S1] +- Zero-iteration case: `int i = 10; while (i < 5) { printf("This will never be printed\n"); i++; }` — body never executes since the condition is false immediately. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **조건이 처음부터 거짓이면 while 루프는 한 번도 실행 안 됨**: do/while 루프(다음 챕터)와 달리 일반 while 루프는 시작부터 조건이 거짓이면 본문이 단 한 번도 실행되지 않는다는 점이 명시적으로 대비됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +카운트다운 후 "Happy New Year!!"를 출력하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +A while loop that never executes because its condition is false from the start (C): +```c +int i = 10; +while (i < 5) { + printf("This will never be printed\n"); + i++; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C Switch]], [[C While Loop RealLife]], [[C Do While Loop]] +- **참조 맥락:** 반복문 섹션 첫 챕터 — while 루프 실전 예제(While Loop RealLife) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C While Loop — https://www.w3schools.com/c/c_while_loop.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C While Loop" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_C/C_While_Loop_RealLife.md b/10_Wiki/Dev/Topic_C/C_While_Loop_RealLife.md new file mode 100644 index 00000000..60902fc8 --- /dev/null +++ b/10_Wiki/Dev/Topic_C/C_While_Loop_RealLife.md @@ -0,0 +1,71 @@ +--- +id: c-while-loop-reallife +title: "C While Loop Examples" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["number reversal", "Yatzy example", "C while 루프 실전 예제"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["c", "programming-language", "w3schools", "loops", "while", "real-life-example"] +raw_sources: ["https://www.w3schools.com/c/c_while_loop_reallife.php"] +applied_in: [] +github_commit: "" +--- + +# [[C While Loop Examples]] + +## 🎯 한 줄 통찰 (One-line insight) +The number-reversal example uses `while (numbers)` — a bare integer as the condition, not an explicit comparison — relying on C's implicit rule that any NON-ZERO value is truthy and `0` is falsy; the loop naturally terminates once repeated division (`numbers /= 10`) drives the value down to exactly 0, showing that C loop conditions don't need to be boolean-shaped expressions at all, just any value that eventually becomes 0. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Bare-integer condition** — `while (numbers)` treats any non-zero `numbers` as true; the loop stops precisely when `numbers` becomes 0. [S1] +- **Digit extraction via `% 10` and `/ 10`** — `numbers % 10` isolates the last digit; `numbers /= 10` removes it, a combination reused from the modulus/division operators. [S1] +- **Number reversal by rebuilding** — `revNumbers = revNumbers * 10 + numbers % 10;` shifts previously-extracted digits left and appends the newly extracted one, building the reversed number digit by digit. [S1] +- **While loop combined with if/else** — the Yatzy example nests conditional logic inside the loop body to react differently depending on the current iteration's value. [S1] + +## 📖 세부 내용 (Details) +- Even-numbers-only printer: `int i = 0; while (i <= 10) { printf("%d\n", i); i += 2; }`. [S1] +- Number reversal using a bare-integer condition: `int numbers = 12345; int revNumbers = 0; while (numbers) { revNumbers = revNumbers * 10 + numbers % 10; numbers /= 10; }`. [S1] +- Yatzy dice-checking loop: `int dice = 1; while (dice <= 6) { if (dice < 6) { printf("No Yatzy\n"); } else { printf("Yatzy!\n"); } dice = dice + 1; }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **정수 자체가 조건이 될 수 있음**: while(numbers)처럼 비교 연산자 없이 정수 자체를 조건으로 사용할 수 있고, 0이 아니면 참, 0이면 거짓으로 취급된다는 점이 예제로 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +12345를 54321로 뒤집는 숫자 반전 알고리즘이 원문에서 직접 실전 활용 사례로 제시되며, 나머지(%)와 몫(/) 연산을 조합해 자릿수를 하나씩 분해/재조립하는 기법을 보여준다. [S1] + +## 💻 코드 패턴 (Code patterns) +Reversing a number's digits using a bare-integer while condition (C): +```c +int numbers = 12345; +int revNumbers = 0; +while (numbers) { + revNumbers = revNumbers * 10 + numbers % 10; + numbers /= 10; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C Tutorial]] +- **관련 개념:** [[C While Loop]], [[C Do While Loop]], [[C Operators Arithmetic]] +- **참조 맥락:** while 루프 실전 예제 — do/while 루프(Do While Loop) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C While Loop Examples — https://www.w3schools.com/c/c_while_loop_reallife.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C While Loop Examples" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/00_INDEX.md b/10_Wiki/Dev/Topic_CPP/00_INDEX.md new file mode 100644 index 00000000..cfbb8bdb --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/00_INDEX.md @@ -0,0 +1,223 @@ +--- +id: cpp-tutorial-index +title: "C++ Tutorial" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["C++ Tutorial", "C++ MOC", "Topic_CPP index", "C++ 목차"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.90 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "moc", "index"] +raw_sources: ["https://www.w3schools.com/cpp/default.asp"] +applied_in: [] +github_commit: "" +--- + +# [[C++ Tutorial]] + +## 🎯 한 줄 통찰 (One-line insight) +Map of Content (MOC) for the W3Schools C++ Tutorial — the root that links every core C++ knowledge page in this topic folder. [S1] + +## 🧠 핵심 개념 (Core concepts) +- This folder (`Topic_CPP`) wikifies the C++ programming language tutorial, one knowledge page per document, in P-Reinforce v3.1 format — same convention as `Topic_C` / `Topic_Java` / `Topic_PHP` / `Topic_Python` / `Topic_SQL` / `Topic_W3CSS` / `Topic_HTML` / `Topic_CSS` / `Topic_JavaScript`. [S1] +- **Scope**: tutorial + "Learning by examples" pages only. **Excluded**: `cpp_challenges_*` (12 code-challenge pages), `cpp_compiler`/`cpp_exam`/`cpp_examples`/`cpp_exercises`/`cpp_practice`/`cpp_projects`/`cpp_quiz`/`cpp_real_life_examples`/`cpp_study_plan`/`cpp_syllabus` (meta/index pages), `cpp_ref_*` (10 reference-dump pages: algorithm/cstring/ctime/fstream/iostream/keywords/math/reference/string/vector), `cpp_howto_*` (2 pages, reserved for the separate HOW TO category later in the series). [S1] +- **Progress:** **116 of 116 planned docs complete — C++ category done.** [S1] +- Every page roots its Knowledge Graph back to this `[[C++ Tutorial]]` node. + +## 📖 세부 내용 (Details) + +### Basics +- [[CPP Intro]] ✅ +- [[CPP Get Started]] ✅ +- [[CPP Syntax]] ✅ +- [[CPP Statements]] ✅ +- [[CPP Comments]] ✅ +- [[CPP Output]] ✅ +- [[CPP Output Numbers]] ✅ +- [[CPP New Lines]] ✅ + +### Variables +- [[CPP Variables]] ✅ +- [[CPP Variables Identifiers]] ✅ +- [[CPP Variables Constants]] ✅ +- [[CPP Variables Multiple]] ✅ +- [[CPP Variables RealLife]] ✅ + +### Data Types +- [[CPP Data Types]] ✅ +- [[CPP Data Types Numeric]] ✅ +- [[CPP Data Types Bool]] ✅ +- [[CPP Data Types Char]] ✅ +- [[CPP Data Types String]] ✅ +- [[CPP Data Types RealLife]] ✅ + +### Operators +- [[CPP Operators]] ✅ +- [[CPP Operators Arithmetic]] ✅ +- [[CPP Operators Assignment]] ✅ +- [[CPP Operators Comparison]] ✅ +- [[CPP Operators Logical]] ✅ +- [[CPP Operators Precedence]] ✅ + +### Strings +- [[CPP Strings]] ✅ +- [[CPP Strings Access]] ✅ +- [[CPP Strings Concat]] ✅ +- [[CPP Strings Cstyle]] ✅ +- [[CPP Strings Esc]] ✅ +- [[CPP Strings Input]] ✅ +- [[CPP Strings Length]] ✅ +- [[CPP Strings Namespace]] ✅ +- [[CPP Strings Numbers]] ✅ + +### Math +- [[CPP Math]] ✅ + +### Booleans +- [[CPP Booleans]] ✅ +- [[CPP Booleans Expressions]] ✅ +- [[CPP Booleans RealLife]] ✅ + +### Conditions +- [[CPP Conditions]] ✅ +- [[CPP Conditions Else]] ✅ +- [[CPP Conditions ElseIf]] ✅ +- [[CPP Conditions Shorthand]] ✅ +- [[CPP Conditions Logical]] ✅ +- [[CPP Conditions Nested]] ✅ +- [[CPP Conditions RealLife]] ✅ + +### Switch +- [[CPP Switch]] ✅ + +### Loops +- [[CPP While Loop]] ✅ +- [[CPP While Loop RealLife]] ✅ +- [[CPP Do While Loop]] ✅ +- [[CPP For Loop]] ✅ +- [[CPP For Loop Foreach]] ✅ +- [[CPP For Loop Nested]] ✅ +- [[CPP For Loop RealLife]] ✅ +- [[CPP Break]] ✅ + +### Arrays +- [[CPP Arrays]] ✅ +- [[CPP Arrays Size]] ✅ +- [[CPP Arrays Loop]] ✅ +- [[CPP Arrays Multi]] ✅ +- [[CPP Arrays Omit]] ✅ +- [[CPP Arrays RealLife]] ✅ + +### Structs & Enum +- [[CPP Structs]] ✅ +- [[CPP Enum]] ✅ + +### References, Pointers & Memory +- [[CPP References]] ✅ +- [[CPP References Memory]] ✅ +- [[CPP Pointers]] ✅ +- [[CPP Pointers Dereference]] ✅ +- [[CPP Pointers Modify]] ✅ +- [[CPP Memory Management]] ✅ +- [[CPP Memory Management New]] ✅ + +### Functions +- [[CPP Functions]] ✅ +- [[CPP Function Param]] ✅ +- [[CPP Function Default]] ✅ +- [[CPP Function Overloading]] ✅ +- [[CPP Function Multiple]] ✅ +- [[CPP Function Return]] ✅ +- [[CPP Function RealLife]] ✅ +- [[CPP Function Array]] ✅ +- [[CPP Function Reference]] ✅ +- [[CPP Function Structures]] ✅ +- [[CPP Functions Recursion]] ✅ +- [[CPP Functions Lambda]] ✅ + +### OOP Basics +- [[CPP OOP]] ✅ +- [[CPP Classes]] ✅ +- [[CPP Class Methods]] ✅ + +### Constructors +- [[CPP Constructors]] ✅ +- [[CPP Constructors Overloading]] ✅ + +### Access Specifiers & Encapsulation +- [[CPP Access Specifiers]] ✅ +- [[CPP Encapsulation]] ✅ + +### Inheritance +- [[CPP Inheritance]] ✅ +- [[CPP Inheritance Access]] ✅ +- [[CPP Inheritance Multilevel]] ✅ +- [[CPP Inheritance Multiple]] ✅ + +### Polymorphism & Advanced OOP +- [[CPP Polymorphism]] ✅ +- [[CPP Virtual Functions]] ✅ +- [[CPP Friend Function]] ✅ +- [[CPP Templates]] ✅ + +### Namespaces +- [[CPP Namespaces]] ✅ + +### Scope +- [[CPP Scope]] ✅ + +### User Input & Date +- [[CPP User Input]] ✅ +- [[CPP Date]] ✅ + +### Errors & Debugging +- [[CPP Errors]] ✅ +- [[CPP Exceptions]] ✅ +- [[CPP Input Validation]] ✅ +- [[CPP Debugging]] ✅ + +### Files +- [[CPP Files]] ✅ + +### Data Structures (STL) +- [[CPP Data Structures]] ✅ +- [[CPP Vectors]] ✅ +- [[CPP List]] ✅ +- [[CPP Stacks]] ✅ +- [[CPP Queues]] ✅ +- [[CPP Deque]] ✅ +- [[CPP Sets]] ✅ +- [[CPP Maps]] ✅ +- [[CPP Iterators]] ✅ +- [[CPP Algorithms]] ✅ + +### Auto +- [[CPP Auto]] ✅ + +## 🛠️ 적용 사례 (Applied in summary) +116 knowledge documents generated across 26 sections in this batch run. + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference) +- **신뢰 점수:** 0.90 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[10_Wiki]] +- **관련 개념:** [[C Tutorial]], [[Java Tutorial]], [[CPP Intro]] +- **참조 맥락:** SQL/Python/Java/PHP/W3.CSS/C에 이어 W3Schools 지식화 시리즈의 다음 카테고리 — C 다음의 객체지향 확장 언어. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Tutorial — https://www.w3schools.com/cpp/default.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Created C++ Tutorial MOC with scope decisions and full planned page list (Astra wiki-curation, P-Reinforce v3.1 format). +- 2026-07-04: Topic_CPP completed — all 116 planned docs written across 26 sections (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Access_Specifiers.md b/10_Wiki/Dev/Topic_CPP/CPP_Access_Specifiers.md new file mode 100644 index 00000000..f3128272 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Access_Specifiers.md @@ -0,0 +1,76 @@ +--- +id: cpp-access-specifiers +title: "C++ Access Specifiers" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["public private protected", "default is private", "C++ 접근 지정자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "oop", "access-specifiers"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_access_specifiers.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Access Specifiers]] + +## 🎯 한 줄 통찰 (One-line insight) +If a class member is declared with NO access specifier at all, it defaults to `private` — the exact behavior the earlier Classes chapter's `public:` requirement was silently protecting against — meaning every class example up to this point that used `public:` was actively OVERRIDING C++'s default visibility, not merely adding an optional label; omitting it entirely would have made those attributes inaccessible from outside. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Three access specifiers** — `public` (accessible from outside the class), `private` (NOT accessible from outside), `protected` (not accessible from outside, but accessible in INHERITED/child classes). [S1] +- **Default access is `private`** — a class with no explicit access specifier makes ALL its members private automatically. [S1] +- **Private-by-default as good practice** — declaring attributes `private` "as often as you can" reduces the chance of accidental misuse; this is the core ingredient of Encapsulation (next chapter). [S1] +- **Real-life analogy** — public = front door (anyone can enter); private = locked drawer (only the owner); protected = family-only room (children/subclasses can enter, others cannot). [S1] + +## 📖 세부 내용 (Details) +- Mixed public/private members and the resulting access error: `class MyClass { public: int x; private: int y; }; MyClass myObj; myObj.x = 25; // Allowed myObj.y = 50; // error: y is private`. [S1] +- Default-private class with no explicit specifier: `class MyClass { int x; int y; }; // both x and y are private by default`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **접근 지정자 생략 시 기본값은 private**: 이전 Classes 챕터에서 사용된 public:이 단순한 선택적 표시가 아니라, 생략 시 기본으로 적용되는 private를 의도적으로 override한 것이었음이 이 챕터에서 명확히 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 클래스 속성을 가능한 한 private으로 선언하는 것이 실전 코드에서 좋은 관행으로 권장되며, 이는 다음 챕터(Encapsulation)의 핵심 재료가 된다. [S1] + +## 💻 코드 패턴 (Code patterns) +Mixed public and private members, with the resulting compile error on private access (C++): +```cpp +class MyClass { +public: // Public access specifier + int x; // Public attribute +private: // Private access specifier + int y; // Private attribute +}; +int main() { + MyClass myObj; + myObj.x = 25; // Allowed (public) + myObj.y = 50; // error: y is private + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Constructors Overloading]], [[CPP Encapsulation]], [[CPP Inheritance Access]] +- **참조 맥락:** 접근 지정자 — 캡슐화(Encapsulation) 챕터로 이어짐, protected는 상속 접근(Inheritance Access) 챕터와 직접 연결. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Access Specifiers — https://www.w3schools.com/cpp/cpp_access_specifiers.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Access Specifiers" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Algorithms.md b/10_Wiki/Dev/Topic_CPP/CPP_Algorithms.md new file mode 100644 index 00000000..873a9b7b --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Algorithms.md @@ -0,0 +1,86 @@ +--- +id: cpp-algorithms +title: "C++ Algorithms" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: [" library", "sort find C++", "C++ 알고리즘"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "stl", "algorithm"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_algorithms.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Algorithms]] + +## 🎯 한 줄 통찰 (One-line insight) +Every `` function takes a RANGE (a begin/end iterator pair) instead of a container, which is why `sort(numbers.begin() + 3, numbers.end())` can sort just a SUBSET of a vector by simple iterator arithmetic — this is the payoff of the previous chapter's iterator abstraction: because `sort()`/`find()`/`min_element()` never see the container type directly, the exact same function signature works whether the range came from a full vector, a partial vector, or (implicitly) any other iterator-supporting container, something C has no equivalent for since `qsort()` needs a raw array pointer + element count instead of a reusable "range" concept. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`` header** — required for all functions in this chapter (`sort`, `find`, `upper_bound`, `min_element`, `max_element`, `copy`, `fill`). [S1] +- **`sort(begin, end)`** — sorts a range in ascending order by default (alphabetically for strings, numerically for ints); reversible via `rbegin()`/`rend()` instead of `begin()`/`end()`. [S1] +- **Partial-range sort** — `sort(numbers.begin() + 3, numbers.end())` sorts only from the 4th element onward, leaving earlier elements untouched — only possible because the function operates on an iterator range, not "the whole container." [S1] +- **`find(begin, end, value)`** — returns an iterator to the first match (or `end()` if not found, implied by the general iterator convention). [S1] +- **`upper_bound(begin, end, value)`** — finds the first element GREATER than `value`; REQUIRES the range to already be sorted, since it relies on binary-search-like assumptions. [S1] +- **`min_element(begin, end)` / `max_element(begin, end)`** — return an iterator to the smallest/largest element in the range. [S1] +- **`copy(src_begin, src_end, dest_begin)`** — copies a range of elements into another container starting at `dest_begin`; the destination must already have enough space allocated (e.g. `vector copiedNumbers(6);`). [S1] +- **`fill(begin, end, value)`** — overwrites every element in the range with `value`. [S1] + +## 📖 세부 내용 (Details) +- Ascending sort: `sort(cars.begin(), cars.end());` — strings sort alphabetically, ints sort numerically. [S1] +- Descending sort via reverse iterators: `sort(numbers.rbegin(), numbers.rend());`. [S1] +- Search: `auto it = find(numbers.begin(), numbers.end(), 3);` finds the value 3. [S1] +- Sorted-data search: `sort(numbers.begin(), numbers.end()); auto it = upper_bound(numbers.begin(), numbers.end(), 5);` — must sort FIRST, since `upper_bound` assumes sorted input. [S1] +- Min/max: `auto it = min_element(numbers.begin(), numbers.end());` / `auto it = max_element(numbers.begin(), numbers.end());`. [S1] +- Copy: `vector copiedNumbers(6); copy(numbers.begin(), numbers.end(), copiedNumbers.begin());`. [S1] +- Fill: `vector numbers(6); fill(numbers.begin(), numbers.end(), 35);` sets all 6 elements to 35. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **범위(iterator pair) 기반 설계가 부분 정렬을 가능하게 함**: C의 `qsort()`는 배열 포인터와 전체 요소 개수를 받아야 했지만, C++의 `sort()`는 begin/end iterator만 받으므로 `numbers.begin() + 3`처럼 iterator 연산만으로 컨테이너의 일부 구간만 정렬할 수 있다는 점이 확인됨 — 이는 이전 챕터(Iterators)에서 확립된 범위 추상화의 직접적인 활용 사례. [S1] +- **`upper_bound()`는 정렬 전제 조건이 있음**: `find()`나 `min_element()`와 달리 `upper_bound()`는 정렬되지 않은 데이터에 사용하면 올바른 결과를 보장하지 않으며, 원문도 반드시 먼저 `sort()`를 호출한 뒤 사용하도록 명시함. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +정렬되지 않은 정수 vector를 먼저 sort()로 정렬한 뒤 upper_bound()로 특정 값보다 큰 첫 원소를 찾는 2단계 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Partial-range sort and sorted-precondition search (C++): +```cpp +#include +#include + +vector numbers = {1, 7, 3, 5, 9, 2}; + +sort(numbers.begin() + 3, numbers.end()); // sorts only 5,9,2 -> leaves 1,7,3 untouched + +sort(numbers.begin(), numbers.end()); // must sort first... +auto it = upper_bound(numbers.begin(), numbers.end(), 5); // ...for upper_bound to be valid + +auto smallest = min_element(numbers.begin(), numbers.end()); +auto largest = max_element(numbers.begin(), numbers.end()); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Iterators]], [[CPP Vectors]], [[CPP Data Structures]] +- **참조 맥락:** 데이터 구조(STL) 섹션의 마지막 챕터 — Auto 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Algorithms — https://www.w3schools.com/cpp/cpp_algorithms.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Algorithms" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Arrays.md b/10_Wiki/Dev/Topic_CPP/CPP_Arrays.md new file mode 100644 index 00000000..a88ce905 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Arrays.md @@ -0,0 +1,69 @@ +--- +id: cpp-arrays +title: "C++ Arrays" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["array declaration", "string arrays", "C++ 배열"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "arrays"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_arrays.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Arrays]] + +## 🎯 한 줄 통찰 (One-line insight) +C++ arrays can directly hold `string` elements (`string cars[4] = {"Volvo", "BMW", "Ford", "Mazda"};`) — something C could never do without manually nesting `char` arrays inside an outer array — meaning C++'s richer `string` type extends all the way into array element types, letting arrays of text behave as naturally as arrays of numbers. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Array declaration with size** — `type arrayName[size];` reserves space for `size` elements. [S1] +- **Array literal initialization** — `{val1, val2, ...}` fills the array at declaration time. [S1] +- **Zero-based indexing** — `[0]` is the first element. [S1] +- **Mutable elements** — any element can be reassigned by index after creation. [S1] +- **Arrays of `string`** — unlike C (which needs nested char arrays for text arrays), C++ arrays can hold `string` elements directly. [S1] + +## 📖 세부 내용 (Details) +- Declaring a string array with a literal: `string cars[4] = {"Volvo", "BMW", "Ford", "Mazda"};`. [S1] +- Accessing an element: `cout << cars[0]; // Volvo`. [S1] +- Modifying an element: `cars[0] = "Opel"; cout << cars[0]; // Now outputs Opel instead of Volvo`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C++ 배열은 string을 직접 담을 수 있음**: C에서는 문자열 배열을 만들려면 char 배열들을 중첩해야 했지만, C++에서는 string cars[4] = {...}처럼 배열 원소로 string을 직접 사용할 수 있다는 점이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 자동차 브랜드 목록을 string 배열로 다루는 예제가 텍스트 데이터를 배열로 관리하는 실전 활용의 기초다. [S1] + +## 💻 코드 패턴 (Code patterns) +A string array — a text-array construction impossible directly in C (C++): +```cpp +string cars[4] = {"Volvo", "BMW", "Ford", "Mazda"}; +cars[0] = "Opel"; +cout << cars[0]; // Opel +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Break]], [[CPP Arrays Size]], [[C Arrays]] +- **참조 맥락:** 배열 섹션 첫 챕터 — 배열 크기(Arrays Size) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Arrays — https://www.w3schools.com/cpp/cpp_arrays.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Arrays" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Arrays_Loop.md b/10_Wiki/Dev/Topic_CPP/CPP_Arrays_Loop.md new file mode 100644 index 00000000..18f1f58b --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Arrays_Loop.md @@ -0,0 +1,68 @@ +--- +id: cpp-arrays-loop +title: "C++ Arrays and Loops" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["loop through array", "foreach loop arrays", "C++ 배열 반복문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "arrays", "loops", "foreach"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_arrays_loop.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Arrays and Loops]] + +## 🎯 한 줄 통찰 (One-line insight) +The for-each loop's element type must match the array's element type EXACTLY — `for (int num : myNumbers)` for an int array, `for (string car : cars)` for a string array — meaning unlike the traditional indexed loop (which works identically regardless of array type since it only manipulates an integer index), the for-each loop's syntax itself changes shape depending on what the array stores. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Traditional indexed loop** — `for (int i = 0; i < size; i++) { arr[i] ... }` works the same regardless of array element type. [S1] +- **For-each loop (C++11+)** — `for (type var : arrayName)`, used EXCLUSIVELY for looping through elements in an array or other data structures (vectors, lists). [S1] +- **Type-matched for-each declaration** — the loop variable's declared type must match the array's element type (`int` for an int array, `string` for a string array). [S1] + +## 📖 세부 내용 (Details) +- Indexed loop with both index and value: `for (int i = 0; i < 5; i++) { cout << i << " = " << cars[i] << "\n"; }`. [S1] +- For-each loop over integers: `for (int num : myNumbers) { cout << num << "\n"; }`. [S1] +- For-each loop over strings: `for (string car : cars) { cout << car << "\n"; }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **for-each 루프는 배열 타입에 맞춰 변수 타입도 바뀜**: 인덱스 기반 루프는 배열 타입과 무관하게 항상 int i로 동일하지만, for-each 루프는 int 배열엔 int, string 배열엔 string으로 변수 타입을 맞춰야 한다는 구문상 차이가 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 인덱스와 값을 함께 출력하는 패턴이 배열 내 위치 정보가 필요한 실전 상황에서 인덱스 기반 루프의 활용 근거가 된다. [S1] + +## 💻 코드 패턴 (Code patterns) +The for-each loop variable type matching the array's element type (C++): +```cpp +string cars[5] = {"Volvo", "BMW", "Ford", "Mazda", "Tesla"}; +for (string car : cars) { + cout << car << "\n"; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Arrays Size]], [[CPP Arrays Multi]], [[CPP For Loop Foreach]] +- **참조 맥락:** 배열 반복문 — 다차원 배열(Arrays Multi) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Arrays and Loops — https://www.w3schools.com/cpp/cpp_arrays_loop.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Arrays and Loops" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Arrays_Multi.md b/10_Wiki/Dev/Topic_CPP/CPP_Arrays_Multi.md new file mode 100644 index 00000000..723fba24 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Arrays_Multi.md @@ -0,0 +1,76 @@ +--- +id: cpp-arrays-multi +title: "C++ Multi-Dimensional Arrays" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["2D array", "3D array", "battleship game", "C++ 다차원 배열"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "arrays", "multidimensional"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_arrays_multi.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Multi-Dimensional Arrays]] + +## 🎯 한 줄 통찰 (One-line insight) +The Battleship mini-game demonstrates that a 2D `bool` array can serve as a complete GAME STATE representation — ship positions stored as `true`/`false` grid cells, hit-tracking done by simply flipping a cell to `false` after a hit — showing multi-dimensional arrays aren't just abstract grid storage but a natural fit for representing real interactive state that changes over a program's runtime. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Multi-dimensional array** — "an array of arrays"; each additional `[]` in the declaration adds one more dimension. [S1] +- **2D array (`type name[rows][cols]`)** — declared with two bracket pairs; initialized with nested array literals (`{ {...}, {...} }`). [S1] +- **Dual-index access** — `letters[row][col]` addresses a specific cell; zero-based. [S1] +- **One nested loop per dimension** — a 2D array needs 2 nested loops; a 3D array needs 3. [S1] +- **Grids as game state** — a `bool` 2D array can model ship positions in a Battleship-style game; a hit is registered by flipping the cell's value to `false`. [S1] + +## 📖 세부 내용 (Details) +- Creating and accessing a 2D array: `string letters[2][4] = { {"A","B","C","D"}, {"E","F","G","H"} }; cout << letters[0][2]; // "C"`. [S1] +- A 3D array declaration and full triple-nested loop: `string letters[2][2][2] = {...}; for (i...) { for (j...) { for (k...) { cout << letters[i][j][k]; } } }`. [S1] +- Battleship game using a 2D bool array as ship-position state: `bool ships[4][4] = { {0,1,1,0}, {0,0,0,0}, {0,0,1,0}, {0,0,1,0} }; if (ships[row][column]) { ships[row][column] = 0; hits++; }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). C 챕터와 동일한 다차원 배열 구조/접근 방식이 확인됨. + +## 🛠️ 적용 사례 (Applied in summary) +4x4 격자에 배 위치를 bool 값으로 저장하고, 명중 시 해당 칸을 0으로 바꾸는 배틀십 미니게임이 원문에서 직접 실전 활용 사례로 제시됨(다차원 배열이 실제 게임 상태를 표현하는 방법). [S1] + +## 💻 코드 패턴 (Code patterns) +A 2D bool array modeling ship positions, with a hit flipping the cell to false (C++): +```cpp +bool ships[4][4] = { + { 0, 1, 1, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 1, 0 }, + { 0, 0, 1, 0 } +}; +if (ships[row][column]) { + ships[row][column] = 0; // register the hit + hits++; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Arrays Loop]], [[CPP For Loop Nested]], [[CPP Arrays Omit]] +- **참조 맥락:** 다차원 배열 — 배열 크기 생략(Arrays Omit) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Multi-Dimensional Arrays — https://www.w3schools.com/cpp/cpp_arrays_multi.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Multi-Dimensional Arrays" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Arrays_Omit.md b/10_Wiki/Dev/Topic_CPP/CPP_Arrays_Omit.md new file mode 100644 index 00000000..0afd9b01 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Arrays_Omit.md @@ -0,0 +1,69 @@ +--- +id: cpp-arrays-omit +title: "C++ Omit Array Size" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["fixed size vs dynamic size", "vector introduction", "C++ 배열 크기 생략"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "arrays", "vectors"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_arrays_omit.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Omit Array Size]] + +## 🎯 한 줄 통찰 (One-line insight) +This chapter reveals arrays' single biggest limitation and its solution in one place — a C++ array's size is FIXED forever once created (`cars[3] = "Tesla";` on a 3-element array is an ERROR, not silent truncation), and the fix isn't a special array trick but an entirely different data structure, `vector`, whose `push_back()` grows the collection dynamically — meaning "I need to add elements later" is the signal to reach for `vector` instead of `array` from the very start of a design, not something to patch onto an array afterward. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Omitting array size at declaration** — `string cars[] = {"Volvo", "BMW", "Ford"};` lets the compiler infer the size from the initializer list; equivalent to explicitly writing `[3]`. [S1] +- **Explicit size is "good practice"** — reduces the chance of errors, even though omitting it works. [S1] +- **Omitting elements requires a known size** — `string cars[5];` (size specified) can be filled in later index by index; `string cars[];` (no size) causes a compile error ("array size missing"). [S1] +- **Fixed size** — an array's size can NEVER change after creation; attempting to add a new index beyond its declared size is an error. [S1] +- **`vector`** — from ``, a RESIZABLE array; grows/shrinks dynamically via functions like `push_back()`. [S1] + +## 📖 세부 내용 (Details) +- Size-omitted declaration inferring 3 elements: `string cars[] = {"Volvo", "BMW", "Ford"};` — equivalent to `string cars[3] = {...};`. [S1] +- The fixed-size error case: `string cars[3] = {"Volvo", "BMW", "Ford"}; cars[3] = "Tesla"; // error — no 4th slot exists`. [S1] +- The vector alternative that CAN grow: `vector cars = {"Volvo", "BMW", "Ford"}; cars.push_back("Tesla"); // now has 4 elements`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **배열의 고정 크기 한계와 벡터라는 해법**: 배열은 생성 후 크기를 절대 바꿀 수 없어 4번째 요소를 추가하려 하면 에러가 발생하지만, 라이브러리의 vector 타입은 push_back()으로 동적으로 크기를 늘릴 수 있다는 점이 명시적으로 소개됨 — C 튜토리얼에는 없던 C++ 고유의 해법. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 요소를 나중에 추가/삭제해야 하는 상황이라면 배열 대신 벡터를 선택해야 한다는 판단 기준이 실전 설계 결정에서 핵심이다. [S1] + +## 💻 코드 패턴 (Code patterns) +A vector growing dynamically where a fixed-size array would error (C++): +```cpp +#include +vector cars = {"Volvo", "BMW", "Ford"}; +cars.push_back("Tesla"); // vector can grow; a fixed array cannot +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Arrays Multi]], [[CPP Vectors]], [[CPP Arrays RealLife]] +- **참조 맥락:** 배열 크기 생략과 벡터 소개 — 배열 실전 예제(Arrays RealLife) 챕터로 이어짐, 벡터(Vectors) 챕터와 직접 연결. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Omit Array Size — https://www.w3schools.com/cpp/cpp_arrays_omit.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Omit Array Size" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Arrays_RealLife.md b/10_Wiki/Dev/Topic_CPP/CPP_Arrays_RealLife.md new file mode 100644 index 00000000..931249e0 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Arrays_RealLife.md @@ -0,0 +1,70 @@ +--- +id: cpp-arrays-reallife +title: "C++ Arrays Real-Life Examples" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["average calculation", "find minimum", "C++ 배열 실전 예제"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "arrays", "real-life-example"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_arrays_reallife.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Arrays Real-Life Examples]] + +## 🎯 한 줄 통찰 (One-line insight) +This example computes the array LENGTH via `sizeof(ages) / sizeof(ages[0])` but then iterates using the for-each loop (`for (int age : ages)`) — combining the sizeof-formula (needed for the average's DENOMINATOR) with the for-each style (used for the actual ITERATION) rather than picking one loop style exclusively, showing the two techniques from the Arrays Size chapter aren't mutually exclusive alternatives but tools combined based on what each specific line of code actually needs. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Average via accumulate-then-divide** — sum every element in a for-each loop, then divide by the `sizeof`-derived length. [S1] +- **Find-minimum via self-seeded comparison** — initialize the tracking variable with the array's first element, then compare while looping through the rest (same technique as C). [S1] +- **Mixing sizeof (for length) and for-each (for iteration)** — the two array techniques from earlier chapters combined in one program based on what each line needs. [S1] + +## 📖 세부 내용 (Details) +- Average calculation combining sizeof-length and for-each iteration: `int ages[8] = {20,22,18,35,48,26,87,70}; float avg, sum = 0; int length = sizeof(ages) / sizeof(ages[0]); for (int age : ages) { sum += age; } avg = sum / length;`. [S1] +- Find-minimum via self-seeding: `int lowestAge = ages[0]; for (int age : ages) { if (lowestAge > age) { lowestAge = age; } }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **sizeof 공식과 for-each 루프를 함께 사용**: 배열 길이 계산에는 sizeof 공식을, 실제 순회에는 for-each를 쓰는 조합이 두 기법이 상호 배타적 대안이 아니라 상황에 맞게 함께 쓰이는 도구임을 보여줌. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +나이 목록의 평균과 최솟값을 계산하는 두 예제가 원문에서 직접 실전 활용 사례로 제시되며, sizeof 기반 length 계산과 for-each 순회 패턴을 실제 통계 계산에 결합해 적용하는 방법을 보여준다. [S1] + +## 💻 코드 패턴 (Code patterns) +Combining sizeof (for length) and the for-each loop (for iteration) in one calculation (C++): +```cpp +int ages[8] = {20, 22, 18, 35, 48, 26, 87, 70}; +float avg, sum = 0; +int length = sizeof(ages) / sizeof(ages[0]); +for (int age : ages) { + sum += age; +} +avg = sum / length; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Arrays Omit]], [[CPP Structs]], [[C Arrays RealLife]] +- **참조 맥락:** 배열 섹션 마지막 — 구조체 및 열거형(Structs & Enum) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Arrays Real-Life Examples — https://www.w3schools.com/cpp/cpp_arrays_reallife.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Arrays Real-Life Examples" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Arrays_Size.md b/10_Wiki/Dev/Topic_CPP/CPP_Arrays_Size.md new file mode 100644 index 00000000..514bb774 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Arrays_Size.md @@ -0,0 +1,70 @@ +--- +id: cpp-arrays-size +title: "C++ Array Size" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["sizeof array", "array length formula", "foreach vs sizeof loop", "C++ 배열 크기"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "arrays", "sizeof"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_arrays_size.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Array Size]] + +## 🎯 한 줄 통찰 (One-line insight) +This chapter explicitly presents THREE competing ways to loop through an array — hardcoded bound (fragile), `sizeof(arr)/sizeof(arr[0])` (robust but verbose), and the C++11 for-each loop (cleanest) — and closes by saying it's "good to know" all three because "you may encounter them all in different programs," meaning C++ codebases in the wild mix loop styles from different eras, unlike C where the sizeof-formula approach was presented as the single best practice. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`sizeof(array)`** — returns the array's TOTAL memory footprint in bytes, not element count (same C behavior). [S1] +- **Element-count formula** — `sizeof(arr) / sizeof(arr[0])` gives the actual element count. [S1] +- **Three loop styles for arrays** — hardcoded bound (fragile), sizeof-formula bound (robust), for-each (C++11, cleanest). [S1] +- **All three coexist in real code** — the tutorial explicitly recommends knowing all of them since different programs use different styles. [S1] + +## 📖 세부 내용 (Details) +- Raw byte-size result: `int myNumbers[5] = {10, 20, 30, 40, 50}; cout << sizeof(myNumbers); // 20 (not 5)`. [S1] +- Correct element-count formula: `int getArrayLength = sizeof(myNumbers) / sizeof(myNumbers[0]); cout << getArrayLength; // 5`. [S1] +- Sizeof-driven loop (robust but verbose): `for (int i = 0; i < sizeof(myNumbers) / sizeof(myNumbers[0]); i++) { cout << myNumbers[i] << "\n"; }`. [S1] +- The cleanest alternative (C++11 for-each): `for (int num : myNumbers) { cout << num << "\n"; }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **세 가지 반복 스타일이 실전에서 혼재함**: 하드코딩된 경계, sizeof 공식 기반, for-each 세 방식 모두 실제 프로그램에서 마주칠 수 있어 전부 알아두는 것이 좋다고 명시적으로 권고됨 — C 챕터가 sizeof 공식을 유일한 권장 방식으로 제시한 것과 대비됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 세 가지 반복 스타일을 모두 이해해두는 것이 다양한 C++ 코드베이스를 읽는 실전 능력으로 이어진다. [S1] + +## 💻 코드 패턴 (Code patterns) +The cleanest way to loop through an array, introduced in C++11 (C++): +```cpp +int myNumbers[5] = {10, 20, 30, 40, 50}; +for (int num : myNumbers) { + cout << num << "\n"; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Arrays]], [[CPP Arrays Loop]], [[CPP For Loop Foreach]], [[C Arrays Size]] +- **참조 맥락:** 배열 크기 계산 공식 — 배열과 반복문(Arrays Loop) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Array Size — https://www.w3schools.com/cpp/cpp_arrays_size.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Array Size" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Auto.md b/10_Wiki/Dev/Topic_CPP/CPP_Auto.md new file mode 100644 index 00000000..dd5d6537 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Auto.md @@ -0,0 +1,78 @@ +--- +id: cpp-auto +title: "C++ auto" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["auto keyword C++", "type inference C++", "C++ 자동 타입 추론"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "auto", "type-inference"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_auto.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Auto]] + +## 🎯 한 줄 통찰 (One-line insight) +C++11's `auto` hijacks the EXACT SAME keyword C already had (`auto` is a legal C storage-class specifier meaning "automatic/local storage duration," the implicit default for every local variable) and repurposes it to mean something completely unrelated — compile-time type inference — meaning any C programmer who ever learned "auto is the default, mostly-unused storage class" must unlearn that and relearn `auto` as "let the compiler deduce my type," the same token now doing a categorically different job depending on which language's rules apply. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`auto` = compile-time type inference** — the compiler determines the variable's type from the value assigned to it, e.g. `auto x = 5;` makes `x` an `int`. [S1] +- **Must initialize at declaration** — `auto x;` with no assigned value is illegal; the compiler needs the right-hand value to infer a type from. [S1] +- **Type is locked in after inference** — once `auto x = 5;` fixes `x` as `int`, later reassigning a different type (`x = 9.99;`) is a compile error, exactly as if `int` had been written explicitly. [S1] +- **Works for any type** — `int`, `float` (`5.99f`), `double` (`9.98`), `char` (`'D'`), `bool` (`true`), and `std::string` (`string("Hello")`) are all shown inferred correctly. [S1] +- **Primary real-world use: complex types** — the tutorial notes `auto` is used sparingly for simple types (`int`, `double`) but becomes genuinely valuable for verbose/complex types like iterators and lambdas, where writing the full type out by hand is impractical. [S1] + +## 📖 세부 내용 (Details) +- Basic substitution: `auto x = 5;` behaves identically to `int x = 5;`. [S1] +- Multi-type example: `auto myNum = 5; auto myFloatNum = 5.99f; auto myDoubleNum = 9.98; auto myLetter = 'D'; auto myBoolean = true; auto myString = string("Hello");` — each variable's true type is silently inferred (int, float, double, char, bool, std::string respectively). [S1] +- Type-locking demonstrated: `auto x = 5; x = 10; // OK; x = 9.99; // Error`. [S1] +- Cross-reference to prior chapters: this page explicitly calls back to iterators (`vector::iterator it` shortened to `auto it`) and forward to lambdas as the chapters where `auto`'s real value shows up. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **동일 키워드, 완전히 다른 의미**: C에서 `auto`는 지역 변수의 기본 저장 기간(automatic storage duration)을 명시하는 저장 클래스 지정자로, 사실상 거의 사용되지 않는 키워드였다. C++11은 이 키워드를 재사용하되 "타입 추론"이라는 전혀 다른 의미를 부여했다는 점이 이번 챕터에서 확인됨 — 문법 토큰은 같지만 역할은 완전히 별개. [S1] +- **한 번 추론된 타입은 고정됨**: 동적 타입 언어의 변수 재할당과 혼동하기 쉽지만, `auto`로 추론된 타입도 일반 `int`/`double` 변수와 똑같이 정적 타입 검사를 받는다는 점이 예제(`x = 9.99;` 에러)로 명확히 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +Iterators 챕터에서 이미 `vector::iterator it` 대신 `auto it = cars.begin();`으로 축약해 사용한 것이 `auto`의 실전 활용 사례로 원문에서 직접 역참조됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Type inference across multiple types, and the type-locking rule (C++): +```cpp +auto myNum = 5; // int +auto myFloatNum = 5.99f; // float +auto myDoubleNum = 9.98; // double +auto myLetter = 'D'; // char +auto myBoolean = true; // bool +auto myString = string("Hello"); // std::string + +auto x = 5; // x is now an int +x = 10; // OK - still an int +x = 9.99; // Error - can't assign a double to an int +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Iterators]], [[CPP Functions Lambda]], [[C Variables]] +- **참조 맥락:** C++ 튜토리얼의 마지막 챕터 — Topic_CPP 전체 완료. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ auto — https://www.w3schools.com/cpp/cpp_auto.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ auto" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Booleans.md b/10_Wiki/Dev/Topic_CPP/CPP_Booleans.md new file mode 100644 index 00000000..e918b821 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Booleans.md @@ -0,0 +1,71 @@ +--- +id: cpp-booleans +title: "C++ Booleans" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["bool type", "boolalpha manipulator", "C++ 불리언"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "booleans", "boolalpha"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_booleans.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Booleans]] + +## 🎯 한 줄 통찰 (One-line insight) +`boolalpha` is explicitly NOT a data type — it's an I/O stream manipulator, a persistent SETTING that changes how `cout` displays every subsequent boolean until `noboolalpha` resets it — meaning printing `true`/`false` as words versus `1`/`0` isn't a per-call choice like a format specifier, but a stateful mode switch that affects ALL following boolean output on that stream. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`bool`** — native C++ type; `true` (1) or `false` (0). [S1] +- **Default printing shows 1/0** — `cout << boolVar;` prints the integer representation by default. [S1] +- **`boolalpha`** — an I/O manipulator (not a type) that switches `cout` to print `true`/`false` as WORDS instead of `1`/`0`; the setting persists for all subsequent output until reset. [S1] +- **`noboolalpha`** — resets `cout` back to the default `1`/`0` printing behavior. [S1] +- **Both styles are valid** — the choice between `1`/`0` and `true`/`false` display is purely stylistic. [S1] + +## 📖 세부 내용 (Details) +- Default 1/0 printing: `bool isCodingFun = true; cout << isCodingFun; // 1`. [S1] +- Switching to word display: `cout << boolalpha; cout << isCodingFun; // true`. [S1] +- Resetting back to numeric display: `cout << noboolalpha; cout << isCodingFun; // 1`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **boolalpha는 타입이 아니라 상태를 바꾸는 매니퓰레이터**: 한 번 켜면 이후의 모든 불리언 출력에 지속적으로 영향을 미치는 설정이라는 점이 명시적으로 확인됨 — noboolalpha로 초기화하기 전까지 유지됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — boolalpha/noboolalpha를 오가며 출력 스타일을 전환하는 것이 디버깅 출력의 가독성을 높이는 실전 활용이다. [S1] + +## 💻 코드 패턴 (Code patterns) +Switching cout's boolean display mode with boolalpha, then resetting it (C++): +```cpp +bool isCodingFun = true; +cout << boolalpha; // enable printing "true"/"false" +cout << isCodingFun; // Outputs true +cout << noboolalpha; // reset to 1/0 +cout << isCodingFun; // Outputs 1 +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Math]], [[CPP Booleans Expressions]], [[C Booleans]] +- **참조 맥락:** 불리언 섹션 첫 챕터 — 불리언 표현식(Booleans Expressions) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Booleans — https://www.w3schools.com/cpp/cpp_booleans.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Booleans" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Booleans_Expressions.md b/10_Wiki/Dev/Topic_CPP/CPP_Booleans_Expressions.md new file mode 100644 index 00000000..2b4a9fca --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Booleans_Expressions.md @@ -0,0 +1,68 @@ +--- +id: cpp-booleans-expressions +title: "C++ Boolean Expressions" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["comparison result storage", "C++ 불리언 표현식"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "booleans", "boolean-expressions"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_booleans_expressions.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Boolean Expressions]] + +## 🎯 한 줄 통찰 (One-line insight) +The source explicitly frames boolean expressions as "the foundation of decision making in programming" — not just a data-comparison mechanism, but the literal MECHANISM by which a program "decides what to do," directly foreshadowing the entire upcoming Conditions section, which is really just boolean expressions wired into `if`/`else` branches. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Boolean expression** — code that compares values/variables and returns `1` (true) or `0` (false). [S1] +- **Comparisons work on both literals and variables** — `cout << (x > y);` and `cout << (10 > 9);` behave identically. [S1] +- **Storing a comparison in a bool variable** — `bool isGreater = x > y;` makes reused/complex conditions more readable. [S1] + +## 📖 세부 내용 (Details) +- Greater-than comparison on variables: `int x = 10; int y = 9; cout << (x > y); // 1`. [S1] +- Equal-to comparison on a literal: `cout << (10 == 15); // 0`. [S1] +- Storing a comparison result: `int x = 10; int y = 9; bool isGreater = x > y; cout << isGreater; // 1`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 비교 결과를 bool 변수에 저장해 재사용하는 패턴이 코드 가독성을 높이는 실전 습관으로 권장된다. [S1] + +## 💻 코드 패턴 (Code patterns) +Storing a comparison's result in a bool variable for readability (C++): +```cpp +int x = 10; +int y = 9; +bool isGreater = x > y; +cout << isGreater; // returns 1 (true) +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Booleans]], [[CPP Booleans RealLife]], [[C Booleans]] +- **참조 맥락:** 불리언 표현식 — 불리언 실전 예제(Booleans RealLife) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Boolean Expressions — https://www.w3schools.com/cpp/cpp_booleans_expressions.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Boolean Expressions" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Booleans_RealLife.md b/10_Wiki/Dev/Topic_CPP/CPP_Booleans_RealLife.md new file mode 100644 index 00000000..78c50c9e --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Booleans_RealLife.md @@ -0,0 +1,70 @@ +--- +id: cpp-booleans-reallife +title: "C++ Boolean Examples" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["voting age example", "boolean if-else preview", "C++ 불리언 실전 예제"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "booleans", "real-life-example"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_booleans_reallife.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Boolean Examples]] + +## 🎯 한 줄 통찰 (One-line insight) +This chapter upgrades a raw `1`/`0` boolean printout into an `if...else` statement using the IDENTICAL voting-age scenario and comparison from C's equivalent Booleans RealLife chapter — showing that C++'s conditional syntax (`if (myAge >= votingAge) {...} else {...}`) is a drop-in replacement for C's, with the only difference being `cout <<` instead of `printf()` inside the branches. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Raw comparison output** — `cout << (myAge >= votingAge);` shows 1 or 0, technically correct but not user-friendly. [S1] +- **The same comparison inside `if...else`** — produces human-readable output instead of a raw 1/0. [S1] +- **Booleans as the foundation of conditions** — explicitly stated to be the basis for ALL C++ comparisons and conditions, directly foreshadowing the Conditions section. [S1] + +## 📖 세부 내용 (Details) +- Raw comparison output: `int myAge = 25; int votingAge = 18; cout << (myAge >= votingAge); // 1`. [S1] +- The same logic upgraded into an if...else: `if (myAge >= votingAge) { cout << "Old enough to vote!"; } else { cout << "Not old enough to vote."; }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +투표 가능 연령(18세) 확인 로직을 raw 1/0 출력에서 if...else로 업그레이드하는 것이 이 챕터가 직접 보여주는 실전 활용 사례이자, 다음 챕터(Conditions)로의 전환점이다. [S1] + +## 💻 코드 패턴 (Code patterns) +The same boolean comparison used inside an if...else for human-readable output (C++): +```cpp +int myAge = 25; +int votingAge = 18; +if (myAge >= votingAge) { + cout << "Old enough to vote!"; +} else { + cout << "Not old enough to vote."; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Booleans Expressions]], [[CPP Conditions]], [[C Booleans RealLife]] +- **참조 맥락:** 불리언 섹션 마지막 — 조건문(Conditions) 섹션으로 직접 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Boolean Examples — https://www.w3schools.com/cpp/cpp_booleans_reallife.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Boolean Examples" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Break.md b/10_Wiki/Dev/Topic_CPP/CPP_Break.md new file mode 100644 index 00000000..431d09ce --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Break.md @@ -0,0 +1,75 @@ +--- +id: cpp-break +title: "C++ Break and Continue" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["break statement", "continue statement", "loop control", "C++ break continue"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "loops", "break", "continue"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_break.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Break and Continue]] + +## 🎯 한 줄 통찰 (One-line insight) +The break-in-while example places `i++` BEFORE the `if (i == 4) break;` check, deliberately different ordering from the continue-in-while example (which places `i++` inside the `if` block before `continue`) — a subtle structural detail showing that where the increment sits relative to the break/continue check must be deliberately designed per-case to avoid either skipping a value or looping forever, unlike a `for` loop where the increment is guaranteed to run automatically regardless of `continue`. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`break`** — stops the loop COMPLETELY. [S1] +- **`continue`** — skips the REST of the current iteration and jumps to the next one. [S1] +- **Works in both `for` and `while` loops** — same semantics apply regardless of loop type. [S1] +- **Increment placement matters in `while` loops** — unlike `for` loops (where the increment always runs), a `while` loop's increment must be manually placed correctly relative to `continue`, or the loop may infinite-loop or skip incorrectly. [S1] + +## 📖 세부 내용 (Details) +- `break` stopping a for loop at i==4: `for (int i = 0; i < 10; i++) { if (i == 4) { break; } cout << i << "\n"; }` — prints 0,1,2,3 then stops entirely. [S1] +- `continue` skipping just one value: `for (int i = 0; i < 10; i++) { if (i == 4) { continue; } cout << i << "\n"; }` — prints 0,1,2,3,5,6,7,8,9. [S1] +- `break` in a while loop (increment BEFORE the break check): `int i = 0; while (i < 10) { cout << i << "\n"; i++; if (i == 4) { break; } }`. [S1] +- `continue` in a while loop (increment INSIDE the if, before continue, to avoid an infinite loop): `int i = 0; while (i < 10) { if (i == 4) { i++; continue; } cout << i << "\n"; i++; }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **while 루프에서는 증가식 위치를 직접 설계해야 함**: for 루프와 달리 while 루프는 증가식(i++)이 자동으로 실행되지 않으므로, continue를 쓸 때는 continue 이전에 반드시 i++을 넣어야 무한루프를 피할 수 있다는 점이 두 예제(break용/continue용)의 서로 다른 i++ 배치로 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — while 루프에서 continue를 쓸 때 증가식을 continue 이전에 두어야 무한루프를 방지한다는 점이 실전 디버깅에서 흔히 놓치는 함정으로 시사된다. [S1] + +## 💻 코드 패턴 (Code patterns) +Placing the increment before continue in a while loop to avoid an infinite loop (C++): +```cpp +int i = 0; +while (i < 10) { + if (i == 4) { + i++; // must increment before continue + continue; + } + cout << i << "\n"; + i++; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP For Loop RealLife]], [[CPP Switch]], [[CPP Arrays]] +- **참조 맥락:** 반복문 섹션 마지막 — 배열(Arrays) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Break and Continue — https://www.w3schools.com/cpp/cpp_break.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Break and Continue" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Class_Methods.md b/10_Wiki/Dev/Topic_CPP/CPP_Class_Methods.md new file mode 100644 index 00000000..fe5d955b --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Class_Methods.md @@ -0,0 +1,78 @@ +--- +id: cpp-class-methods +title: "C++ Class Methods" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["scope resolution operator", "define method outside class", "C++ 클래스 메서드"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "oop", "methods"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_class_methods.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Class Methods]] + +## 🎯 한 줄 통찰 (One-line insight) +The scope resolution operator (`ClassName::methodName`) lets a method's DECLARATION live inside the class while its DEFINITION lives entirely outside it — recommended explicitly "especially in large programs" — mirroring the exact same declaration/definition-split rationale from the earlier plain-Functions chapter, but requiring this specific `::` syntax to reconnect the standalone definition back to its owning class. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Method** — a function belonging to a class; accessed via dot syntax on an object, same as attributes. [S1] +- **Defining inside the class** — the method's full body is written directly within the class definition. [S1] +- **Defining outside the class** — the class only DECLARES the method's signature; the actual body is written later using `ClassName::methodName() { ... }`. [S1] +- **Scope resolution operator (`::`)** — connects a method definition written outside the class back to its class. [S1] +- **Methods with parameters** — work exactly like regular function parameters. [S1] + +## 📖 세부 내용 (Details) +- Method defined inline: `class MyClass { public: void myMethod() { cout << "Hello World!"; } };`. [S1] +- Method declared in the class, defined outside via `::`: `class MyClass { public: void myMethod(); }; void MyClass::myMethod() { cout << "Hello World!"; }`. [S1] +- A parameterized method: `class Car { public: int speed(int maxSpeed); }; int Car::speed(int maxSpeed) { return maxSpeed; } Car myObj; cout << myObj.speed(200);`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **:: 연산자가 클래스 외부 정의를 다시 연결함**: 큰 프로그램에서는 메서드를 클래스 안에서는 선언만 하고 실제 본문은 밖에서 ClassName::methodName() 형태로 정의하는 것이 권장되며, 이 :: (범위 결정 연산자)가 정의를 소속 클래스와 다시 연결한다는 점이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +Car 클래스의 speed() 메서드가 매개변수(maxSpeed)를 받아 그대로 반환하는 예제가 클래스 메서드의 매개변수 활용 실전 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Declaring a method inside the class, defining it outside using the scope resolution operator (C++): +```cpp +class Car { +public: + int speed(int maxSpeed); // declaration +}; +int Car::speed(int maxSpeed) { // definition, outside the class + return maxSpeed; +} +int main() { + Car myObj; + cout << myObj.speed(200); + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Classes]], [[CPP Constructors]], [[CPP Functions Decl]] +- **참조 맥락:** OOP Basics 섹션 마지막 — 생성자(Constructors) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Class Methods — https://www.w3schools.com/cpp/cpp_class_methods.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Class Methods" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Classes.md b/10_Wiki/Dev/Topic_CPP/CPP_Classes.md new file mode 100644 index 00000000..e2abbb35 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Classes.md @@ -0,0 +1,80 @@ +--- +id: cpp-classes +title: "C++ Classes and Objects" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["class keyword", "public access specifier", "attributes", "C++ 클래스와 객체"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "oop", "classes"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_classes.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Classes and Objects]] + +## 🎯 한 줄 통찰 (One-line insight) +A C++ class LOOKS almost identical to a C struct at first glance — variables grouped inside curly braces, accessed via dot syntax, ending in a semicolon — but requires ONE extra piece C's struct never needed: the `public:` access specifier, meaning without it, class members would default to being INACCESSIBLE from outside the class, a private-by-default behavior structs don't have. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Class** — a user-defined data type; a "blueprint" for creating objects; variables inside are called ATTRIBUTES, functions are called METHODS (collectively "class members"). [S1] +- **`class` keyword** — creates a class, e.g. `class MyClass { ... };` — ending with a semicolon, just like a struct. [S1] +- **`public:` access specifier** — REQUIRED for members to be accessible from outside the class (covered in more depth in a later chapter). [S1] +- **Creating an object** — `MyClass myObj;` instantiates the class; attributes are accessed via dot syntax (`myObj.myNum`). [S1] +- **Multiple objects from one class** — each object maintains its OWN independent set of attribute values. [S1] + +## 📖 세부 내용 (Details) +- Basic class with public attributes: `class MyClass { public: int myNum; string myString; };`. [S1] +- Creating an object and setting/reading attributes: `MyClass myObj; myObj.myNum = 15; myObj.myString = "Some text"; cout << myObj.myNum;`. [S1] +- Two independent objects of the same class: `Car carObj1; carObj1.brand = "BMW"; Car carObj2; carObj2.brand = "Ford";` — each object's `brand` is stored separately. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **public 접근 지정자가 필수적으로 요구됨**: C의 struct와 겉모습은 비슷하지만, C++ 클래스는 멤버를 클래스 외부에서 접근하려면 public: 접근 지정자를 명시해야 한다는 점이 확인됨(기본은 private) — 이는 다음 섹션(Access Specifiers)에서 더 자세히 다뤄짐. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +Car 클래스 하나로 BMW와 Ford 두 대의 서로 다른 자동차 객체를 만드는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +A class with public attributes, instantiated as two independent objects (C++): +```cpp +class Car { +public: + string brand; + string model; + int year; +}; +int main() { + Car carObj1; + carObj1.brand = "BMW"; + Car carObj2; + carObj2.brand = "Ford"; + cout << carObj1.brand << "\n" << carObj2.brand; + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP OOP]], [[CPP Class Methods]], [[C Structs]] +- **참조 맥락:** 클래스와 객체 — 클래스 메서드(Class Methods) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Classes and Objects — https://www.w3schools.com/cpp/cpp_classes.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Classes and Objects" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Comments.md b/10_Wiki/Dev/Topic_CPP/CPP_Comments.md new file mode 100644 index 00000000..658af17b --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Comments.md @@ -0,0 +1,65 @@ +--- +id: cpp-comments +title: "C++ Comments" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["single-line comments", "multi-line comments", "C++ 주석"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "comments"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_comments.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Comments]] + +## 🎯 한 줄 통찰 (One-line insight) +Unlike the C tutorial, which highlighted a historical constraint (single-line `//` comments only became standard in C99), the C++ chapter presents both `//` and `/* */` as equally native from the start with no such caveat — reflecting that C++ never carried C's pre-1999 single-line-comment limitation, since C++ has supported `//` since its earliest standardization. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Single-line comments (`//`)** — text from `//` to end of line is ignored by the compiler. [S1] +- **Multi-line comments (`/* */`)** — text between the markers is ignored, regardless of line count. [S1] +- **Stylistic convention** — `//` for short comments, `/* */` for longer ones; entirely up to the developer. [S1] + +## 📖 세부 내용 (Details) +- Single-line comment before code: `// This is a comment cout << "Hello World!";`. [S1] +- Single-line comment at end of a line: `cout << "Hello World!"; // This is a comment`. [S1] +- Multi-line comment: `/* The code below will print the words Hello World! to the screen, and it is amazing */ cout << "Hello World!";`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 짧은 주석에는 //, 긴 설명에는 /* */를 쓰는 관행이 C 챕터와 동일하게 권장됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Single-line comment used to explain a line of code (C++): +```cpp +cout << "Hello World!"; // This is a comment +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Statements]], [[CPP Output]] +- **참조 맥락:** 주석 문법 — 출력(Output) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Comments — https://www.w3schools.com/cpp/cpp_comments.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Comments" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Conditions.md b/10_Wiki/Dev/Topic_CPP/CPP_Conditions.md new file mode 100644 index 00000000..3bd6ea41 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Conditions.md @@ -0,0 +1,70 @@ +--- +id: cpp-conditions +title: "C++ If ... Else" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["if statement", "lowercase if", "C++ 조건문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "conditions", "if-statement"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_conditions.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP If ... Else]] + +## 🎯 한 줄 통찰 (One-line insight) +Every rule from C's `if` chapter carries over verbatim — lowercase-only `if` (uppercase `If`/`IF` errors), the same six comparison operators, and the same bool-variable-for-readability pattern — meaning C++'s conditional syntax is a direct, unmodified continuation of C's, with the only visible difference being `cout <<` replacing `printf()` inside the branches. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Six comparison conditions** — `<`, `<=`, `>`, `>=`, `==`, `!=`, identical to C. [S1] +- **Four conditional constructs** — `if`, `else`, `else if`, `switch` — same set as C. [S1] +- **Case-sensitive keyword** — `if` must be lowercase; `If`/`IF` produce an error. [S1] +- **Boolean-variable readability pattern** — storing a comparison's result in a `bool` variable before using it in `if` improves readability for complex/reused conditions. [S1] + +## 📖 세부 내용 (Details) +- Basic if with variables: `int x = 20; int y = 18; if (x > y) { cout << "x is greater than y"; }`. [S1] +- Using a boolean variable to hold the condition: `bool isGreater = x > y; if (isGreater) { cout << "x is greater than y"; }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). C 챕터와 동일한 규칙임이 확인됨. + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 복잡하거나 재사용되는 조건을 bool 변수에 미리 담아두는 패턴이 가독성 있는 조건문 작성의 실전 관행이다. [S1] + +## 💻 코드 패턴 (Code patterns) +Storing a condition in a readable boolean variable before using it in an if statement (C++): +```cpp +int x = 20; +int y = 18; +bool isGreater = x > y; +if (isGreater) { + cout << "x is greater than y"; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Booleans RealLife]], [[CPP Conditions Else]], [[C Conditions]] +- **참조 맥락:** 조건문 섹션 첫 챕터 — else 문(Conditions Else) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ If ... Else — https://www.w3schools.com/cpp/cpp_conditions.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ If ... Else" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Conditions_Else.md b/10_Wiki/Dev/Topic_CPP/CPP_Conditions_Else.md new file mode 100644 index 00000000..1a811702 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Conditions_Else.md @@ -0,0 +1,70 @@ +--- +id: cpp-conditions-else +title: "C++ Else" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["else statement", "C++ else 문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.82 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "conditions", "else"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_conditions_else.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Else]] + +## 🎯 한 줄 통찰 (One-line insight) +The identical time-of-day (`time < 18`) example and the identical `isDay`-naming advice from C's Else chapter reappear here unchanged — confirming that descriptive boolean naming as a pure communication device (not a behavioral change) is a language-agnostic best practice the tutorial deliberately repeats across both C and C++. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`else`** — runs a block of code when the paired `if` condition is false. [S1] +- **Mutually exclusive branches** — exactly one of `if`/`else` executes. [S1] +- **Descriptive boolean naming** — storing a condition in a variable like `isDay` documents its MEANING. [S1] + +## 📖 세부 내용 (Details) +- Basic if/else: `int time = 20; if (time < 18) { cout << "Good day."; } else { cout << "Good evening."; } // Outputs "Good evening."`. [S1] +- Same logic with a descriptively-named boolean: `bool isDay = time < 18; if (isDay) { cout << "Good day."; } else { cout << "Good evening."; }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +시간(time)이 18보다 작은지에 따라 "좋은 하루"/"좋은 저녁"을 출력하는 예제가 C 챕터와 동일하게 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Naming a boolean condition descriptively for readability (C++): +```cpp +int time = 20; +bool isDay = time < 18; +if (isDay) { + cout << "Good day."; +} else { + cout << "Good evening."; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.82 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Conditions]], [[CPP Conditions ElseIf]], [[C Conditions Else]] +- **참조 맥락:** else 문 — else if 문(Conditions ElseIf) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Else — https://www.w3schools.com/cpp/cpp_conditions_else.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Else" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Conditions_ElseIf.md b/10_Wiki/Dev/Topic_CPP/CPP_Conditions_ElseIf.md new file mode 100644 index 00000000..25d229fb --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Conditions_ElseIf.md @@ -0,0 +1,72 @@ +--- +id: cpp-conditions-elseif +title: "C++ Else If" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["else if chain", "top to bottom evaluation", "C++ else if 문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "conditions", "else-if"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_conditions_elseif.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Else If]] + +## 🎯 한 줄 통찰 (One-line insight) +The first-match-wins rule (conditions checked top-to-bottom, stopping at the first true match, even if a later condition would also hold) is stated with the exact same wording and the exact same time-of-day example as C's chapter — reconfirming that C++'s `else if` chain evaluation semantics are inherited from C without modification. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`else if`** — tests a new condition only if the preceding condition(s) were false. [S1] +- **First-match-wins evaluation** — conditions checked top to bottom; the first true condition's block runs, remaining conditions are skipped. [S1] +- **Boolean-variable chaining** — each condition in the chain can be pre-computed into a descriptively-named bool. [S1] + +## 📖 세부 내용 (Details) +- Time-of-day chain: `int time = 16; if (time < 12) { cout << "Good morning."; } else if (time < 18) { cout << "Good day."; } else { cout << "Good evening."; } // Outputs "Good day."`. [S1] +- Same chain with named booleans: `bool isMorning = time < 12; bool isDay = time < 18; if (isMorning) {...} else if (isDay) {...} else {...}`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). C 챕터와 완전히 동일한 우선 매칭 규칙임이 확인됨. + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 시간대에 따라 아침/낮/저녁 인사를 구분하는 것이 else if 체인의 대표적인 실전 활용 예시다. [S1] + +## 💻 코드 패턴 (Code patterns) +Chained else-if conditions evaluated top-to-bottom, stopping at the first match (C++): +```cpp +int time = 16; +if (time < 12) { + cout << "Good morning."; +} else if (time < 18) { + cout << "Good day."; +} else { + cout << "Good evening."; +} +// Outputs "Good day." +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Conditions Else]], [[CPP Conditions Shorthand]], [[C Conditions ElseIf]] +- **참조 맥락:** else if 체인 — 삼항 연산자(Conditions Shorthand) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Else If — https://www.w3schools.com/cpp/cpp_conditions_elseif.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Else If" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Conditions_Logical.md b/10_Wiki/Dev/Topic_CPP/CPP_Conditions_Logical.md new file mode 100644 index 00000000..a2bbc9b6 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Conditions_Logical.md @@ -0,0 +1,74 @@ +--- +id: cpp-conditions-logical +title: "C++ Logical Operators in Conditions" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["access control logic", "&& || ! in if", "C++ 조건문 논리 연산자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "conditions", "logical-operators"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_conditions_logical.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Logical Operators in Conditions]] + +## 🎯 한 줄 통찰 (One-line insight) +The exact same nested access-control rule (`isLoggedIn && (isAdmin || securityLevel <= 2)`) and the exact same four worked-through securityLevel outcomes (1/2 granted, 3/4 denied) reappear identically from C's chapter — confirming this specific compound authorization pattern was deliberately carried over as the canonical teaching example for combining `&&`/`||` across both languages. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`&&` (AND)** — both conditions must be true. [S1] +- **`||` (OR)** — at least one condition must be true. [S1] +- **`!` (NOT)** — reverses a condition's truth value. [S1] +- **Nested logical composition** — parentheses group sub-conditions that combine with another condition via `&&`, mirroring real authorization rules. [S1] + +## 📖 세부 내용 (Details) +- AND: `int a = 200, b = 33, c = 500; if (a > b && c > a) { cout << "Both conditions are true"; }`. [S1] +- OR: `if (a > b || a > c) { cout << "At least one condition is true"; }`. [S1] +- NOT: `int a = 33; int b = 200; if (!(a > b)) { cout << "a is NOT greater than b"; }`. [S1] +- Full access-control rule with worked-through outcomes: `bool isLoggedIn = true; bool isAdmin = false; int securityLevel = 3; if (isLoggedIn && (isAdmin || securityLevel <= 2)) { cout << "Access granted."; } else { cout << "Access denied."; }` — securityLevel 1 or 2 → granted; 3 or 4 → denied (unless isAdmin is true). [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). C 챕터의 접근 제어 예제와 완전히 동일함이 확인됨. + +## 🛠️ 적용 사례 (Applied in summary) +로그인 여부(isLoggedIn) + (관리자이거나(isAdmin) 보안등급이 2 이하(securityLevel <= 2))를 결합한 접근 제어 규칙이 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Nested AND/OR logic for a real-world access-control rule (C++): +```cpp +bool isLoggedIn = true; +bool isAdmin = false; +int securityLevel = 3; // 1 = highest +if (isLoggedIn && (isAdmin || securityLevel <= 2)) { + cout << "Access granted."; +} else { + cout << "Access denied."; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Conditions Shorthand]], [[CPP Operators Logical]], [[CPP Conditions Nested]] +- **참조 맥락:** 조건문 내 논리 연산자 — 중첩 if(Conditions Nested) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Logical Operators in Conditions — https://www.w3schools.com/cpp/cpp_conditions_logical.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Logical Operators in Conditions" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Conditions_Nested.md b/10_Wiki/Dev/Topic_CPP/CPP_Conditions_Nested.md new file mode 100644 index 00000000..6b35ee22 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Conditions_Nested.md @@ -0,0 +1,75 @@ +--- +id: cpp-conditions-nested +title: "C++ Nested If" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["if inside if", "dependent conditions", "C++ 중첩 if"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "conditions", "nested-if"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_conditions_nested.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Nested If]] + +## 🎯 한 줄 통찰 (One-line insight) +The same short-circuit benefit from C's Nested If chapter applies unchanged — the citizenship check (`isCitizen`) is never even evaluated if `age >= 18` is false, meaning nesting still functions as a genuine short-circuit optimization in C++, not just visual grouping of related checks. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Nested if** — placing an `if` inside another `if`'s block, so the inner condition is only checked when the outer condition already holds. [S1] +- **Dependent condition modeling** — naturally expresses "check B only if A holds." [S1] +- **Depth caution** — avoid nesting too deeply, as it hurts readability; often combined with `else`/`else if`. [S1] + +## 📖 세부 내용 (Details) +- Basic two-level nesting: `int x = 15; int y = 25; if (x > 10) { cout << "x is greater than 10\n"; if (y > 20) { cout << "y is also greater than 20\n"; } }`. [S1] +- Voting + citizenship real-life example: `int age = 20; bool isCitizen = true; if (age >= 18) { cout << "Old enough to vote.\n"; if (isCitizen) { cout << "And you are a citizen, so you can vote!\n"; } else { cout << "But you must be a citizen to vote.\n"; } } else { cout << "Not old enough to vote.\n"; }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). C 챕터와 동일한 중첩 if 및 단축 평가 특성이 확인됨. + +## 🛠️ 적용 사례 (Applied in summary) +투표 가능 연령(18세 이상)을 먼저 확인하고, 그 안에서만 시민권 여부를 추가로 확인하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +An inner condition (citizenship) checked only when the outer condition (age) already holds (C++): +```cpp +int age = 20; +bool isCitizen = true; +if (age >= 18) { + cout << "Old enough to vote.\n"; + if (isCitizen) { + cout << "And you are a citizen, so you can vote!\n"; + } else { + cout << "But you must be a citizen to vote.\n"; + } +} else { + cout << "Not old enough to vote.\n"; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Conditions Logical]], [[CPP Conditions RealLife]], [[C Conditions Nested]] +- **참조 맥락:** 중첩 if — 조건문 실전 예제(Conditions RealLife) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Nested If — https://www.w3schools.com/cpp/cpp_conditions_nested.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Nested If" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Conditions_RealLife.md b/10_Wiki/Dev/Topic_CPP/CPP_Conditions_RealLife.md new file mode 100644 index 00000000..95ef82f1 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Conditions_RealLife.md @@ -0,0 +1,71 @@ +--- +id: cpp-conditions-reallife +title: "C++ If ... Else Examples" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["real-life if else", "even or odd example", "C++ 조건문 실전 예제"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.82 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "conditions", "real-life-example"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_conditions_reallife.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP If ... Else Examples]] + +## 🎯 한 줄 통찰 (One-line insight) +The five worked scenarios (door code, positive/negative/zero, voting age, nested citizenship check, even/odd via `%`) mirror C's real-life if/else chapter almost verbatim — the sole notable omission is C's temperature-banding example, meaning this chapter consolidates the same core parity-check and equality-check idioms while trimming one example from the C original. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **This chapter is a compilation** — worked real-life if/else scenarios consolidating patterns from every prior Conditions sub-chapter. [S1] +- **Door-code check** — a single `==` equality check gating access. [S1] +- **Positive/negative/zero classification** — a three-way `if`/`else if`/`else` chain. [S1] +- **Even/odd via modulus** — `num % 2 == 0` is the standard parity-check idiom, same as in C. [S1] + +## 📖 세부 내용 (Details) +- Door code check: `int doorCode = 1337; if (doorCode == 1337) { cout << "Correct code.\nThe door is now open.\n"; } else { cout << "Wrong code.\nThe door remains closed.\n"; }`. [S1] +- Positive/negative/zero: `int myNum = 10; if (myNum > 0) { cout << "The value is a positive number.\n"; } else if (myNum < 0) { cout << "The value is a negative number.\n"; } else { cout << "The value is 0.\n"; }`. [S1] +- Even/odd check: `int myNum = 5; if (myNum % 2 == 0) { cout << myNum << " is even.\n"; } else { cout << myNum << " is odd.\n"; }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +도어락 코드 확인, 숫자 부호 판별, 투표 연령, 짝/홀수 판별 등이 원문에서 직접 제시되며, 각각이 조건문 섹션 전체를 종합한 실전 활용 사례다. [S1] + +## 💻 코드 패턴 (Code patterns) +The standard parity-check idiom using the modulus operator (C++): +```cpp +int myNum = 5; +if (myNum % 2 == 0) { + cout << myNum << " is even.\n"; +} else { + cout << myNum << " is odd.\n"; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.82 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Conditions Nested]], [[CPP Operators Arithmetic]], [[CPP Switch]] +- **참조 맥락:** 조건문 섹션 마지막 — switch 문(Switch) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ If ... Else Examples — https://www.w3schools.com/cpp/cpp_conditions_reallife.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ If ... Else Examples" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Conditions_Shorthand.md b/10_Wiki/Dev/Topic_CPP/CPP_Conditions_Shorthand.md new file mode 100644 index 00000000..7cdd1f05 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Conditions_Shorthand.md @@ -0,0 +1,70 @@ +--- +id: cpp-conditions-shorthand +title: "C++ Short Hand If Else" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["ternary operator", "nested ternary", "C++ 삼항 연산자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "conditions", "ternary-operator"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_conditions_shorthand.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Short Hand If Else]] + +## 🎯 한 줄 통찰 (One-line insight) +Unlike C's equivalent chapter (which only replaces two `printf()` calls with a ternary), C++'s version goes one step further with NESTED ternaries — chaining `(time < 12) ? "Good morning." : (time < 18) ? "Good afternoon." : "Good evening.";` to handle THREE outcomes in one expression — while explicitly warning this makes code harder to read, showing C++'s string type enables a genuinely richer ternary use case (storing a computed STRING result) that C's more limited ternary (usually just printing directly) didn't showcase. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Ternary operator (`?:`)** — a shorthand if/else that RETURNS a value; syntax: `variable = (condition) ? expressionTrue : expressionFalse;`. [S1] +- **Storing the result in a `string` variable** — `string result = (time < 18) ? "Good day." : "Good evening.";` — leverages C++'s string type directly. [S1] +- **Using it inline inside `cout`** — `cout << ((time < 18) ? "Good day." : "Good evening.");` — no intermediate variable needed. [S1] +- **Nested ternary** — chaining multiple `?:` expressions to handle MORE than two outcomes, at the cost of readability. [S1] + +## 📖 세부 내용 (Details) +- Storing the ternary result in a string: `int time = 20; string result = (time < 18) ? "Good day." : "Good evening."; cout << result;`. [S1] +- Inline ternary directly inside cout: `cout << ((time < 18) ? "Good day." : "Good evening.");`. [S1] +- Nested ternary handling three outcomes: `int time = 22; string message = (time < 12) ? "Good morning." : (time < 18) ? "Good afternoon." : "Good evening."; cout << message;`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **중첩 삼항 연산자는 가독성 저하 경고와 함께 사용 가능**: 세 가지 이상의 결과를 하나의 삼항 표현식으로 처리할 수 있지만, 명확성을 위해 보통은 일반 if...else if...else 문을 쓰는 것이 낫다고 명시적으로 권고됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 짝수/홀수 판정 결과를 삼항 연산자로 문자열에 담는 연습문제가 실전 활용의 대표 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Nested ternary operators handling three possible outcomes (C++): +```cpp +int time = 22; +string message = (time < 12) ? "Good morning." + : (time < 18) ? "Good afternoon." + : "Good evening."; +cout << message; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Conditions ElseIf]], [[CPP Conditions Logical]], [[C Conditions Short Hand]] +- **참조 맥락:** 삼항 연산자 — 조건문 내 논리 연산자(Conditions Logical) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Short Hand If Else — https://www.w3schools.com/cpp/cpp_conditions_shorthand.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Short Hand If Else" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Constructors.md b/10_Wiki/Dev/Topic_CPP/CPP_Constructors.md new file mode 100644 index 00000000..35636790 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Constructors.md @@ -0,0 +1,80 @@ +--- +id: cpp-constructors +title: "C++ Constructors" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["constructor rules", "same name as class", "no return type", "C++ 생성자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "oop", "constructors"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_constructors.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Constructors]] + +## 🎯 한 줄 통찰 (One-line insight) +A constructor breaks TWO rules every other function in C++ follows — it has NO return type at all, "not even void," and its name must be IDENTICAL to the class name — meaning a constructor isn't really "a special kind of function" so much as a fundamentally different syntactic category that happens to look function-shaped, distinguished purely by the compiler recognizing the name-matches-class pattern. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Constructor** — a special method AUTOMATICALLY called when an object is created; runs with zero explicit invocation from the programmer. [S1] +- **Four constructor rules** — same name as the class; NO return type (not even `void`); usually declared `public`; automatically called on object creation. [S1] +- **Constructor with parameters** — sets initial attribute values at creation time (`Car(string x, string y, int z) { brand = x; ... }`), so each object starts pre-configured. [S1] +- **Defined outside the class** — same `::` scope resolution pattern as regular methods. [S1] + +## 📖 세부 내용 (Details) +- Basic parameterless constructor: `class MyClass { public: MyClass() { cout << "Hello World!"; } }; MyClass myObj; // triggers the constructor automatically`. [S1] +- Constructor with parameters setting initial attributes: `class Car { public: string brand; string model; int year; Car(string x, string y, int z) { brand = x; model = y; year = z; } }; Car carObj1("BMW", "X5", 1999);`. [S1] +- Defined outside the class via `::`: `Car(string x, string y, int z); // declaration Car::Car(string x, string y, int z) { brand = x; model = y; year = z; } // definition`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **생성자는 반환 타입이 전혀 없음**: void조차 쓰지 않는다는 점과 클래스 이름과 완전히 동일해야 한다는 점이 다른 모든 함수/메서드와 근본적으로 다른 두 가지 규칙으로 명시됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +피자 주문 비유("생성자는 소스·치즈·토핑을 미리 얹어주는 요리사")가 생성자가 객체 생성 시 자동으로 초기 설정을 마쳐준다는 개념을 직관적으로 설명하는 실전 비유로 원문에 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +A constructor with parameters setting initial attribute values automatically (C++): +```cpp +class Car { +public: + string brand; + string model; + int year; + Car(string x, string y, int z) { // Constructor with parameters + brand = x; + model = y; + year = z; + } +}; +int main() { + Car carObj1("BMW", "X5", 1999); // constructor runs automatically + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Class Methods]], [[CPP Constructors Overloading]], [[CPP Function Overloading]] +- **참조 맥락:** 생성자 — 생성자 오버로딩(Constructors Overloading) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Constructors — https://www.w3schools.com/cpp/cpp_constructors.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Constructors" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Constructors_Overloading.md b/10_Wiki/Dev/Topic_CPP/CPP_Constructors_Overloading.md new file mode 100644 index 00000000..132b2929 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Constructors_Overloading.md @@ -0,0 +1,81 @@ +--- +id: cpp-constructors-overloading +title: "C++ Constructor Overloading" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["multiple constructors", "default vs parameterized constructor", "C++ 생성자 오버로딩"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "oop", "constructors", "overloading"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_constructors_overloading.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Constructor Overloading]] + +## 🎯 한 줄 통찰 (One-line insight) +The exact same function-overloading rule from the Functions section applies directly to constructors — since a constructor IS a function (just an unusually-named one), having multiple constructors with different parameter counts/types is simply function overloading applied to the ONE function every class automatically calls at creation time, letting `Car car1;` (defaults) and `Car car2("BMW", "X5");` (custom values) coexist as calls to the SAME class's two constructors. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Constructor overloading** — having MORE THAN ONE constructor in a class, each differentiated by parameter count/type — the same rule as regular function overloading. [S1] +- **Default (no-argument) constructor + parameterized constructor coexisting** — one constructor sets fallback/default values, another accepts custom values; the compiler picks based on how the object is created. [S1] +- **Why use it** — flexibility when creating objects, setting default OR custom values, reducing repetitive code. [S1] + +## 📖 세부 내용 (Details) +- Two coexisting constructors — no-arg (defaults) and 2-arg (custom): `class Car { public: string brand; string model; Car() { brand = "Unknown"; model = "Unknown"; } Car(string b, string m) { brand = b; model = m; } };`. [S1] +- Calling both forms in the same program: `Car car1; // uses defaults: "Unknown" "Unknown" Car car2("BMW", "X5"); // uses custom values`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). Function Overloading 챕터의 원리가 생성자에도 그대로 적용됨이 확인됨. + +## 🛠️ 적용 사례 (Applied in summary) +브랜드/모델을 지정하지 않으면 "Unknown"으로, 지정하면 그 값으로 초기화되는 Car 클래스 예제가 기본값과 커스텀 값을 모두 지원하는 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Two overloaded constructors — one providing defaults, one accepting custom values (C++): +```cpp +class Car { +public: + string brand; + string model; + Car() { // no-argument constructor: defaults + brand = "Unknown"; + model = "Unknown"; + } + Car(string b, string m) { // parameterized constructor: custom + brand = b; + model = m; + } +}; +int main() { + Car car1; // "Unknown" "Unknown" + Car car2("BMW", "X5"); // "BMW" "X5" + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Constructors]], [[CPP Access Specifiers]], [[CPP Function Overloading]] +- **참조 맥락:** 생성자 섹션 마지막 — 접근 지정자 및 캡슐화(Access Specifiers & Encapsulation) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Constructor Overloading — https://www.w3schools.com/cpp/cpp_constructors_overloading.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Constructor Overloading" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Data_Structures.md b/10_Wiki/Dev/Topic_CPP/CPP_Data_Structures.md new file mode 100644 index 00000000..385a6447 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Data_Structures.md @@ -0,0 +1,78 @@ +--- +id: cpp-data-structures +title: "C++ Data Structures and STL" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["STL", "Standard Template Library", "C++ 자료구조"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "stl", "data-structures"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_data_structures.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Data Structures]] + +## 🎯 한 줄 통찰 (One-line insight) +C has exactly ONE built-in data structure — the array — and everything else (linked lists, stacks, queues, hash-like maps) must be hand-built from structs and raw pointers; C++'s STL instead ships vector/list/stack/queue/deque/set/map as ready-made template classes, meaning the entire "how do I build a linked list" problem that consumed a whole chapter of Topic_C's Pointers section is simply gone from the C++ mental model — replaced by "which header do I include." [S1] + +## 🧠 핵심 개념 (Core concepts) +- **STL (Standard Template Library)** — a library of data structures + algorithms bundled with C++, used to store and manipulate data efficiently. [S1] +- **Containers** — data structures that store data (vector, list, stack, queue, deque, set, map). [S1] +- **Iterators** — objects used to access elements of a container without knowing its internal layout. [S1] +- **Algorithms** — functions like `sort()` and `find()` that operate on containers through iterators. [S1] +- **One header per container** — each container requires its own `#include` (``, ``, ``, ``, ``, ``), unlike arrays which need no header. [S1] +- **Choosing a container is a design decision** — the right data structure + algorithm makes a program run faster, especially at scale; the table of 7 containers (Vector/List/Stack/Queue/Deque/Set/Map) each optimize a different access pattern. [S1] + +## 📖 세부 내용 (Details) +- Container comparison table: Vector (array-like, dynamic size, index access), List (sequential, add/remove both ends, no index access), Stack (LIFO, top only), Queue (FIFO, front/back only), Deque (double-ended, index access), Set (unique elements, no index), Map (key/value pairs, access by key). [S1] +- Minimal vector usage: `vector cars = {"Volvo", "BMW", "Ford", "Mazda"}; for (string car : cars) { cout << car << "\n"; }`. [S1] +- Containers + iterators + algorithms form a triangle: a container without an algorithm to search/manipulate it is not very useful, and an algorithm needs a container to operate on. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C에는 없는 개념 층위가 통째로 추가됨**: Topic_C에는 "자료구조 챕터"가 존재하지 않았고(배열이 유일한 내장 자료구조), 연결 리스트/스택/큐는 포인터+구조체로 직접 구현하는 예제들이 Pointers 섹션에 흩어져 있었다. C++는 이를 컨테이너+반복자+알고리즘이라는 3층 구조로 라이브러리화했다는 점이 이번 챕터에서 명확히 드러남. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 문자열 vector를 만들고 for-each로 순회하는 패턴이 원문에서 STL 소개 예제로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Required headers per container, and a first vector example (C++): +```cpp +#include +#include +#include +#include +#include +#include + +vector cars = {"Volvo", "BMW", "Ford", "Mazda"}; +for (string car : cars) { + cout << car << "\n"; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Vectors]], [[CPP List]], [[CPP Stacks]], [[CPP Queues]], [[CPP Arrays]] +- **참조 맥락:** 데이터 구조(STL) 섹션의 도입 챕터 — Vectors로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Data Structures and STL — https://www.w3schools.com/cpp/cpp_data_structures.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Data Structures and STL" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Data_Types.md b/10_Wiki/Dev/Topic_CPP/CPP_Data_Types.md new file mode 100644 index 00000000..dcac2f15 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Data_Types.md @@ -0,0 +1,67 @@ +--- +id: cpp-data-types +title: "C++ Data Types" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["basic data types table", "C++ 데이터 타입"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "data-types"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_data_types.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Data Types]] + +## 🎯 한 줄 통찰 (One-line insight) +C++ elevates `bool` and `string` to genuine BASIC types listed right alongside `int`/`char`/`float`/`double` — a stark contrast to C, where `bool` required a separate `` include (added only in C99) and there was no `string` type at all (just `char` arrays) — meaning C++'s type system, despite near-identical syntax to C, treats booleans and text as first-class citizens from the very first data-types lesson. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Six basic types** — `bool` (1 byte, true/false), `char` (1 byte, single character/ASCII), `int` (2 or 4 bytes, whole numbers), `float` (4 bytes, ~6-7 decimal digit precision), `double` (8 bytes, ~15 decimal digit precision), and `string` (text, covered separately). [S1] +- **No format specifier needed for any type** — unlike C, `cout <<` prints any of these types directly without a matching `%d`/`%f`/`%c` specifier. [S1] + +## 📖 세부 내용 (Details) +- All six basic types declared together: `int myNum = 5; float myFloatNum = 5.99; double myDoubleNum = 9.98; char myLetter = 'D'; bool myBoolean = true; string myText = "Hello";`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **bool과 string이 C++에서는 기본 타입급으로 취급됨**: C에서는 bool이 C99 이후 를 포함해야 했고 string은 아예 없었지만(char 배열만 존재), C++에서는 이 데이터 타입 챕터부터 bool과 string이 int/char/float/double과 나란히 기본 타입으로 소개된다는 점이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 6개 기본 타입을 한 번에 선언하는 예제가 이후 각 타입별 상세 챕터의 로드맵 역할을 한다. [S1] + +## 💻 코드 패턴 (Code patterns) +The six basic C++ data types declared together, with no format specifiers needed for printing: +```cpp +int myNum = 5; // Integer (whole number) +float myFloatNum = 5.99; // Floating point number +double myDoubleNum = 9.98; // Floating point number +char myLetter = 'D'; // Character +bool myBoolean = true; // Boolean +string myText = "Hello"; // String +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Variables RealLife]], [[CPP Data Types Numeric]], [[C Data Types]] +- **참조 맥락:** 데이터 타입 섹션 첫 챕터 — 숫자형 타입(Data Types Numeric) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Data Types — https://www.w3schools.com/cpp/cpp_data_types.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Data Types" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Data_Types_Bool.md b/10_Wiki/Dev/Topic_CPP/CPP_Data_Types_Bool.md new file mode 100644 index 00000000..38efacca --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Data_Types_Bool.md @@ -0,0 +1,66 @@ +--- +id: cpp-data-types-bool +title: "C++ Boolean Data Types" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["bool keyword", "C++ 불리언 타입"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "data-types", "bool"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_data_types_bool.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Boolean Data Types]] + +## 🎯 한 줄 통찰 (One-line insight) +`bool` needs no special header include in C++ — it's a native keyword usable immediately — a direct contrast to C, where the equivalent chapter required explicitly including `` (a C99 addition) before `bool` could be used at all, reinforcing the Data Types chapter's observation that C++ treats booleans as first-class from the start. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`bool`** — a native C++ keyword (no header needed); represents `true` or `false`. [S1] +- **Underlying integer representation when printed** — `cout << boolVar;` shows `1` for true, `0` for false, same convention as C. [S1] +- **Primary use** — conditional testing (covered in a later chapter). [S1] + +## 📖 세부 내용 (Details) +- Declaring and printing booleans: `bool isCodingFun = true; bool isFishTasty = false; cout << isCodingFun; // 1 cout << isFishTasty; // 0`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **bool 사용에 별도 헤더가 필요 없음**: C에서는 를 반드시 포함해야 bool을 쓸 수 있었지만, C++에서는 그런 요구사항이 언급되지 않아 네이티브 키워드로 즉시 사용 가능함이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 불리언 값이 조건 테스트에 주로 쓰인다는 점이 이후 조건문(Conditions) 섹션의 기초가 된다. [S1] + +## 💻 코드 패턴 (Code patterns) +Boolean values printing as their underlying integer representation (C++): +```cpp +bool isCodingFun = true; +bool isFishTasty = false; +cout << isCodingFun; // Outputs 1 (true) +cout << isFishTasty; // Outputs 0 (false) +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Data Types Numeric]], [[CPP Data Types Char]], [[C Booleans]] +- **참조 맥락:** 불리언 타입 — 문자 타입(Data Types Char) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Boolean Data Types — https://www.w3schools.com/cpp/cpp_data_types_bool.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Boolean Data Types" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Data_Types_Char.md b/10_Wiki/Dev/Topic_CPP/CPP_Data_Types_Char.md new file mode 100644 index 00000000..85267cae --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Data_Types_Char.md @@ -0,0 +1,67 @@ +--- +id: cpp-data-types-char +title: "C++ Character Data Types" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["char type", "ASCII values", "C++ 문자 타입"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "data-types", "char", "ascii"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_data_types_char.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Character Data Types]] + +## 🎯 한 줄 통찰 (One-line insight) +C++'s `char` chapter drops the elaborate silent-truncation warning that C's equivalent chapter emphasized (assigning multiple characters like `'Hello'` to a `char` variable and having it silently keep only the last one) — likely because C++ has a genuine `string` type as the obvious alternative for multi-character text from the very same Data Types chapter, making the C-style char/string confusion a less central pitfall to warn about. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`char`** — stores exactly one character, written in single quotes (`'B'`). [S1] +- **ASCII value assignment** — `char` variables can be assigned numeric ASCII codes directly (no quotes) and still print as the corresponding character. [S1] +- **No format specifier needed** — `cout << myGrade;` prints the character directly. [S1] + +## 📖 세부 내용 (Details) +- Basic char: `char myGrade = 'B'; cout << myGrade;`. [S1] +- ASCII numeric assignment: `char a = 65, b = 66, c = 67; cout << a; cout << b; cout << c;` — prints A, B, C. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — ASCII 코드값(65,66,67)을 직접 char에 대입해 A/B/C를 출력하는 패턴이 C 챕터와 동일하게 문자와 숫자 표현의 관계를 보여준다. [S1] + +## 💻 코드 패턴 (Code patterns) +Assigning ASCII numeric codes directly to char variables (C++): +```cpp +char a = 65, b = 66, c = 67; +cout << a; // A +cout << b; // B +cout << c; // C +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Data Types Bool]], [[CPP Data Types String]], [[C Data Types Characters]] +- **참조 맥락:** 문자 타입 — 문자열 타입(Data Types String) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Character Data Types — https://www.w3schools.com/cpp/cpp_data_types_char.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Character Data Types" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Data_Types_Numeric.md b/10_Wiki/Dev/Topic_CPP/CPP_Data_Types_Numeric.md new file mode 100644 index 00000000..77bf0a61 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Data_Types_Numeric.md @@ -0,0 +1,69 @@ +--- +id: cpp-data-types-numeric +title: "C++ Numeric Data Types" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["float vs double", "scientific notation", "C++ 숫자 타입"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "data-types", "numbers"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_data_types_numeric.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Numeric Data Types]] + +## 🎯 한 줄 통찰 (One-line insight) +The exact same precision tradeoff from C reappears unchanged — `float` holds only 6-7 decimal digits while `double` holds ~15, and the source again recommends `double` as the SAFER default for most calculations — confirming C++'s floating-point model (and its associated precision caveats) is inherited directly from C, not redesigned. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`int`** — whole numbers without decimals. [S1] +- **`float`** — decimal numbers, ~6-7 significant digits, 4 bytes. [S1] +- **`double`** — decimal numbers, ~15 significant digits, 8 bytes; recommended default for most calculations. [S1] +- **Scientific notation** — `e`/`E` means "times 10 to the power of" (e.g. `35e3` = 35000), same syntax as C. [S1] +- **No format specifier for printing** — `cout << myNum;` works identically for `int`, `float`, or `double`, unlike C's type-matched `%d`/`%f`/`%lf`. [S1] + +## 📖 세부 내용 (Details) +- Basic declarations printed with plain `cout <<` (no type-specific specifier): `int myNum = 1000; cout << myNum;`, `float myNum = 5.75; cout << myNum;`, `double myNum = 19.99; cout << myNum;`. [S1] +- Scientific notation: `float f1 = 35e3; double d1 = 12E4; cout << f1; cout << d1;`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **double을 기본으로 권장하는 것도 C와 동일**: float가 메모리를 절반만 쓰지만 대부분의 계산에는 정밀도가 더 높은 double을 쓰는 것이 더 안전하다는 조언이 C 챕터와 그대로 반복됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 과학적 표기법(35e3)으로 큰 수를 짧게 표현하는 패턴이 C 챕터와 동일하게 실전 활용된다. [S1] + +## 💻 코드 패턴 (Code patterns) +Printing float/double/int values directly with cout, no format specifier needed (C++): +```cpp +float f1 = 35e3; // 35 * 10^3 = 35000 +double d1 = 12E4; // 12 * 10^4 = 120000 +cout << f1; +cout << d1; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Data Types]], [[CPP Data Types Bool]], [[C Data Types Numbers]] +- **참조 맥락:** 숫자 타입 — 불리언 타입(Data Types Bool) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Numeric Data Types — https://www.w3schools.com/cpp/cpp_data_types_numeric.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Numeric Data Types" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Data_Types_RealLife.md b/10_Wiki/Dev/Topic_CPP/CPP_Data_Types_RealLife.md new file mode 100644 index 00000000..88557c29 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Data_Types_RealLife.md @@ -0,0 +1,64 @@ +--- +id: cpp-data-types-reallife +title: "C++ Data Types Examples" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["real-life data types", "total cost calculation", "C++ 데이터 타입 실전 예제"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.82 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "data-types", "real-life-example"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_data_types_reallife.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Data Types Examples]] + +## 🎯 한 줄 통찰 (One-line insight) +This example prints the currency symbol by chaining a `char` directly onto a `double` in the SAME `cout` statement (`cout << total_cost << currency;`) with no separator or format specifier needed — a direct showcase of the earlier Variables chapter's insight that `<<` chaining eliminates C's type-matching requirement, applied here to mix a monetary amount and its currency symbol seamlessly. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Mixed-type arithmetic** — multiplying an `int` (`items`) by a `double` (`cost_per_item`) and storing the result in a `double` (`total_cost`). [S1] +- **Chaining different types in one cout statement** — combining a `double` and a `char` (currency symbol) directly via `<<`, no casting or format specifier needed. [S1] + +## 📖 세부 내용 (Details) +- Full calculation and display: `int items = 50; double cost_per_item = 9.99; double total_cost = items * cost_per_item; char currency = '$'; cout << "Number of items: " << items << "\n"; cout << "Cost per item: " << cost_per_item << currency << "\n"; cout << "Total cost = " << total_cost << currency << "\n";`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +수량(int)×단가(double)로 총 비용을 계산하고 통화 기호(char)를 같은 cout 문에 이어붙이는 이 예제 자체가 영수증/가격 계산 UI의 실전 활용 사례다. [S1] + +## 💻 코드 패턴 (Code patterns) +Chaining a double and a char (currency symbol) in the same cout statement with no casting (C++): +```cpp +double total_cost = 50 * 9.99; +char currency = '$'; +cout << "Total cost = " << total_cost << currency << "\n"; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.82 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Data Types String]], [[CPP Operators]] +- **참조 맥락:** 데이터 타입 섹션 마지막 — 연산자(Operators) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Data Types Examples — https://www.w3schools.com/cpp/cpp_data_types_reallife.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Data Types Examples" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Data_Types_String.md b/10_Wiki/Dev/Topic_CPP/CPP_Data_Types_String.md new file mode 100644 index 00000000..e9f973b2 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Data_Types_String.md @@ -0,0 +1,65 @@ +--- +id: cpp-data-types-string +title: "C++ String Data Types" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["string library", "not built-in type", "C++ 문자열 타입"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "data-types", "string"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_data_types_string.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP String Data Types]] + +## 🎯 한 줄 통찰 (One-line insight) +`string` is explicitly called out as "NOT a built-in type" despite behaving like one in basic usage — it requires including the `` header before it can be used at all, meaning C++'s convenient string handling (versus C's raw `char` arrays) is a LIBRARY feature layered on top of the language, not a core language primitive like `int` or `char` are. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`string`** — stores a sequence of characters (text); values surrounded by double quotes. [S1] +- **Not a built-in type** — requires `#include ` before use, unlike `int`/`char`/`bool`/`float`/`double` which need no such include. [S1] +- **"Behaves like" a built-in type** — in basic usage (declaration, assignment, printing), `string` feels indistinguishable from a native type despite technically being library-provided. [S1] + +## 📖 세부 내용 (Details) +- Basic string declaration and printing (requires the header): `#include string greeting = "Hello"; cout << greeting;`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **string은 내장 타입이 아님**: int/char/bool 등과 나란히 소개되지만, 실제로는 헤더를 포함해야 사용 가능한 라이브러리 제공 타입이라는 점이 명시적으로 구분됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 헤더 포함이 문자열을 다루는 모든 C++ 프로그램의 실전 필수 전제 조건이다. [S1] + +## 💻 코드 패턴 (Code patterns) +Using the string type, which requires including the header (C++): +```cpp +#include +string greeting = "Hello"; +cout << greeting; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Data Types Char]], [[CPP Data Types RealLife]], [[CPP Strings]] +- **참조 맥락:** 문자열 타입 — 데이터 타입 실전 예제(Data Types RealLife) 챕터로 이어짐, 문자열(Strings) 섹션과 직접 연결. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ String Data Types — https://www.w3schools.com/cpp/cpp_data_types_string.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ String Data Types" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Date.md b/10_Wiki/Dev/Topic_CPP/CPP_Date.md new file mode 100644 index 00000000..24f8ea3e --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Date.md @@ -0,0 +1,77 @@ +--- +id: cpp-date +title: "C++ Date and Time" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["ctime library", "mktime", "strftime", "clock() timing", "C++ 날짜와 시간"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "date-time", "ctime"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_date.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Date and Time]] + +## 🎯 한 줄 통찰 (One-line insight) +`mktime()` isn't just for CONVERTING a manually-built date into a timestamp — the source shows it also SELF-CORRECTS invalid dates (setting day-of-month to 32 and calling `mktime()` normalizes it into a valid date, unlike `asctime()` which just displays "32" verbatim without correcting it) and FILLS IN derived fields like the weekday (`tm_wday`) automatically, meaning `mktime()` does double duty as both a converter and a date-validator/completer that the more display-focused functions (`ctime()`, `asctime()`) don't provide. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Two date representations** — `time_t` (a single-number timestamp, easy for calculation) vs. `struct tm` (a structure with separate `tm_sec`/`tm_min`/`tm_hour`/`tm_mday`/`tm_mon`/`tm_year`/`tm_wday`/`tm_yday` fields, easier for humans to specify). [S1] +- **Offset conventions to remember** — hours are 24-hour format; months are 0-11 (December = 11, not 12); years are relative to 1900 (2024 = 124). [S1] +- **`mktime()`** — converts a `struct tm` INTO a `time_t` timestamp; ALSO fills in `tm_wday`/`tm_yday` automatically and CORRECTS invalid date values (e.g. day 32 gets normalized). [S1] +- **`localtime()` / `gmtime()`** — convert a timestamp INTO a `struct tm`, in local time zone or GMT respectively; return a POINTER, so dereference to get a stable copy if needed. [S1] +- **`ctime()` / `asctime()`** — display a date as a fixed-format string (from a timestamp or a `struct tm` respectively); `asctime()` does NOT correct invalid dates, unlike `mktime()`. [S1] +- **`strftime()`** — formats a date into a CUSTOM string layout using format specifiers (`%B`, `%H`, `%Y`, etc.), writing into a caller-provided `char` buffer. [S1] +- **`difftime()`** — measures SECONDS between two timestamps, for date-level time differences. [S1] +- **`clock()`** — measures short program-execution intervals in "clocks" (via `clock_t`), converted to seconds by dividing by `CLOCKS_PER_SEC`; more precise than `difftime()` for measuring runtime performance. [S1] + +## 📖 세부 내용 (Details) +- `mktime()` correcting an invalid date before display: `struct tm datetime; datetime.tm_mday = 32; /* other fields set */ mktime(&datetime); cout << asctime(&datetime); // normalized to a valid date`. [S1] +- Formatting a date multiple ways with `strftime()`: `strftime(output, 50, "%B %e, %Y", &datetime); // "December 17, 2023" strftime(output, 50, "%I:%M:%S %p", &datetime); // "12:30:01 PM"`. [S1] +- Measuring execution time precisely with `clock()`: `clock_t before = clock(); /* work */ clock_t duration = clock() - before; cout << (float)duration / CLOCKS_PER_SEC << " seconds";` — casting to `float` BEFORE dividing avoids integer-division truncation. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **mktime()는 변환뿐 아니라 날짜 보정과 요일 계산까지 수행**: 32일처럼 잘못된 날짜 값을 정규화하고 tm_wday/tm_yday를 자동으로 채워준다는 점이 단순 표시 함수인 asctime()/ctime()과의 핵심 차이로 확인됨. [S1] +- **clock() 나눗셈 시 정수 나눗셈 주의**: CLOCKS_PER_SEC로 나누기 전에 float/double로 캐스팅하지 않으면 정수 나눗셈으로 소수점이 잘려나간다는 점이 명시적으로 경고됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +100,000번 반복 루프의 실행 시간을 clock()으로 측정하는 예제가 프로그램 성능 측정의 실전 활용 사례로 원문에 직접 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Measuring program execution time precisely with clock(), casting before dividing (C++): +```cpp +clock_t before = clock(); +int k = 0; +for (int i = 0; i < 100000; i++) { + k += i; +} +clock_t duration = clock() - before; +cout << "Duration: " << (float)duration / CLOCKS_PER_SEC << " seconds"; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP User Input]], [[CPP Pointers Dereference]], [[CPP Errors]] +- **참조 맥락:** 사용자 입력 및 날짜 섹션 마지막 — 에러 및 디버깅(Errors & Debugging) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Date and Time — https://www.w3schools.com/cpp/cpp_date.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Date and Time" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Debugging.md b/10_Wiki/Dev/Topic_CPP/CPP_Debugging.md new file mode 100644 index 00000000..4abaf81e --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Debugging.md @@ -0,0 +1,70 @@ +--- +id: cpp-debugging +title: "C++ Debugging" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["print debugging", "breakpoints", "debugging vs exception handling", "C++ 디버깅"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "debugging"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_debugging.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Debugging]] + +## 🎯 한 줄 통찰 (One-line insight) +The closing distinction ("debugging is about finding/fixing errors DURING DEVELOPMENT; exception handling is dealing with errors WHILE THE PROGRAM RUNS") is IDENTICAL to C's Debugging chapter's conclusion — except in C++, "exception handling" now refers to a REAL language feature (`try`/`catch`) rather than C's manual NULL-checking workarounds, meaning the conceptual division between the two development-vs-runtime phases stays the same across languages, but the runtime-side tool it points to is genuinely more powerful in C++. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Print debugging** — using `cout` to trace how far execution gets before something goes wrong. [S1] +- **Checking variable values** — printing intermediate results to catch LOGIC errors, not just crashes. [S1] +- **IDE debuggers** — breakpoints, line-by-line stepping, variable-watching; recommended as a step up once comfortable with print debugging. [S1] +- **Reading error messages literally** — the compiler states exactly what's wrong and where. [S1] +- **Debugging vs. exception handling** — debugging finds/fixes mistakes DURING DEVELOPMENT; exception handling responds to problems WHILE THE PROGRAM RUNS — the same C-established distinction, but now backed by C++'s real try/catch mechanism instead of C's manual workarounds. [S1] + +## 📖 세부 내용 (Details) +- Print debugging locating a crash point: `cout << "Before division\n"; int z = x / y; // crashes cout << "After division\n"; // never runs`. [S1] +- Logic-error detection via variable printing: `int result = x - y; cout << "Result: " << result << "\n"; // expected 15, got 5 — wrong operator used`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **디버깅과 예외 처리의 구분은 C와 동일하지만 예외 처리 자체는 더 강력함**: 개발 중 디버깅 vs 실행 중 에러 대응이라는 구분은 C와 같지만, C++에서는 그 "실행 중 대응" 수단이 진짜 언어 차원의 try/catch라는 점이 C의 수동적 우회책과 대비됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — cout으로 코드 실행 지점을 추적해 크래시 위치를 찾는 print debugging이 실전에서 가장 먼저 시도하는 디버깅 기법으로 권장됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Print debugging to locate exactly where a program crashes (C++): +```cpp +int x = 10; +int y = 0; +cout << "Before division\n"; // Debug output +int z = x / y; // Crashes! +cout << "After division\n"; // Never runs — crash located +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Input Validation]], [[CPP Exceptions]], [[CPP Files]] +- **참조 맥락:** 에러 및 디버깅 섹션 마지막 — 파일 입출력(Files) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Debugging — https://www.w3schools.com/cpp/cpp_debugging.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Debugging" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Deque.md b/10_Wiki/Dev/Topic_CPP/CPP_Deque.md new file mode 100644 index 00000000..ed6d7280 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Deque.md @@ -0,0 +1,80 @@ +--- +id: cpp-deque +title: "C++ Deque" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["std::deque", "double-ended queue C++", "C++ 데크"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "stl", "deque"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_deque.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Deque]] + +## 🎯 한 줄 통찰 (One-line insight) +`deque` is what queue "should have been" if index access mattered — it takes queue's both-ends-conceptual-flexibility one step further by ALSO allowing `[]`/`.at()` indexing like vector, meaning deque is effectively "vector + list's both-ends growth combined," and its existence exposes that the earlier stack/queue restrictions (no brace-init, single/dual access points) were deliberate design trade-offs rather than technical limitations of the "add/remove from ends" idea itself. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Deque = double-ended queue** — unlike a plain queue (front removal, back insertion only), a deque allows adding AND removing from BOTH ends. [S1] +- **Index access restored** — unlike stack/queue/list, a deque supports `[]` and `.at()` just like vector, combining both-ends flexibility with random access. [S1] +- **Brace-initialization allowed** — unlike stack/queue, `deque cars = {"Volvo", "BMW", "Ford", "Mazda"};` works directly, matching vector/list syntax. [S1] +- **`.push_front()` / `.push_back()`, `.pop_front()` / `.pop_back()`** — identical method names to `list`, giving deque list's symmetric growth PLUS vector's indexing. [S1] +- **`.front()` / `.back()`, `.size()` / `.empty()`** — same as every other sequence container covered so far. [S1] +- **Looping** — both indexed `for` + `.size()` and for-each work, exactly like vector (unlike list, which only supports for-each). [S1] + +## 📖 세부 내용 (Details) +- Access: `cars[0]`, `cars.front()`, `cars.back()`, `cars.at(1)` — same safety trade-off as vector (`.at()` throws on out-of-range, `[]` does not). [S1] +- Add/remove at both ends: `cars.push_front("Tesla"); cars.push_back("VW"); cars.pop_front(); cars.pop_back();`. [S1] +- Both loop styles supported: indexed `for (int i = 0; i < cars.size(); i++)` AND for-each `for (string car : cars)`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **stack/queue의 제약이 deque에는 적용되지 않음**: stack과 queue는 선언 시 중괄호 초기화가 불가능했지만, deque는 vector/list와 동일하게 `= {...}`로 즉시 초기화가 가능하다는 점이 이번 챕터에서 확인됨 — 앞서의 제약이 "양 끝 삽입/삭제 컨테이너의 본질"이 아니라 설계 선택이었음을 보여줌. [S1] +- **인덱스 접근과 양쪽 끝 성장이 동시에 가능해짐**: list는 양쪽 끝 성장은 가능했지만 인덱스 접근이 불가능했고, queue/stack은 인덱스 접근도 양쪽 끝 임의 접근도 안 됐지만, deque는 이 둘을 모두 갖춘 컨테이너로 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 자동차 이름 deque에 인덱스 접근, 양 끝 push/pop, 순회를 모두 적용하는 예제가 원문에서 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Deque combines vector's indexing with list's both-ends growth (C++): +```cpp +#include +deque cars = {"Volvo", "BMW", "Ford", "Mazda"}; + +cout << cars[0]; // indexed access, like vector +cars.push_front("Tesla"); // both-ends growth, like list +cars.push_back("VW"); +cars.pop_front(); +cars.pop_back(); + +for (int i = 0; i < cars.size(); i++) { // indexed loop works too + cout << cars[i] << "\n"; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Queues]], [[CPP Vectors]], [[CPP List]], [[CPP Sets]] +- **참조 맥락:** 데이터 구조(STL) 섹션 — Sets 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Deque — https://www.w3schools.com/cpp/cpp_deque.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Deque" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Do_While_Loop.md b/10_Wiki/Dev/Topic_CPP/CPP_Do_While_Loop.md new file mode 100644 index 00000000..85afde96 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Do_While_Loop.md @@ -0,0 +1,71 @@ +--- +id: cpp-do-while-loop +title: "C++ Do/While Loop" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["do while", "at-least-once loop", "C++ do-while 반복문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "loops", "do-while"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_do_while_loop.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Do/While Loop]] + +## 🎯 한 줄 통찰 (One-line insight) +This chapter explicitly flags something C's equivalent never called out as its own note: "the semicolon after the while condition is required!" — a small but real syntax trap, since `do {...} while(condition)` LOOKS like it should end like a regular `while` loop (no trailing semicolon), but the `do/while` FORM specifically requires one, unlike every other loop and conditional block in C++. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`do { ... } while (condition);`** — executes the block ONCE unconditionally, then checks the condition. [S1] +- **Required trailing semicolon** — unlike `while(...) {...}` or `if(...) {...}`, the `do/while` form's closing `while(condition)` MUST end with a semicolon. [S1] +- **Guaranteed first execution** — runs at least once even if the condition is false immediately. [S1] +- **Input-validation pattern** — repeatedly prompting via `cin >>` until the loop condition fails. [S1] + +## 📖 세부 내용 (Details) +- Standard case with the required semicolon: `int i = 0; do { cout << i << "\n"; i++; } while (i < 5);`. [S1] +- Guaranteed-once case (condition false at start): `int i = 10; do { cout << "i is " << i << "\n"; i++; } while (i < 5);` — still prints once. [S1] +- Practical input-validation loop: `int number; do { cout << "Enter a positive number: "; cin >> number; } while (number > 0);`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **do/while 뒤에는 반드시 세미콜론 필요**: while(condition) 뒤에 세미콜론을 빠뜨리기 쉬운 문법적 함정이 있다는 점이 C 챕터에는 없던 별도 주의사항으로 명시됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +사용자로부터 양수를 입력받되 0이나 음수가 입력될 때까지 반복해서 물어보는 입력 검증 루프가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +The required trailing semicolon after a do/while loop's condition (C++): +```cpp +int i = 0; +do { + cout << i << "\n"; + i++; +} +while (i < 5); // semicolon required here +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP While Loop RealLife]], [[CPP For Loop]], [[C Do While Loop]] +- **참조 맥락:** while 루프의 변형 — for 루프(For Loop) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Do/While Loop — https://www.w3schools.com/cpp/cpp_do_while_loop.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Do/While Loop" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Encapsulation.md b/10_Wiki/Dev/Topic_CPP/CPP_Encapsulation.md new file mode 100644 index 00000000..ae543056 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Encapsulation.md @@ -0,0 +1,77 @@ +--- +id: cpp-encapsulation +title: "C++ Encapsulation" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["getter setter", "private attribute access", "C++ 캡슐화"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "oop", "encapsulation"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_encapsulation.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Encapsulation]] + +## 🎯 한 줄 통찰 (One-line insight) +Encapsulation is the concrete APPLICATION of the previous chapter's abstract advice — "declare attributes private as often as you can" becomes actionable once you pair each `private` attribute with a `public` getter/setter method, meaning encapsulation isn't a separate new technique so much as the standard PATTERN for actually using `private` without making the data completely unreachable. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Encapsulation** — hiding "sensitive" data by declaring class attributes `private`, then providing `public` GET and SET methods for controlled access. [S1] +- **Setter method** — a public method that ASSIGNS a value to a private attribute (`void setSalary(int s) { salary = s; }`). [S1] +- **Getter method** — a public method that RETURNS a private attribute's value (`int getSalary() { return salary; }`). [S1] +- **Real-life analogy** — an employee's salary is private (they can't change it directly); only the manager (a trusted method) can update or share it. [S1] +- **Why encapsulate** — better control of data (change one part without affecting others), increased data security. [S1] + +## 📖 세부 내용 (Details) +- A private attribute accessed exclusively through a getter/setter pair: `class Employee { private: int salary; public: void setSalary(int s) { salary = s; } int getSalary() { return salary; } }; Employee myObj; myObj.setSalary(50000); cout << myObj.getSalary();`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +직원의 급여(salary)를 private으로 숨기고 setSalary()/getSalary()로만 접근하도록 하는 Employee 클래스 예제가 캡슐화의 대표 실전 활용 사례로 원문에 직접 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +A private attribute accessed only through public getter/setter methods (C++): +```cpp +class Employee { +private: + int salary; // hidden +public: + void setSalary(int s) { salary = s; } + int getSalary() { return salary; } +}; +int main() { + Employee myObj; + myObj.setSalary(50000); + cout << myObj.getSalary(); + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Access Specifiers]], [[CPP Inheritance]] +- **참조 맥락:** 접근 지정자 및 캡슐화 섹션 마지막 — 상속(Inheritance) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Encapsulation — https://www.w3schools.com/cpp/cpp_encapsulation.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Encapsulation" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Enum.md b/10_Wiki/Dev/Topic_CPP/CPP_Enum.md new file mode 100644 index 00000000..07e108d0 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Enum.md @@ -0,0 +1,71 @@ +--- +id: cpp-enum +title: "C++ Enumeration (enum)" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["enum keyword", "named constants", "C++ 열거형"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "enums"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_enum.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Enumeration (enum)]] + +## 🎯 한 줄 통찰 (One-line insight) +This chapter is essentially IDENTICAL to C's enum chapter in every detail — default zero-based numbering, forward-cascading custom values, and enum-in-switch usage all reappear with the exact same `Level`/`LOW`/`MEDIUM`/`HIGH` example — the only visible change is `cout <<` replacing `printf("%d", ...)`, confirming C++ inherited its enum semantics from C completely unmodified (unlike structs, where C++ added meaningful new behavior). [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`enum`** — a type representing a group of named, unchangeable constants. [S1] +- **Default numbering** — first item is 0, second is 1, etc. [S1] +- **Forward-cascading custom values** — setting one item's value shifts all subsequent unlabeled items to continue counting up from it. [S1] +- **Enum as an int under the hood** — printing an enum variable with `cout <<` shows its underlying integer value, enabling direct use in `switch` statements. [S1] + +## 📖 세부 내용 (Details) +- Default numbering: `enum Level { LOW, MEDIUM, HIGH }; enum Level myVar = MEDIUM; cout << myVar; // 1`. [S1] +- Fully custom values: `enum Level { LOW = 25, MEDIUM = 50, HIGH = 75 };`. [S1] +- Cascading from one custom value: `enum Level { LOW = 5, MEDIUM, HIGH };` — MEDIUM becomes 6, HIGH becomes 7. [S1] +- Enum used in a switch: `enum Level myVar = MEDIUM; switch (myVar) { case 1: ... case 2: ... case 3: ... }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). C 챕터와 완전히 동일한 열거형 동작(기본 번호 매기기, 연쇄적 값 갱신, switch 연동)이 확인됨. + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 요일이나 월과 같이 절대 변하지 않는 값 집합에 enum을 사용하는 것이 실전 활용의 대표 사례로 원문에 직접 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Setting one enum value causes subsequent items to cascade forward from it (C++): +```cpp +enum Level { + LOW = 5, + MEDIUM, // Now 6 + HIGH // Now 7 +}; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Structs]], [[CPP Switch]], [[CPP References]], [[C Enums]] +- **참조 맥락:** 구조체 및 열거형 섹션 마지막 — 참조·포인터·메모리(References, Pointers & Memory) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Enumeration (enum) — https://www.w3schools.com/cpp/cpp_enum.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Enumeration (enum)" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Errors.md b/10_Wiki/Dev/Topic_CPP/CPP_Errors.md new file mode 100644 index 00000000..6684cbb9 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Errors.md @@ -0,0 +1,67 @@ +--- +id: cpp-errors +title: "C++ Errors" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["compile-time vs runtime errors", "dangling pointer", "C++ 에러"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "errors"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_errors.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Errors]] + +## 🎯 한 줄 통찰 (One-line insight) +The three runtime error examples (divide-by-zero, out-of-bounds array access, using DELETED memory via a dangling pointer) all share the same trait as C's equivalent chapter — none are caught at compile time, all three compile cleanly and only misbehave when actually executed — but C++'s third example specifically involves `new`/`delete` (`int* ptr = new int(10); delete ptr; cout << *ptr;`), a "dangling pointer" scenario that has no direct C equivalent since C's version used plain `malloc`/`free`. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Compile-time errors** — prevent compilation entirely; e.g. missing semicolon, undeclared variable, type mismatch (`invalid conversion from 'const char*' to 'int'`). [S1] +- **Runtime errors** — the program compiles but crashes/misbehaves when RUN; e.g. division by zero, out-of-bounds array access, dangling pointer (reading memory after `delete`). [S1] +- **Dangling pointer** — a pointer that still holds an address after that memory was `delete`d; dereferencing it (`*ptr`) is invalid, C++-specific terminology tied to `new`/`delete`. [S1] +- **Good habits** — initialize variables, use meaningful names, keep indentation clean, keep functions short/focused, verify loop/condition behavior, read error messages carefully. [S1] + +## 📖 세부 내용 (Details) +- Type mismatch error message (more specific than C's generic phrasing): `int x = "Hello"; // error: invalid conversion from 'const char*' to 'int'`. [S1] +- Dangling pointer, a C++-specific runtime error: `int* ptr = new int(10); delete ptr; cout << *ptr; // invalid — dereferencing freed memory`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **댕글링 포인터는 new/delete와 결합된 C++ 특유의 표현**: C의 use-after-free 예제가 malloc/free 기반이었다면, C++에서는 new/delete와 결합된 "댕글링 포인터"라는 구체적 용어로 동일한 문제가 재확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 컴파일 타임 에러 3종과 런타임 에러 3종을 나란히 대비시킨 것이 두 에러 범주의 근본적 차이를 이해하는 실전 학습 자료로 활용된다. [S1] + +## 💻 코드 패턴 (Code patterns) +Using memory after it's been deleted — a dangling pointer, compiles fine but is invalid at runtime (C++): +```cpp +int* ptr = new int(10); +delete ptr; +cout << *ptr; // invalid — dangling pointer +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Date]], [[CPP Memory Management New]], [[CPP Exceptions]] +- **참조 맥락:** 에러 섹션 첫 챕터 — 예외 처리(Exceptions) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Errors — https://www.w3schools.com/cpp/cpp_errors.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Errors" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Exceptions.md b/10_Wiki/Dev/Topic_CPP/CPP_Exceptions.md new file mode 100644 index 00000000..a53ec239 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Exceptions.md @@ -0,0 +1,78 @@ +--- +id: cpp-exceptions +title: "C++ Exceptions" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["try catch throw", "exception handling", "catch all (...)", "C++ 예외 처리"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.88 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "exceptions", "try-catch"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_exceptions.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Exceptions]] + +## 🎯 한 줄 통찰 (One-line insight) +C++ has the try/catch/throw mechanism that C's Error Handling chapter EXPLICITLY said C lacks entirely — meaning this is the single biggest error-handling divergence between the two languages: where C forced programmers into manual NULL-checking, `errno`, and `perror()` workarounds, C++ provides genuine LANGUAGE-LEVEL exception handling that can catch ANY thrown value, even without knowing its type in advance (via the `catch (...)` catch-all syntax). [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Exception** — C++'s technical term for the error that occurs when something goes wrong; "C++ will THROW an exception." [S1] +- **`try`** — defines the code block to test for possible errors. [S1] +- **`throw`** — triggers an exception, optionally carrying a VALUE (of any type, e.g. `throw 505;` or `throw age;`). [S1] +- **`catch (type param)`** — handles the exception; its parameter TYPE must match what was thrown (e.g. `catch (int errorCode)` for an `int`-typed throw). [S1] +- **`catch (...)`** — the "three dots" catch-all syntax; handles ANY exception type when you don't know (or don't need to distinguish) the thrown type in advance. [S1] +- **No error = catch block skipped** — if the `try` block never throws, the `catch` block simply doesn't run. [S1] + +## 📖 세부 내용 (Details) +- Basic throw/catch with a custom error code: `try { throw 505; } catch (int errorCode) { cout << "Error occurred: " << errorCode; }`. [S1] +- Real-life age-check example throwing the actual failing value: `try { int age = 15; if (age >= 18) { cout << "Access granted."; } else { throw (age); } } catch (int myNum) { cout << "Access denied. Age is: " << myNum; }`. [S1] +- Catch-all syntax when the thrown type is unknown: `try { ... throw 505; } catch (...) { cout << "Access denied."; }` — handles the exception without needing to declare its type. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C에는 없던 진짜 예외 처리 메커니즘**: C의 Error Handling 챕터가 "C에는 try/catch가 없다"고 명시했던 것과 정반대로, C++는 try/throw/catch라는 언어 차원의 예외 처리를 제공하며, catch(...)로 타입을 몰라도 모든 예외를 잡을 수 있다는 점까지 C에는 없던 기능으로 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +사용자의 나이가 18세 미만이면 예외를 던지고 접근을 거부하는 age-check 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Catching any exception type without needing to know it in advance (C++): +```cpp +try { + int age = 15; + if (age >= 18) { + cout << "Access granted - you are old enough."; + } else { + throw 505; + } +} +catch (...) { // catches any exception type + cout << "Access denied - You must be at least 18 years old.\n"; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.88 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Errors]], [[CPP Input Validation]], [[C Error Handling]] +- **참조 맥락:** 예외 처리 — 입력 검증(Input Validation) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Exceptions — https://www.w3schools.com/cpp/cpp_exceptions.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Exceptions" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Files.md b/10_Wiki/Dev/Topic_CPP/CPP_Files.md new file mode 100644 index 00000000..9ff81195 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Files.md @@ -0,0 +1,74 @@ +--- +id: cpp-files +title: "C++ Files" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["fstream library", "ofstream ifstream", "C++ 파일 입출력"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "files", "fstream"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_files.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Files]] + +## 🎯 한 줄 통찰 (One-line insight) +C++ replaces C's SINGLE `FILE*` type + mode-string (`"r"`/`"w"`/`"a"`) approach with THREE distinct CLASSES — `ofstream` (write-only), `ifstream` (read-only), `fstream` (both) — and reuses the SAME `<<`/`getline()` idioms already learned for `cout`/`cin`, meaning file I/O in C++ isn't a separate API to learn but the SAME stream-object pattern applied to files instead of the console. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **``** — the header required for file operations, used ALONGSIDE ``. [S1] +- **`ofstream`** — creates and writes to files. [S1] +- **`ifstream`** — reads from files. [S1] +- **`fstream`** — combines both: create, read, AND write. [S1] +- **Writing via `<<`** — the SAME insertion operator used for `cout` writes directly to a file object (`MyFile << "text";`). [S1] +- **Reading via `getline()`** — the SAME function used for `cin` input reads a file line by line inside a `while` loop, which naturally stops when there are no more lines. [S1] +- **`.close()`** — closing the file is good practice, cleaning up unnecessary memory. [S1] + +## 📖 세부 내용 (Details) +- Creating and writing a file: `ofstream MyFile("filename.txt"); MyFile << "Files can be tricky, but it is fun enough!"; MyFile.close();`. [S1] +- Reading a file line by line: `string myText; ifstream MyReadFile("filename.txt"); while (getline(MyReadFile, myText)) { cout << myText; } MyReadFile.close();`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **파일 입출력이 콘솔 입출력과 동일한 문법을 재사용함**: C가 fopen()에 모드 문자열("r"/"w"/"a")을 넘기는 단일 방식이었다면, C++는 ofstream/ifstream/fstream 세 클래스로 나누되 cout의 <<와 cin의 getline()을 그대로 파일에도 재사용한다는 점이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — getline()을 while 루프와 결합해 파일을 한 줄씩 읽는 패턴이 파일 전체를 순회하는 실전 표준 방식이다. [S1] + +## 💻 코드 패턴 (Code patterns) +Reading a file line by line using getline() inside a while loop (C++): +```cpp +#include +string myText; +ifstream MyReadFile("filename.txt"); +while (getline(MyReadFile, myText)) { + cout << myText; +} +MyReadFile.close(); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Debugging]], [[CPP User Input]], [[CPP Data Structures]], [[C Files]] +- **참조 맥락:** 파일 섹션 유일 챕터이자 마지막 — 데이터 구조(STL, Data Structures) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Files — https://www.w3schools.com/cpp/cpp_files.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Files" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_For_Loop.md b/10_Wiki/Dev/Topic_CPP/CPP_For_Loop.md new file mode 100644 index 00000000..5b063ea9 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_For_Loop.md @@ -0,0 +1,69 @@ +--- +id: cpp-for-loop +title: "C++ For Loop" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["for statement", "three-statement loop", "C++ for 반복문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "loops", "for-loop"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_for_loop.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP For Loop]] + +## 🎯 한 줄 통찰 (One-line insight) +C++'s `for` loop declares its counter INLINE inside the loop header (`for (int i = 0; i < 5; i++)`) rather than declaring `int i;` separately beforehand — a syntax choice the source demonstrates consistently across every example, meaning `i`'s SCOPE is confined to the loop itself in idiomatic C++ usage, unlike C's tutorial style which more often declared the counter as a separate statement before the loop. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`for (statement1; statement2; statement3) { ... }`** — statement1 runs once before the loop; statement2 is the continuation condition; statement3 runs after each iteration. [S1] +- **Inline counter declaration** — `for (int i = 0; ...)` scopes `i` to the loop itself, the idiomatic C++ style shown throughout. [S1] +- **Fixed-count use case** — the recommended tool when the number of iterations is known ahead of time. [S1] + +## 📖 세부 내용 (Details) +- Basic counting with an inline-declared counter: `for (int i = 0; i < 5; i++) { cout << i << "\n"; }`. [S1] +- Accumulating a sum: `int sum = 0; for (int i = 1; i <= 5; i++) { sum = sum + i; } cout << "Sum is " << sum;`. [S1] +- Countdown via decrement: `for (int i = 5; i > 0; i--) { cout << i << "\n"; }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **루프 카운터를 for 헤더 안에서 바로 선언**: C 챕터의 예제들은 int i;를 루프 밖에서 별도로 선언하는 경우가 있었지만, C++ 예제는 일관되게 for (int i = 0; ...) 형태로 헤더 안에서 바로 선언해 i의 스코프를 루프에 국한시킨다는 점이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +1부터 5까지의 합을 for 루프로 누적 계산하는 예제(sum = sum + i)가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +An inline-declared loop counter scoped to the for loop itself (C++): +```cpp +int sum = 0; +for (int i = 1; i <= 5; i++) { + sum = sum + i; +} +cout << "Sum is " << sum; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Do While Loop]], [[CPP For Loop Foreach]], [[C For Loop]] +- **참조 맥락:** for 루프 — foreach 루프(For Loop Foreach) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ For Loop — https://www.w3schools.com/cpp/cpp_for_loop.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ For Loop" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_For_Loop_Foreach.md b/10_Wiki/Dev/Topic_CPP/CPP_For_Loop_Foreach.md new file mode 100644 index 00000000..e2c4f2b4 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_For_Loop_Foreach.md @@ -0,0 +1,74 @@ +--- +id: cpp-for-loop-foreach +title: "C++ The foreach Loop" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["range-based for loop", "for-each", "C++ foreach 루프"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "loops", "foreach", "range-based-for"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_for_loop_foreach.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP The foreach Loop]] + +## 🎯 한 줄 통찰 (One-line insight) +This is a genuinely NEW construct that C never had at all — the range-based `for (type var : collection)` loop, introduced only in C++11 (2011), eliminates BOTH the manual index variable AND the manual bounds-check entirely, meaning C++ programmers get a loop style C users had no equivalent for, and the exact same syntax works interchangeably on an array of numbers or the characters of a string. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`for (type variableName : collectionName) { ... }`** — the range-based ("for-each") loop; iterates every element without an index variable or manual size tracking. [S1] +- **Works on arrays** — `for (int num : myNumbers)` visits each element directly. [S1] +- **Works on strings too** — `for (char c : word)` visits each character. [S1] +- **C++11 introduction** — this loop form did not exist before the 2011 standard. [S1] +- **No index or bounds-checking needed** — unlike a traditional `for` loop with `i < length`, the range-based form has no risk of an off-by-one error since it handles iteration internally. [S1] + +## 📖 세부 내용 (Details) +- Looping through an array: `int myNumbers[5] = {10, 20, 30, 40, 50}; for (int num : myNumbers) { cout << num << "\n"; }`. [S1] +- Looping through a string's characters: `string word = "Hello"; for (char c : word) { cout << c << "\n"; }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C에는 없던 C++ 고유 반복문**: 인덱스 변수나 수동 경계 확인 없이 배열/문자열의 모든 원소를 순회하는 range-based for 루프는 C++11(2011)에 새로 도입된 개념으로, C 튜토리얼에는 대응 챕터가 전혀 없었다는 점이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 배열과 문자열 모두에 동일한 for-each 문법을 적용할 수 있다는 점이 실전 코드 순회 작업의 간결함을 보여준다. [S1] + +## 💻 코드 패턴 (Code patterns) +The range-based for loop working identically on an array and a string (C++11+): +```cpp +int myNumbers[5] = {10, 20, 30, 40, 50}; +for (int num : myNumbers) { + cout << num << "\n"; +} + +string word = "Hello"; +for (char c : word) { + cout << c << "\n"; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP For Loop]], [[CPP For Loop Nested]], [[CPP Arrays]] +- **참조 맥락:** foreach 루프 — 중첩 for 루프(For Loop Nested) 챕터로 이어짐, 배열(Arrays) 섹션과 직접 연결. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ The foreach Loop — https://www.w3schools.com/cpp/cpp_for_loop_foreach.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ The foreach Loop" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_For_Loop_Nested.md b/10_Wiki/Dev/Topic_CPP/CPP_For_Loop_Nested.md new file mode 100644 index 00000000..8ad81366 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_For_Loop_Nested.md @@ -0,0 +1,72 @@ +--- +id: cpp-for-loop-nested +title: "C++ Nested Loops" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["inner outer loop", "multiplication table", "C++ 중첩 반복문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "loops", "nested-loops"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_for_loop_nested.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Nested Loops]] + +## 🎯 한 줄 통찰 (One-line insight) +The identical multiplicative execution-count annotation from C's Nested Loops chapter reappears unchanged (outer runs 2 times, inner runs "6 times (2 * 3)," not additive 5) — reconfirming that nested-loop cost scales multiplicatively in C++ exactly as it did in C, which is why nested loops remain the natural fit for 2D structures like tables and matrices in both languages. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Nested loop** — a loop placed entirely inside another loop's body; the inner loop runs to completion once for EVERY iteration of the outer loop. [S1] +- **Multiplicative execution count** — total inner-body executions = (outer iterations) × (inner iterations). [S1] +- **Natural fit for 2D data** — tables, matrices, multi-dimensional structures. [S1] + +## 📖 세부 내용 (Details) +- Basic nesting with explicit iteration-count annotation: `for (int i = 1; i <= 2; ++i) { cout << "Outer: " << i << "\n"; for (int j = 1; j <= 3; ++j) { cout << " Inner: " << j << "\n"; } }` — outer runs 2 times, inner runs 6 times total (2×3). [S1] +- Multiplication table via nested loops: `for (int i = 1; i <= 3; i++) { for (int j = 1; j <= 3; j++) { cout << i * j << " "; } cout << "\n"; }` — produces `1 2 3 / 2 4 6 / 3 6 9`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). C 챕터와 동일한 곱셈 관계 및 예제가 확인됨. + +## 🛠️ 적용 사례 (Applied in summary) +3x3 구구단표를 중첩 for 루프로 출력하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +A multiplication table built from two nested for loops (C++): +```cpp +for (int i = 1; i <= 3; i++) { + for (int j = 1; j <= 3; j++) { + cout << i * j << " "; + } + cout << "\n"; +} +// 1 2 3 +// 2 4 6 +// 3 6 9 +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP For Loop Foreach]], [[CPP For Loop RealLife]], [[C For Loop Nested]] +- **참조 맥락:** 중첩 for 루프 — for 루프 실전 예제(For Loop RealLife) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Nested Loops — https://www.w3schools.com/cpp/cpp_for_loop_nested.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Nested Loops" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_For_Loop_RealLife.md b/10_Wiki/Dev/Topic_CPP/CPP_For_Loop_RealLife.md new file mode 100644 index 00000000..3a07ace1 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_For_Loop_RealLife.md @@ -0,0 +1,68 @@ +--- +id: cpp-for-loop-reallife +title: "C++ For Loop Examples" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["powers of 2", "multiplication table generator", "C++ for 루프 실전 예제"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.82 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "loops", "for-loop", "real-life-example"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_for_loop_reallife.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP For Loop Examples]] + +## 🎯 한 줄 통찰 (One-line insight) +The identical multiplicative-stepping example from C (`for (int i = 2; i <= 512; i *= 2)`) confirms C++'s `for` loop third-expression slot accepts ANY expression that changes the loop variable — not just `++`/`+=` — meaning the "increment expression" is really an arbitrary per-iteration mutation, a property inherited unchanged from C's for-loop semantics. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Additive stepping by an arbitrary amount** — `i += 10` steps by tens. [S1] +- **Multiplicative stepping** — `i *= 2` doubles the value each iteration, producing powers of 2. [S1] +- **Parameterized multiplication table** — using a variable (`number`) instead of a hardcoded value generates any number's table. [S1] + +## 📖 세부 내용 (Details) +- Counting by tens: `for (int i = 0; i <= 100; i += 10) { cout << i << "\n"; }`. [S1] +- Powers of 2 via multiplicative stepping: `for (int i = 2; i <= 512; i *= 2) { cout << i << "\n"; }` — 2, 4, 8, ..., 512. [S1] +- Parameterized multiplication table: `int number = 2; for (i = 1; i <= 10; i++) { cout << number << " x " << i << " = " << number * i << "\n"; }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). C 챕터와 동일한 곱셈 증가식이 확인됨. + +## 🛠️ 적용 사례 (Applied in summary) +2의 거듭제곱을 512까지 출력하는 예제와, 임의의 숫자에 대한 구구단표를 생성하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Multiplicative stepping in a for loop to generate powers of 2 (C++): +```cpp +for (int i = 2; i <= 512; i *= 2) { + cout << i << "\n"; +} +// 2, 4, 8, 16, 32, 64, 128, 256, 512 +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.82 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP For Loop Nested]], [[CPP Break]], [[C For Loop RealLife]] +- **참조 맥락:** for 루프 실전 예제 — break/continue 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ For Loop Examples — https://www.w3schools.com/cpp/cpp_for_loop_reallife.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ For Loop Examples" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Friend_Function.md b/10_Wiki/Dev/Topic_CPP/CPP_Friend_Function.md new file mode 100644 index 00000000..58375efd --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Friend_Function.md @@ -0,0 +1,72 @@ +--- +id: cpp-friend-function +title: "C++ The Friend Keyword" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["friend function", "bypass encapsulation", "C++ friend 키워드"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "oop", "friend", "encapsulation"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_friend_function.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP The Friend Keyword]] + +## 🎯 한 줄 통찰 (One-line insight) +A `friend` function is deliberately EXEMPT from the entire Encapsulation chapter's rule — it's NOT a member of the class at all, yet it can read `private` data directly with no getter method required, meaning `friend` is a language-level ESCAPE HATCH from encapsulation, granted explicitly and individually per-function rather than a general loophole, since each `friend` declaration must name exactly which external function gets the privilege. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Friend function** — a function that is NOT a member of the class, but is explicitly GRANTED access to the class's `private` members. [S1] +- **Declared inside, defined outside** — the friend function's declaration lives INSIDE the class (marked with `friend`), but its actual body is written OUTSIDE the class like a normal function. [S1] +- **Bypasses the getter/setter requirement** — unlike ordinary external code (which must use public getters/setters per the Encapsulation chapter), a friend function reads `private` members directly. [S1] + +## 📖 세부 내용 (Details) +- A friend function accessing a private attribute directly: `class Employee { private: int salary; public: Employee(int s) { salary = s; } friend void displaySalary(Employee emp); }; void displaySalary(Employee emp) { cout << "Salary: " << emp.salary; } Employee myEmp(50000); displaySalary(myEmp);` — `displaySalary` isn't a class member but reads `emp.salary` directly. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **friend는 캡슐화 규칙의 예외**: 일반적으로 private 멤버는 public 게터/세터로만 접근해야 하지만, friend로 선언된 함수는 클래스의 멤버가 아님에도 private 데이터를 직접 읽을 수 있다는 점에서 캡슐화 원칙의 명시적 예외임이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +Employee의 private 급여(salary)를 friend 함수 displaySalary()가 게터 없이 직접 출력하는 예제가 friend 키워드의 대표 실전 활용 사례로 원문에 직접 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +A friend function reading a private member directly, with no getter needed (C++): +```cpp +class Employee { +private: + int salary; +public: + Employee(int s) { salary = s; } + friend void displaySalary(Employee emp); // friend declaration +}; +void displaySalary(Employee emp) { // defined outside, not a member + cout << "Salary: " << emp.salary; // direct access to private data +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Virtual Functions]], [[CPP Encapsulation]], [[CPP Templates]] +- **참조 맥락:** friend 함수 — 템플릿(Templates) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ The Friend Keyword — https://www.w3schools.com/cpp/cpp_friend_function.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ The Friend Keyword" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Function_Array.md b/10_Wiki/Dev/Topic_CPP/CPP_Function_Array.md new file mode 100644 index 00000000..38581e44 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Function_Array.md @@ -0,0 +1,71 @@ +--- +id: cpp-function-array +title: "C++ Pass Array to a Function" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["array parameter", "C++ 배열을 함수로 전달"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "functions", "arrays"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_function_array.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Pass Array to a Function]] + +## 🎯 한 줄 통찰 (One-line insight) +Calling `myFunction(myNumbers)` only needs the ARRAY NAME, but the function's own parameter must still spell out the full declaration (`int myNumbers[5]`) — the same asymmetry from C's identical chapter, confirming this array-name-is-a-pointer behavior carries over from C to C++ completely unmodified. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Passing arrays** — call site uses just the array name; the function signature needs the full array declaration. [S1] +- **Same asymmetry as C** — bare name at the call site, full type+size at the parameter declaration. [S1] + +## 📖 세부 내용 (Details) +- Passing and looping through an array parameter: `void myFunction(int myNumbers[5]) { for (int i = 0; i < 5; i++) { cout << myNumbers[i] << "\n"; } } int myNumbers[5] = {10,20,30,40,50}; myFunction(myNumbers);`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). C 챕터와 동일한 배열-함수 매개변수 관계가 확인됨. + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 숫자 배열을 함수에 전달해 순회 출력하는 패턴이 배열-함수 결합의 기본 실전 활용이다. [S1] + +## 💻 코드 패턴 (Code patterns) +Passing an array to a function using just its name at the call site (C++): +```cpp +void myFunction(int myNumbers[5]) { + for (int i = 0; i < 5; i++) { + cout << myNumbers[i] << "\n"; + } +} +int main() { + int myNumbers[5] = {10, 20, 30, 40, 50}; + myFunction(myNumbers); + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Function RealLife]], [[CPP Function Reference]], [[C Functions Parameters]] +- **참조 맥락:** 배열을 함수로 전달 — 참조로 전달(Function Reference) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Pass Array to a Function — https://www.w3schools.com/cpp/cpp_function_array.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Pass Array to a Function" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Function_Default.md b/10_Wiki/Dev/Topic_CPP/CPP_Function_Default.md new file mode 100644 index 00000000..1c2cafe7 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Function_Default.md @@ -0,0 +1,70 @@ +--- +id: cpp-function-default +title: "C++ Default Parameters" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["optional parameter", "default argument value", "C++ 기본 매개변수"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "functions", "default-parameters"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_function_default.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Default Parameters]] + +## 🎯 한 줄 통찰 (One-line insight) +This is a feature C never had — a function parameter can carry a FALLBACK VALUE (`string country = "Norway"`) that's automatically used ONLY when the caller omits that argument entirely, meaning `myFunction()` and `myFunction("USA")` are BOTH valid calls to the SAME function with different effective parameter counts, something C's rigid argument-count matching never permitted. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Default parameter value (`param = value`)** — assigns a fallback value used when the caller omits that argument. [S1] +- **"Optional parameter"** — the common name for a parameter with a default value. [S1] +- **Callable with or without the argument** — the SAME function accepts calls with a different number of arguments, unlike C where argument count must always match parameter count exactly. [S1] + +## 📖 세부 내용 (Details) +- Default value used when the argument is omitted: `void myFunction(string country = "Norway") { cout << country << "\n"; } myFunction("Sweden"); // Sweden myFunction("India"); // India myFunction(); // Norway (default) myFunction("USA"); // USA`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C에는 없던 기본 매개변수 기능**: 인자를 생략하면 자동으로 기본값이 쓰이는 "선택적 매개변수(optional parameter)"는 C의 고정된 인자 개수 일치 규칙과 달리, 같은 함수를 다른 개수의 인자로 호출할 수 있게 해준다는 점이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 국가 매개변수를 생략하면 "Norway"가 기본으로 쓰이는 예제가 선택적 매개변수의 실전 활용을 보여준다. [S1] + +## 💻 코드 패턴 (Code patterns) +A default parameter value used when the argument is omitted (C++): +```cpp +void myFunction(string country = "Norway") { + cout << country << "\n"; +} +int main() { + myFunction("Sweden"); // Sweden + myFunction(); // Norway (default used) + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Function Param]], [[CPP Function Overloading]], [[C Functions Parameters]] +- **참조 맥락:** 기본 매개변수 — 함수 오버로딩(Function Overloading) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Default Parameters — https://www.w3schools.com/cpp/cpp_function_default.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Default Parameters" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Function_Multiple.md b/10_Wiki/Dev/Topic_CPP/CPP_Function_Multiple.md new file mode 100644 index 00000000..14405c91 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Function_Multiple.md @@ -0,0 +1,69 @@ +--- +id: cpp-function-multiple +title: "C++ Multiple Parameters" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["argument order matters", "C++ 다중 매개변수"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.82 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "functions", "parameters"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_function_multiple.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Multiple Parameters]] + +## 🎯 한 줄 통찰 (One-line insight) +Mixing a `string` and an `int` parameter in one signature (`myFunction(string fname, int age)`) works with no special handling — reinforcing that C++'s type system lets DIFFERENT types coexist freely as sibling parameters, unlike C where mixing a `char[]` string parameter with an `int` required careful array-size declarations for the string slot specifically. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Multiple, mixed-type parameters** — `void myFunction(string fname, int age)` combines a string and an int with no special syntax. [S1] +- **Argument count and order must match** — the function call must supply the SAME NUMBER of arguments as parameters, IN THE SAME ORDER. [S1] + +## 📖 세부 내용 (Details) +- A string+int parameter pair reused across calls: `void myFunction(string fname, int age) { cout << fname << " Refsnes. " << age << " years old. \n"; } myFunction("Liam", 3); myFunction("Jenny", 14);`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 이름과 나이를 함께 받아 "OO는 N살입니다"를 출력하는 패턴이 실전 다중 매개변수 활용의 대표 사례다. [S1] + +## 💻 코드 패턴 (Code patterns) +A function combining a string and int parameter (C++): +```cpp +void myFunction(string fname, int age) { + cout << fname << " Refsnes. " << age << " years old. \n"; +} +int main() { + myFunction("Liam", 3); + myFunction("Jenny", 14); + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.82 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Function Overloading]], [[CPP Function Return]], [[C Functions Parameters]] +- **참조 맥락:** 다중 매개변수 — return 키워드(Function Return) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Multiple Parameters — https://www.w3schools.com/cpp/cpp_function_multiple.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Multiple Parameters" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Function_Overloading.md b/10_Wiki/Dev/Topic_CPP/CPP_Function_Overloading.md new file mode 100644 index 00000000..0d21bc10 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Function_Overloading.md @@ -0,0 +1,76 @@ +--- +id: cpp-function-overloading +title: "C++ Function Overloading" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["same name different signature", "overload resolution", "C++ 함수 오버로딩"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "functions", "overloading"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_function_overloading.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Function Overloading]] + +## 🎯 한 줄 통찰 (One-line insight) +Function overloading is entirely absent from C — C requires a UNIQUE name per function (hence `plusFuncInt`/`plusFuncDouble` as the "without overloading" workaround), while C++ lets MULTIPLE functions share one name (`plusFunc`) as long as their parameter TYPE or COUNT differs, meaning the compiler determines which version to call based on the ARGUMENTS at each call site, not the function name alone — a genuinely new resolution mechanism C never had. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Function overloading** — multiple functions sharing ONE NAME, differentiated by parameter type and/or count. [S1] +- **Without overloading (the C-style workaround)** — separate function names (`plusFuncInt`, `plusFuncDouble`) needed for logically identical operations on different types. [S1] +- **Overloading by type** — `int plusFunc(int x, int y)` and `double plusFunc(double x, double y)` coexist under one name. [S1] +- **Overloading by parameter count** — `int plusFunc(int x, int y)` and `int plusFunc(int x, int y, int z)` coexist, differentiated purely by how many arguments are passed. [S1] + +## 📖 세부 내용 (Details) +- The C-style workaround requiring separate names: `int plusFuncInt(int x, int y) { return x + y; } double plusFuncDouble(double x, double y) { return x + y; }`. [S1] +- The same logic unified via overloading: `int plusFunc(int x, int y) { return x + y; } double plusFunc(double x, double y) { return x + y; }` — the compiler picks the right one based on argument types. [S1] +- Overloading by parameter count: `int plusFunc(int x, int y) { return x + y; } int plusFunc(int x, int y, int z) { return x + y + z; }` — `plusFunc(3, 7)` calls the 2-parameter version, `plusFunc(1, 2, 3)` calls the 3-parameter version. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C에는 전혀 없던 오버로딩 개념**: C는 함수마다 고유한 이름이 필요하지만(plusFuncInt/plusFuncDouble처럼), C++는 매개변수의 타입이나 개수만 다르면 같은 이름을 여러 함수에 재사용할 수 있다는 점이 근본적으로 새로운 개념으로 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +int과 double 두 타입에 대해 같은 덧셈 로직을 하나의 plusFunc 이름으로 통합하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +One function name overloaded for two different parameter types (C++): +```cpp +int plusFunc(int x, int y) { + return x + y; +} +double plusFunc(double x, double y) { + return x + y; +} +int main() { + int myNum1 = plusFunc(8, 5); // calls the int version + double myNum2 = plusFunc(4.3, 6.26); // calls the double version + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Function Default]], [[CPP Function Multiple]], [[CPP Constructors Overloading]] +- **참조 맥락:** 함수 오버로딩 — 다중 매개변수(Function Multiple) 챕터로 이어짐, 생성자 오버로딩(Constructors Overloading) 챕터와 직접 연결. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Function Overloading — https://www.w3schools.com/cpp/cpp_function_overloading.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Function Overloading" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Function_Param.md b/10_Wiki/Dev/Topic_CPP/CPP_Function_Param.md new file mode 100644 index 00000000..f986dad2 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Function_Param.md @@ -0,0 +1,70 @@ +--- +id: cpp-function-param +title: "C++ Function Parameters" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["parameters vs arguments", "C++ 함수 매개변수"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "functions", "parameters"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_function_param.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Function Parameters]] + +## 🎯 한 줄 통찰 (One-line insight) +Passing a `string` parameter directly (`myFunction(string fname)`) requires NO special array-declaration syntax the way C would (where a string parameter needs `char name[]`) — confirming that C++'s genuine string type flows naturally into function signatures too, letting a function accept and concatenate names as simply as it would numbers. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Parameter vs. argument** — parameter is the variable name in the signature; argument is the actual value passed at the call site. [S1] +- **String parameters work directly** — `void myFunction(string fname)`, no array declaration needed unlike C. [S1] +- **Reused function logic across calls** — the same function body runs once per call with different arguments. [S1] + +## 📖 세부 내용 (Details) +- A string parameter reused across three calls: `void myFunction(string fname) { cout << fname << " Refsnes\n"; } myFunction("Liam"); myFunction("Jenny"); myFunction("Anja");` — each call appends " Refsnes" to a different name. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **string 매개변수에 배열 문법이 필요 없음**: C에서는 문자열 매개변수를 char name[]으로 선언해야 했지만, C++에서는 string fname처럼 직접 선언 가능하다는 점이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 이름 뒤에 성(Refsnes)을 자동으로 붙여 출력하는 예제가 문자열 매개변수 활용의 대표 사례다. [S1] + +## 💻 코드 패턴 (Code patterns) +A string parameter used directly, no array syntax needed (C++): +```cpp +void myFunction(string fname) { + cout << fname << " Refsnes\n"; +} +int main() { + myFunction("Liam"); + myFunction("Jenny"); + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Functions]], [[CPP Function Default]], [[C Functions Parameters]] +- **참조 맥락:** 함수 매개변수 — 기본 매개변수(Function Default) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Function Parameters — https://www.w3schools.com/cpp/cpp_function_param.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Function Parameters" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Function_RealLife.md b/10_Wiki/Dev/Topic_CPP/CPP_Function_RealLife.md new file mode 100644 index 00000000..8bc20da4 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Function_RealLife.md @@ -0,0 +1,70 @@ +--- +id: cpp-function-reallife +title: "C++ Function Examples" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["fahrenheit to celsius", "C++ 함수 실전 예제"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.81 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "functions", "real-life-example"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_function_reallife.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Function Examples]] + +## 🎯 한 줄 통찰 (One-line insight) +The identical Fahrenheit-to-Celsius conversion example from C reappears in C++ unchanged, right down to the same formula and variable names — confirming that a pure computational function (no strings, no OOP, no C++-specific features) transfers between the two languages with essentially zero adaptation beyond `cout <<` replacing `printf()`. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **A function encapsulating one formula** — `toCelsius(fahrenheit)` hides the `(5.0/9.0) * (fahrenheit - 32.0)` computation behind a clear name. [S1] +- **Reused pattern from C** — identical structure to C's Fahrenheit/Celsius example. [S1] + +## 📖 세부 내용 (Details) +- The conversion function and its usage: `float toCelsius(float fahrenheit) { return (5.0 / 9.0) * (fahrenheit - 32.0); } float f_value = 98.8; float result = toCelsius(f_value);`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). C 챕터와 완전히 동일한 예제임이 확인됨. + +## 🛠️ 적용 사례 (Applied in summary) +화씨를 섭씨로 변환하는 toCelsius() 함수가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +A function encapsulating the Fahrenheit-to-Celsius formula (C++): +```cpp +float toCelsius(float fahrenheit) { + return (5.0 / 9.0) * (fahrenheit - 32.0); +} +int main() { + float f_value = 98.8; + float result = toCelsius(f_value); + cout << "Convert Fahrenheit to Celsius: " << result << "\n"; + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.81 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Function Return]], [[CPP Function Array]], [[C Functions Parameters]] +- **참조 맥락:** 함수 실전 예제 — 배열을 함수로 전달하기(Function Array) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Function Examples — https://www.w3schools.com/cpp/cpp_function_reallife.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Function Examples" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Function_Reference.md b/10_Wiki/Dev/Topic_CPP/CPP_Function_Reference.md new file mode 100644 index 00000000..464c5e4c --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Function_Reference.md @@ -0,0 +1,76 @@ +--- +id: cpp-function-reference +title: "C++ Functions - Pass By Reference" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["pass by reference", "swap function", "C++ 참조로 전달"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "functions", "references"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_function_reference.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Functions - Pass By Reference]] + +## 🎯 한 줄 통찰 (One-line insight) +Passing a parameter as `int &num` lets a function PERMANENTLY change the caller's actual variable using ordinary assignment syntax (`num = 50;`) with no `*` dereference needed anywhere — a much simpler syntax than C's equivalent (which requires passing `&myCar` and using `->` inside the function) — showing that C++'s reference feature does the SAME job as C's pointer-parameter pattern but eliminates every pointer-specific symbol from both the call site and the function body. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`type ¶m`** — a reference parameter; the function receives an ALIAS to the caller's actual variable, not a copy. [S1] +- **No dereference syntax needed** — unlike a pointer parameter, using `num` directly (no `*num`) reads or writes the caller's original variable. [S1] +- **Swap pattern** — `void swapNums(int &x, int &y)` can swap the CALLER's two variables permanently, since both parameters are aliases to the originals. [S1] +- **Works for any type, including `string`** — `void modifyStr(string &str)` mutates the caller's original string. [S1] + +## 📖 세부 내용 (Details) +- Changing a caller's variable through a reference parameter: `void changeValue(int &num) { num = 50; } int value = 10; changeValue(value); cout << value; // 50`. [S1] +- Swapping two caller variables: `void swapNums(int &x, int &y) { int z = x; x = y; y = z; } swapNums(firstNum, secondNum); // firstNum and secondNum are now swapped`. [S1] +- Mutating a string through a reference: `void modifyStr(string &str) { str += " World!"; } string greeting = "Hello"; modifyStr(greeting); cout << greeting; // "Hello World!"`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **참조 전달은 포인터 전달보다 문법이 훨씬 간단함**: C에서는 &myCar로 넘기고 함수 안에서 ->로 접근해야 했지만, C++의 참조 매개변수는 & 없이 num처럼 직접 써서 원본 값을 바꿀 수 있다는 점에서 동일한 기능을 훨씬 단순한 문법으로 제공함이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +두 정수 변수의 값을 서로 맞바꾸는 swapNums() 함수가 참조 전달의 대표적인 실전 활용 사례로 원문에 직접 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Swapping two of the caller's variables using reference parameters (C++): +```cpp +void swapNums(int &x, int &y) { + int z = x; + x = y; + y = z; +} +int main() { + int firstNum = 10; + int secondNum = 20; + swapNums(firstNum, secondNum); // both are permanently swapped + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Function Array]], [[CPP Function Structures]], [[CPP References]] +- **참조 맥락:** 참조로 전달 — 구조체를 함수로 전달(Function Structures) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Functions - Pass By Reference — https://www.w3schools.com/cpp/cpp_function_reference.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Functions - Pass By Reference" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Function_Return.md b/10_Wiki/Dev/Topic_CPP/CPP_Function_Return.md new file mode 100644 index 00000000..4ffee30c --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Function_Return.md @@ -0,0 +1,73 @@ +--- +id: cpp-function-return +title: "C++ The Return Keyword" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["return values", "void vs typed return", "C++ return 키워드"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "functions", "return"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_function_return.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP The Return Keyword]] + +## 🎯 한 줄 통찰 (One-line insight) +The "doubling game" example calls `doubleGame(i)` DIRECTLY inside a `cout <<` chain (`cout << "Double of " << i << " is " << doubleGame(i) << endl;`) without ever storing the return value in a variable first — proving a function call's return value can be used as an EXPRESSION anywhere a value is expected, not just assigned to a variable, letting five separate function calls (one per loop iteration) feed directly into output formatting. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`void` vs. a real return type** — `void` means no return value; a real type (`int`, etc.) plus `return` lets the function hand back a computed value. [S1] +- **Using a function call inline** — a function's return value can be used directly inside an expression (like a `cout <<` chain) without first storing it in a variable. [S1] +- **Storing the result in a variable** — equally valid, and often clearer for reuse. [S1] + +## 📖 세부 내용 (Details) +- Returning a computed value: `int myFunction(int x) { return 5 + x; } cout << myFunction(3); // 8`. [S1] +- Storing the result before printing: `int z = myFunction(5, 3); cout << z;`. [S1] +- Using the return value directly inline inside a loop, with no intermediate variable: `int doubleGame(int x) { return x * 2; } for (int i = 1; i <= 5; i++) { cout << "Double of " << i << " is " << doubleGame(i) << endl; }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +1부터 5까지 각 숫자를 두 배로 만들어 출력하는 "게임" 예제가 함수 반환값을 변수에 저장하지 않고 cout 문 안에서 바로 사용하는 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Using a function's return value directly inline inside a loop's output, without an intermediate variable (C++): +```cpp +int doubleGame(int x) { + return x * 2; +} +int main() { + for (int i = 1; i <= 5; i++) { + cout << "Double of " << i << " is " << doubleGame(i) << endl; + } + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Function Multiple]], [[CPP Function RealLife]], [[C Functions Parameters]] +- **참조 맥락:** return 키워드 — 함수 실전 예제(Function RealLife) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ The Return Keyword — https://www.w3schools.com/cpp/cpp_function_return.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ The Return Keyword" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Function_Structures.md b/10_Wiki/Dev/Topic_CPP/CPP_Function_Structures.md new file mode 100644 index 00000000..4a877246 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Function_Structures.md @@ -0,0 +1,76 @@ +--- +id: cpp-function-structures +title: "C++ Pass Structures to a Function" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["pass by value struct", "pass by reference struct", "C++ 구조체를 함수로 전달"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "functions", "structs"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_function_structures.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Pass Structures to a Function]] + +## 🎯 한 줄 통찰 (One-line insight) +Passing a struct WITHOUT `&` gives the function a full COPY — mutating it inside the function leaves the caller's original untouched — while passing it WITH `&` gives the function the ORIGINAL, letting `c.year++;` permanently increment the caller's struct field, meaning the exact same `&` reference syntax from the Pass By Reference chapter extends naturally to entire structs, not just primitive types like `int`/`string`. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Pass by value (default)** — `void myFunction(Car c)` gives the function a COPY of the struct; modifying `c` inside the function does NOT affect the caller's original. [S1] +- **Pass by reference (`Car &c`)** — gives the function the ORIGINAL struct; modifications inside the function DO persist in the caller. [S1] +- **When to use reference** — to let the function change the struct's data, OR to avoid copying large structures (performance). [S1] + +## 📖 세부 내용 (Details) +- Pass by value — original unaffected: `struct Car { string brand; int year; }; void myFunction(Car c) { cout << "Brand: " << c.brand << ", Year: " << c.year << "\n"; } Car myCar = {"Toyota", 2020}; myFunction(myCar); // myCar unchanged after this call`. [S1] +- Pass by reference — original mutated: `void updateYear(Car &c) { c.year++; } Car myCar = {"Toyota", 2020}; updateYear(myCar); cout << myCar.year; // 2021 — the original was incremented`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **값 전달과 참조 전달의 결과 차이**: & 없이 구조체를 전달하면 함수는 복사본을 받아 원본이 바뀌지 않지만, &를 붙이면 원본 자체를 받아 함수 안의 변경이 그대로 유지된다는 점이 year++ 예제로 직접 대비되어 증명됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +자동차 구조체의 연식(year)을 참조로 전달받아 함수 안에서 1씩 증가시키고 그 변경이 원본에 반영되는 updateYear() 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Passing a struct by reference so the function can permanently modify it (C++): +```cpp +struct Car { + string brand; + int year; +}; +void updateYear(Car &c) { + c.year++; +} +int main() { + Car myCar = {"Toyota", 2020}; + updateYear(myCar); + cout << "The " << myCar.brand << " is now from year " << myCar.year << "."; // 2021 + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Function Reference]], [[CPP Functions Recursion]], [[CPP Structs]] +- **참조 맥락:** 구조체를 함수로 전달 — 재귀(Functions Recursion) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Pass Structures to a Function — https://www.w3schools.com/cpp/cpp_function_structures.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Pass Structures to a Function" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Functions.md b/10_Wiki/Dev/Topic_CPP/CPP_Functions.md new file mode 100644 index 00000000..2969b876 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Functions.md @@ -0,0 +1,76 @@ +--- +id: cpp-functions +title: "C++ Functions" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["void function", "function call", "declaration order matters", "C++ 함수"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "functions"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_functions.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Functions]] + +## 🎯 한 줄 통찰 (One-line insight) +Calling a function BEFORE it's defined (with no prior declaration) is an explicit ERROR in C++ — the source shows `myFunction()` called inside `main()` at the top, with its full definition written BELOW, producing a compile error — a stricter behavior than what C-style top-down reading might suggest, meaning the declaration-above/definition-below organizational pattern isn't just a style preference here, it's the FIX for a real compile failure, not merely cosmetic. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Function** — a block of code that only runs when CALLED. [S1] +- **`void` return type** — the function returns no value. [S1] +- **Calling before defining fails without a declaration** — if `myFunction()` is called in `main()` but only DEFINED below `main()` with no prior declaration, it's a compile error. [S1] +- **Declaration + definition split** — writing `void myFunction();` above `main()` and the full body below fixes the ordering problem while keeping code organized. [S1] + +## 📖 세부 내용 (Details) +- The error case (calling before any declaration exists): `int main() { myFunction(); return 0; } void myFunction() { cout << "..."; } // Error`. [S1] +- The fix using forward declaration: `void myFunction(); int main() { myFunction(); return 0; } void myFunction() { cout << "I just got executed!"; }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **선언 없이 정의보다 먼저 호출하면 명시적 에러**: main() 안에서 함수를 호출하고 그 정의가 아래에 있을 뿐 사전 선언이 없으면 컴파일 에러가 발생한다는 점이 직접 예시로 확인됨 — C 챕터보다 이 문제를 더 명확히 강조함. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 함수 선언을 main() 위에 두고 정의를 아래에 두는 구조가 컴파일 에러를 피하면서 코드 가독성도 높이는 실전 표준 관행이다. [S1] + +## 💻 코드 패턴 (Code patterns) +Forward-declaring a function above main() so it can be called before its full definition (C++): +```cpp +// Function declaration +void myFunction(); + +int main() { + myFunction(); // works because of the forward declaration above + return 0; +} + +// Function definition +void myFunction() { + cout << "I just got executed!"; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Memory Management New]], [[CPP Function Param]], [[C Functions]] +- **참조 맥락:** 함수 섹션 첫 챕터 — 함수 매개변수(Function Param) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Functions — https://www.w3schools.com/cpp/cpp_functions.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Functions" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Functions_Lambda.md b/10_Wiki/Dev/Topic_CPP/CPP_Functions_Lambda.md new file mode 100644 index 00000000..3376d1bd --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Functions_Lambda.md @@ -0,0 +1,75 @@ +--- +id: cpp-functions-lambda +title: "C++ Lambda Functions" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["anonymous function", "capture clause", "capture by value vs reference", "C++ 람다 함수"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "functions", "lambda"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_functions_lambda.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Lambda Functions]] + +## 🎯 한 줄 통찰 (One-line insight) +The capture clause's TWO forms — `[x]` (by value, a frozen COPY at the moment of creation) versus `[&x]` (by reference, always the LATEST value) — produce genuinely different output for the identical-looking code: the same `show()` lambda prints `10` in one version and `20` in the other, purely because `x` was changed to 20 AFTER the lambda was defined — meaning the capture-clause choice determines whether a lambda is a snapshot of the past or a live window into the present. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Lambda function** — `[capture](parameters) { code };` — an anonymous, throwaway function written inline, with no separate name/declaration required. [S1] +- **`auto` + lambda** — a lambda is typically stored via `auto varName = [...]() {...};` then called like a normal function (`varName();`). [S1] +- **Capture by value (`[x]`)** — the lambda gets a COPY of `x` frozen at creation time; later changes to the outer `x` don't affect the lambda's copy. [S1] +- **Capture by reference (`[&x]`)** — the lambda uses the ORIGINAL `x`; it always sees the latest value, even changes made AFTER the lambda was defined. [S1] +- **Passing a lambda as an argument** — requires `#include ` and a `function` parameter type in the RECEIVING function. [S1] +- **Regular function vs. lambda** — use a regular function when reused often, needs a clear name, or logic is long; use a lambda for one-off, short, throwaway logic or when passing behavior into another function. [S1] + +## 📖 세부 내용 (Details) +- Basic no-parameter lambda: `auto message = []() { cout << "Hello World!\n"; }; message();`. [S1] +- Lambda with parameters: `auto add = [](int a, int b) { return a + b; }; cout << add(3, 4); // 7`. [S1] +- Passing a lambda to another function: `void myFunction(function func) { func(); func(); } auto message = []() { cout << "Hello World!\n"; }; myFunction(message);` — requires `#include `. [S1] +- Capture by value freezes the value at creation: `int x = 10; auto show = [x]() { cout << x; }; show(); // 10, even if x changes afterward`. [S1] +- Capture by reference sees the LATEST value: `int x = 10; auto show = [&x]() { cout << x; }; x = 20; show(); // 20 — reflects the change made after the lambda was created`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **캡처 방식에 따라 동일한 코드가 다른 결과를 냄**: [x]로 값 캡처하면 람다 생성 시점의 x 값이 고정되지만, [&x]로 참조 캡처하면 이후 x가 바뀐 값을 그대로 반영한다는 점이 동일한 구조의 두 예제(10 vs 20 출력)로 직접 대비되어 증명됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +반복문 안에서 매 순회마다 다른 값을 캡처하는 람다를 즉석에서 정의해 사용하는 패턴(`for (int i = 1; i <= 3; i++) { auto show = [i]() {...}; show(); }`)이 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Capture by value vs. capture by reference producing different output from identical-looking code (C++): +```cpp +int x = 10; +auto showCopy = [x]() { cout << x; }; // captures a frozen copy +auto showRef = [&x]() { cout << x; }; // captures the live variable +x = 20; +showCopy(); // 10 (unaffected by the later change) +showRef(); // 20 (reflects the latest value) +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Functions Recursion]], [[CPP References]], [[CPP OOP]] +- **참조 맥락:** 함수 섹션 마지막 — 객체지향 프로그래밍 기초(OOP Basics) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Lambda Functions — https://www.w3schools.com/cpp/cpp_functions_lambda.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Lambda Functions" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Functions_Recursion.md b/10_Wiki/Dev/Topic_CPP/CPP_Functions_Recursion.md new file mode 100644 index 00000000..fa7c20b3 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Functions_Recursion.md @@ -0,0 +1,72 @@ +--- +id: cpp-functions-recursion +title: "C++ Recursion" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["recursive function", "base case", "factorial recursion", "C++ 재귀"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "functions", "recursion"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_functions_recursion.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Recursion]] + +## 🎯 한 줄 통찰 (One-line insight) +The exact same three examples (range-sum via `sum(k)`, countdown, factorial) with the exact same step-by-step unfolding explanation reappear here verbatim from C's Recursion chapter — confirming C++'s recursion semantics, base-case requirement, and termination risks are inherited from C completely unmodified. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Recursion** — a function calling ITSELF, breaking a complex problem into smaller instances of the same problem. [S1] +- **Base case** — the condition under which the function stops calling itself (`k > 0` becoming false), essential for termination. [S1] +- **Unwinding accumulation** — each recursive call combines its own contribution with the result of the smaller sub-call. [S1] +- **Risk of non-termination or excess resource use** — without a solid base case, recursion can run forever or exhaust memory/processor time. [S1] + +## 📖 세부 내용 (Details) +- Summing 1 to 10 via recursion: `int sum(int k) { if (k > 0) { return k + sum(k - 1); } else { return 0; } }` — unfolds as `10 + (9 + (8 + ... + sum(0)))`. [S1] +- Countdown via recursion: `void countdown(int n) { if (n > 0) { cout << n << " "; countdown(n - 1); } }`. [S1] +- Factorial via recursion: `int factorial(int n) { if (n > 1) { return n * factorial(n - 1); } else { return 1; } }` — factorial(5) = 120. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). C 챕터와 완전히 동일한 재귀 예제와 설명이 확인됨. + +## 🛠️ 적용 사례 (Applied in summary) +5의 팩토리얼(5×4×3×2×1=120)을 재귀로 계산하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +A recursive function with a clear base case that guarantees termination (C++): +```cpp +int factorial(int n) { + if (n > 1) { + return n * factorial(n - 1); + } else { + return 1; // base case + } +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Function Structures]], [[CPP Functions Lambda]], [[C Functions Recursion]] +- **참조 맥락:** 재귀 — 람다 함수(Functions Lambda) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Recursion — https://www.w3schools.com/cpp/cpp_functions_recursion.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Recursion" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Get_Started.md b/10_Wiki/Dev/Topic_CPP/CPP_Get_Started.md new file mode 100644 index 00000000..cdfc2c9d --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Get_Started.md @@ -0,0 +1,70 @@ +--- +id: cpp-get-started +title: "C++ Getting Started" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["installing cpp", "Code::Blocks setup", "C++ 시작하기"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "setup", "ide"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_getstarted.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Get Started]] + +## 🎯 한 줄 통찰 (One-line insight) +The exact same two-tool requirement from C (a text editor plus a separate compiler like GCC) carries over unchanged to C++ — reinforcing that C++'s compiled nature, not just its syntax, is inherited directly from C, and the recommended beginner workflow (Code::Blocks + MinGW, `.cpp` files, Build & Run) is nearly identical to the C tutorial's setup chapter with only the file extension and header differing. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Two required tools** — a text editor and a compiler (e.g. GCC) to translate C++ code into machine-understandable form. [S1] +- **IDE bundling both** — Code::Blocks, Eclipse, Visual Studio package editor + compiler + debugging together. [S1] +- **`.cpp` file extension** — C++ source files are saved with `.cpp`, distinct from C's `.c`. [S1] +- **Web-based editors work but are limited** — same caveat as the C tutorial's setup chapter. [S1] + +## 📖 세부 내용 (Details) +- The verification program used to confirm a working setup: `#include using namespace std; int main() { cout << "Hello World!"; return 0; }` saved as `myfirstprogram.cpp`. [S1] +- Recommended IDE and installer: Code::Blocks via the `mingw-setup.exe` installer (bundles editor + compiler). [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — Code::Blocks + MinGW 조합이 C 튜토리얼과 동일하게 C++ 초보자 환경 구축의 표준 방법으로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +The verification program used to confirm a working C++ compiler setup: +```cpp +#include +using namespace std; +int main() { + cout << "Hello World!"; + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Intro]], [[CPP Syntax]], [[C Get Started]] +- **참조 맥락:** 개발 환경 설정 — 문법(Syntax) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Getting Started — https://www.w3schools.com/cpp/cpp_getstarted.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Getting Started" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Inheritance.md b/10_Wiki/Dev/Topic_CPP/CPP_Inheritance.md new file mode 100644 index 00000000..92a1bd4e --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Inheritance.md @@ -0,0 +1,78 @@ +--- +id: cpp-inheritance +title: "C++ Inheritance" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["base class", "derived class", "C++ 상속"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "oop", "inheritance"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_inheritance.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Inheritance]] + +## 🎯 한 줄 통찰 (One-line insight) +The `Car` class never declares a `brand` attribute or a `honk()` method of its own — it inherits BOTH directly from `Vehicle` via the single `: public Vehicle` syntax, and `myCar.honk()` works exactly as if `honk()` had been written inside `Car` itself, meaning inheritance in C++ isn't a reference or delegation mechanism but a literal MERGING of the parent's members into the child, accessible with zero extra syntax at the call site. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Inheritance** — one class (derived/child) reuses attributes and methods from another (base/parent), avoiding duplication. [S1] +- **`: public BaseClass`** — the syntax for inheriting; placed after the derived class's name. [S1] +- **Zero-syntax access to inherited members** — a child object calls inherited methods and reads inherited attributes exactly like its own, with no special prefix. [S1] +- **Why inherit** — code reusability — reuse an existing class's attributes/methods when creating a new one. [S1] + +## 📖 세부 내용 (Details) +- A child class inheriting an attribute and method from its parent: `class Vehicle { public: string brand = "Ford"; void honk() { cout << "Tuut, tuut! \n"; } }; class Car: public Vehicle { public: string model = "Mustang"; }; Car myCar; myCar.honk(); // inherited from Vehicle cout << myCar.brand + " " + myCar.model; // brand inherited, model is Car's own`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — Vehicle의 brand와 honk()를 Car가 그대로 물려받는 예제가 상속을 통한 코드 재사용의 대표 실전 활용이다. [S1] + +## 💻 코드 패턴 (Code patterns) +A child class inheriting an attribute and method from its parent with zero extra syntax (C++): +```cpp +class Vehicle { // Base class +public: + string brand = "Ford"; + void honk() { cout << "Tuut, tuut! \n"; } +}; +class Car: public Vehicle { // Derived class +public: + string model = "Mustang"; +}; +int main() { + Car myCar; + myCar.honk(); // inherited method, works directly + cout << myCar.brand + " " + myCar.model; + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Encapsulation]], [[CPP Inheritance Access]] +- **참조 맥락:** 상속 섹션 첫 챕터 — 상속 접근 지정자(Inheritance Access) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Inheritance — https://www.w3schools.com/cpp/cpp_inheritance.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Inheritance" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Inheritance_Access.md b/10_Wiki/Dev/Topic_CPP/CPP_Inheritance_Access.md new file mode 100644 index 00000000..5c529595 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Inheritance_Access.md @@ -0,0 +1,71 @@ +--- +id: cpp-inheritance-access +title: "C++ Inheritance Access" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["protected access specifier", "C++ 상속과 protected"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "oop", "inheritance", "protected"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_inheritance_access.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Inheritance Access]] + +## 🎯 한 줄 통찰 (One-line insight) +This chapter reveals WHY `protected` exists as a third option distinct from `private`: a `private` attribute in the base class would be completely UNREACHABLE by the derived class's own methods, forcing awkward workarounds, while `protected` lets `Programmer`'s `setSalary()`/`getSalary()` methods directly manipulate `Employee`'s `salary` field as if it were their own — meaning `protected` specifically solves the "I need child classes to touch this, but nobody else" access pattern that neither `public` nor `private` alone can express. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`protected`** — similar to `private` (inaccessible from OUTSIDE the class), but UNLIKE `private`, accessible from DERIVED (child) classes. [S1] +- **Derived-class methods manipulating a protected base attribute** — `Programmer`'s `setSalary()`/`getSalary()` methods read/write `Employee`'s `protected int salary;` directly, as if it belonged to `Programmer`. [S1] + +## 📖 세부 내용 (Details) +- A protected base attribute manipulated by a derived class's own methods: `class Employee { protected: int salary; }; class Programmer: public Employee { public: int bonus; void setSalary(int s) { salary = s; } int getSalary() { return salary; } }; Programmer myObj; myObj.setSalary(50000); myObj.bonus = 15000;`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **protected는 private과 public 사이의 중간 지점**: 클래스 외부에서는 접근 불가하다는 점에서 private과 같지만, 파생 클래스에서는 접근 가능하다는 점에서 다르다는 것이 확인됨 — 이는 private만으로는 해결 못 하는 "자식 클래스만 접근 허용" 요구를 해결. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +Employee의 protected 급여(salary)를 Programmer 파생 클래스가 자체 getter/setter로 직접 다루는 예제가 protected의 대표 실전 활용 사례로 원문에 직접 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +A protected base attribute directly manipulated by a derived class's own methods (C++): +```cpp +class Employee { +protected: // accessible in derived classes, not outside + int salary; +}; +class Programmer: public Employee { +public: + int bonus; + void setSalary(int s) { salary = s; } + int getSalary() { return salary; } +}; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Inheritance]], [[CPP Access Specifiers]], [[CPP Inheritance Multilevel]] +- **참조 맥락:** 상속과 protected — 다단계 상속(Inheritance Multilevel) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Inheritance Access — https://www.w3schools.com/cpp/cpp_inheritance_access.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Inheritance Access" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Inheritance_Multilevel.md b/10_Wiki/Dev/Topic_CPP/CPP_Inheritance_Multilevel.md new file mode 100644 index 00000000..6611370d --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Inheritance_Multilevel.md @@ -0,0 +1,72 @@ +--- +id: cpp-inheritance-multilevel +title: "C++ Multilevel Inheritance" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["grandchild class", "chained inheritance", "C++ 다단계 상속"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "oop", "inheritance"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_inheritance_multilevel.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Multilevel Inheritance]] + +## 🎯 한 줄 통찰 (One-line insight) +`MyGrandChild` never mentions `MyClass` anywhere in its own declaration — it only inherits from `MyChild`, yet calling `myFunction()` (defined in `MyClass`) works perfectly, proving inheritance CHAINS transitively: a grandchild automatically gets everything its parent has, INCLUDING whatever the parent itself inherited, without needing to re-declare or re-reference the original ancestor at any point in the chain. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Multilevel inheritance** — a class derived from ANOTHER derived class (a chain: grandparent → parent → child). [S1] +- **Transitive inheritance** — the grandchild class automatically has access to the ORIGINAL base class's members, even though it never directly references that base class. [S1] + +## 📖 세부 내용 (Details) +- A three-level inheritance chain: `class MyClass { public: void myFunction() { cout << "Some content in parent class."; } }; class MyChild: public MyClass { }; class MyGrandChild: public MyChild { }; MyGrandChild myObj; myObj.myFunction(); // works, inherited transitively through MyChild`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **상속은 전이적(transitive)으로 작동**: 손자 클래스가 원래의 베이스 클래스를 전혀 언급하지 않아도, 부모를 거쳐 그 기능을 자동으로 물려받는다는 점이 직접 예제로 증명됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — MyClass → MyChild → MyGrandChild의 3단계 상속 체인이 다단계 상속의 개념적 골격을 보여준다. [S1] + +## 💻 코드 패턴 (Code patterns) +A three-level inheritance chain — the grandchild inherits transitively (C++): +```cpp +class MyClass { // grandparent +public: + void myFunction() { cout << "Some content in parent class."; } +}; +class MyChild: public MyClass { }; // parent +class MyGrandChild: public MyChild { }; // child +int main() { + MyGrandChild myObj; + myObj.myFunction(); // works via the full chain + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Inheritance Access]], [[CPP Inheritance Multiple]] +- **참조 맥락:** 다단계 상속 — 다중 상속(Inheritance Multiple) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Multilevel Inheritance — https://www.w3schools.com/cpp/cpp_inheritance_multilevel.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Multilevel Inheritance" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Inheritance_Multiple.md b/10_Wiki/Dev/Topic_CPP/CPP_Inheritance_Multiple.md new file mode 100644 index 00000000..fdc71f6a --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Inheritance_Multiple.md @@ -0,0 +1,77 @@ +--- +id: cpp-inheritance-multiple +title: "C++ Multiple Inheritance" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["comma-separated base classes", "C++ 다중 상속"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "oop", "inheritance"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_inheritance_multiple.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Multiple Inheritance]] + +## 🎯 한 줄 통찰 (One-line insight) +Multiple inheritance is a feature with NO equivalent in most single-inheritance-only OOP languages — one class can inherit from TWO unrelated base classes simultaneously via a comma-separated list (`class MyChildClass: public MyClass, public MyOtherClass`), gaining methods from BOTH parents at once, unlike multilevel inheritance's single linear chain from the previous chapter. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Multiple inheritance** — a class derived from MORE THAN ONE base class, listed comma-separated after `:`. [S1] +- **Distinct from multilevel inheritance** — multilevel is a linear CHAIN (grandparent→parent→child); multiple inheritance is a class combining SEPARATE, unrelated base classes at the SAME level. [S1] +- **Access to all parents' members** — the derived class gains every public method/attribute from EACH listed base class. [S1] + +## 📖 세부 내용 (Details) +- A class inheriting from two unrelated base classes: `class MyClass { public: void myFunction() { cout << "Some content in parent class."; } }; class MyOtherClass { public: void myOtherFunction() { cout << "Some content in another class."; } }; class MyChildClass: public MyClass, public MyOtherClass { }; MyChildClass myObj; myObj.myFunction(); myObj.myOtherFunction(); // both work`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **다중 상속은 다단계 상속과 다른 개념**: 다단계 상속이 부모→자식→손자의 선형 체인이라면, 다중 상속은 서로 무관한 두 베이스 클래스를 같은 단계에서 동시에 상속받는 것이라는 점이 명확히 구분됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — MyClass와 MyOtherClass 양쪽의 메서드를 모두 물려받는 MyChildClass 예제가 다중 상속의 개념적 골격을 보여준다. [S1] + +## 💻 코드 패턴 (Code patterns) +A class inheriting from two unrelated base classes at once (C++): +```cpp +class MyClass { +public: + void myFunction() { cout << "Some content in parent class."; } +}; +class MyOtherClass { +public: + void myOtherFunction() { cout << "Some content in another class."; } +}; +class MyChildClass: public MyClass, public MyOtherClass { }; +int main() { + MyChildClass myObj; + myObj.myFunction(); // from MyClass + myObj.myOtherFunction(); // from MyOtherClass + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Inheritance Multilevel]], [[CPP Polymorphism]] +- **참조 맥락:** 상속 섹션 마지막 — 다형성 및 고급 OOP(Polymorphism & Advanced OOP) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Multiple Inheritance — https://www.w3schools.com/cpp/cpp_inheritance_multiple.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Multiple Inheritance" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Input_Validation.md b/10_Wiki/Dev/Topic_CPP/CPP_Input_Validation.md new file mode 100644 index 00000000..37a27978 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Input_Validation.md @@ -0,0 +1,74 @@ +--- +id: cpp-input-validation +title: "C++ Input Validation" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["cin.clear cin.ignore", "validate integer input", "C++ 입력 검증"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "input-validation", "cin"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_input_validation.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Input Validation]] + +## 🎯 한 줄 통찰 (One-line insight) +`while (!(cin >> number))` works because `cin >>` ITSELF evaluates to a boolean-like failure state when the parse fails — but a FAILED `cin >>` doesn't just fail cleanly, it leaves the STREAM in an error state AND the bad characters still sitting in the input buffer, which is why the fix requires TWO separate repair steps (`cin.clear()` to reset the error flag, `cin.ignore(10000, '\n')` to discard the leftover bad input) — a two-part cleanup ritual with no equivalent in C's simpler `fgets()`+`sscanf()` validation approach. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`cin >> number` as a validity check** — the expression itself is falsy when the input can't be parsed as the target type, usable directly in a `while (!(cin >> number))` loop. [S1] +- **`cin.clear()`** — resets the stream's internal error flags after a failed read, WITHOUT which the stream stays "stuck" in a failed state. [S1] +- **`cin.ignore(10000, '\n')`** — discards up to 10000 leftover characters (or until a newline), removing the bad input that caused the failure so the next read isn't corrupted. [S1] +- **Range validation via do-while** — same pattern as C, repeatedly prompting until the value falls within bounds. [S1] +- **Empty-text validation via `.empty()`** — `string.empty()` checks directly whether a string is blank, cleaner than C's `strlen(name) == 0` check. [S1] + +## 📖 세부 내용 (Details) +- Full integer-validation loop with the required two-step cleanup: `int number; while (!(cin >> number)) { cout << "Invalid input. Try again: "; cin.clear(); cin.ignore(10000, '\n'); }`. [S1] +- Range-bounded input: `int number; do { cin >> number; } while (number < 1 || number > 5);`. [S1] +- Empty-text rejection using `.empty()`: `string name; do { getline(cin, name); } while (name.empty());`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **cin 실패 시 두 단계 복구가 필요함**: 파싱에 실패하면 스트림이 에러 상태에 갇히고 잘못된 입력이 버퍼에 남으므로, cin.clear()로 에러 플래그를 초기화하고 cin.ignore()로 남은 잘못된 입력을 제거하는 두 단계가 모두 필요하다는 점이 C의 fgets+sscanf 방식보다 복잡한 절차로 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +문자를 입력했을 때 "Invalid input. Try again"을 출력하고 다시 물어보는 정수 입력 검증 루프가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Validating integer input with the required two-step stream cleanup after a failed parse (C++): +```cpp +int number; +cout << "Enter a number: "; +while (!(cin >> number)) { + cout << "Invalid input. Try again: "; + cin.clear(); // Reset input errors + cin.ignore(10000, '\n'); // Remove bad input +} +cout << "You entered: " << number; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Exceptions]], [[CPP User Input]], [[CPP Debugging]] +- **참조 맥락:** 입력 검증 — 디버깅(Debugging) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Input Validation — https://www.w3schools.com/cpp/cpp_input_validation.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Input Validation" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Intro.md b/10_Wiki/Dev/Topic_CPP/CPP_Intro.md new file mode 100644 index 00000000..4faa4d76 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Intro.md @@ -0,0 +1,63 @@ +--- +id: cpp-intro +title: "C++ Introduction" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["what is cpp", "C vs C++", "C++ 소개"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "intro"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_intro.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Intro]] + +## 🎯 한 줄 통찰 (One-line insight) +The source reduces the entire C vs C++ distinction to ONE sentence — "C++ supports classes and objects, while C does not" — meaning everything else commonly associated with C++ (templates, STL, inheritance, polymorphism) is really downstream consequence of that single foundational addition, not a separate list of unrelated features layered onto C. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Origin** — created by Bjarne Stroustrup as an extension of C. [S1] +- **Major version history** — updated 5 times: C++11, C++14, C++17, C++20, C++23 (2011/2014/2017/2020/2023). [S1] +- **Cross-platform, high-performance** — used in operating systems, GUIs, and embedded systems. [S1] +- **Object-oriented** — gives clear program structure and enables code reuse, lowering development cost. [S1] +- **The single core C vs C++ difference** — C++ supports classes and objects; C does not. Nearly identical syntax otherwise. [S1] +- **Proximity to C/C#/Java** — makes switching between these languages and C++ relatively easy. [S1] + +## 📖 세부 내용 (Details) +- C++'s five major standard revisions listed explicitly: C++11 (2011), C++14 (2014), C++17 (2017), C++20 (2020), C++23 (2023). [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 운영체제, GUI, 임베디드 시스템이 원문에서 언급된 C++의 대표적 실전 활용 분야다. [S1] + +## 💻 코드 패턴 (Code patterns) +None — this is a conceptual overview page with no standalone code example. + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[C Intro]], [[CPP Get Started]] +- **참조 맥락:** C++ 튜토리얼 첫 챕터 — 개발 환경 설정(Get Started) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Introduction — https://www.w3schools.com/cpp/cpp_intro.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Introduction" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Iterators.md b/10_Wiki/Dev/Topic_CPP/CPP_Iterators.md new file mode 100644 index 00000000..661520e1 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Iterators.md @@ -0,0 +1,85 @@ +--- +id: cpp-iterators +title: "C++ Iterators" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["begin() end()", "vector iterator", "C++ 반복자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "stl", "iterator"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_iterators.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Iterators]] + +## 🎯 한 줄 통찰 (One-line insight) +An iterator is a pointer with a container-agnostic interface — `*it` dereferences and `++it` advances exactly like a raw C pointer walking an array, but the SAME `begin()`/`end()`/`*it`/`++it` syntax works identically across vector, list, deque, set, AND map, which is precisely the capability C's raw pointers never had (a `int*` walking an array shares no interface with a linked-list traversal via `node->next`) — and this uniform interface is *why* for-each loops and generic algorithms like `sort()`/`find()` can operate on any container without being rewritten per container type. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Iterator = a "pointer" to an element** — used to access/iterate through data structures by pointing to elements rather than copying them. [S1] +- **`begin()` / `end()`** — functions belonging to the CONTAINER (not the iterator) that return an iterator to the first element / to one-past-the-last element; `end()` never points to a real element, only marks the stopping condition. [S1] +- **`*it`** — dereference operator, accesses the value the iterator currently points to (and can assign through it: `*it = "Tesla";` modifies the container in place). [S1] +- **`++it`** — advances the iterator to the next element. [S1] +- **`auto` keyword** — lets the compiler infer the verbose iterator type (`vector::iterator`) automatically; works in the loop declaration itself. [S1] +- **For-each vs. iterator** — for-each is simpler for read-only traversal; iterators are required when you need to modify, erase, iterate in reverse, or skip elements during the loop. [S1] +- **`.erase(it)` inside a loop** — removing an element mid-iteration returns the NEXT valid iterator, which is why the erase-loop pattern reassigns `it = cars.erase(it);` instead of also calling `++it`. [S1] +- **`rbegin()` / `rend()`** — reverse-order counterparts to `begin()`/`end()`, for iterating backward. [S1] +- **Iterator support is not universal** — vector, list, deque, map, and set support iterators; stack and queue do NOT. [S1] +- **Iterators power `` functions** — `sort()`, `find()`, etc. take a begin/end iterator pair as parameters rather than the container itself. [S1] + +## 📖 세부 내용 (Details) +- Basic loop: `vector::iterator it; for (it = cars.begin(); it != cars.end(); ++it) { cout << *it; }`. [S1] +- `auto` shorthand: `for (auto it = cars.begin(); it != cars.end(); ++it) { cout << *it; }`. [S1] +- Erase-during-iteration pattern: `for (auto it = cars.begin(); it != cars.end(); ) { if (*it == "BMW") { it = cars.erase(it); } else { ++it; } }` — no `++it` in the header since erase already advances. [S1] +- Reverse iteration: `for (auto it = cars.rbegin(); it != cars.rend(); ++it) { cout << *it; }`. [S1] +- Map iteration needs `->first`/`->second` (arrow, since `it` is a pointer-like object to a pair): `for (auto it = people.begin(); it != people.end(); ++it) { cout << it->first << it->second; }`. [S1] +- `sort(cars.begin(), cars.end());` from `` — the same begin/end pair used for manual loops is reused as the algorithm's range argument. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C의 원시 포인터에는 없던 통일 인터페이스가 도입됨**: C에서 배열은 포인터 산술(`arr + i`)로, 연결 리스트는 `node->next`로 순회 방식이 완전히 달랐지만, C++ iterator는 vector/list/deque/set/map 모두에서 동일한 `begin()`/`end()`/`*it`/`++it` 문법을 재사용한다는 점이 핵심 차이로 확인됨. [S1] +- **stack/queue는 iterator를 지원하지 않음**: vector/list/deque/map/set과 달리, 접근 지점이 의도적으로 제한된 stack과 queue는 iterator 자체를 지원하지 않는다는 점이 명시적으로 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +vector에서 특정 값("BMW")을 가진 요소를 순회 중에 삭제하는 예제가 iterator가 for-each보다 유리한 실전 사례로 원문에서 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Iterator-based erase during traversal — impossible with a simple for-each (C++): +```cpp +#include +vector cars = {"Volvo", "BMW", "Ford", "Mazda"}; + +for (auto it = cars.begin(); it != cars.end(); ) { + if (*it == "BMW") { + it = cars.erase(it); // erase returns the next valid iterator + } else { + ++it; + } +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Maps]], [[CPP Algorithms]], [[CPP Pointers]], [[CPP Auto]] +- **참조 맥락:** 데이터 구조(STL) 섹션 — Algorithms 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Iterators — https://www.w3schools.com/cpp/cpp_iterators.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Iterators" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_List.md b/10_Wiki/Dev/Topic_CPP/CPP_List.md new file mode 100644 index 00000000..168d09ef --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_List.md @@ -0,0 +1,81 @@ +--- +id: cpp-list +title: "C++ List" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["std::list", "doubly linked list C++", "C++ 리스트"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "stl", "list"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_list.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP List]] + +## 🎯 한 줄 통찰 (One-line insight) +`list` is the STL container that most directly replaces what C programmers had to hand-build with `struct Node { int data; Node* next; }` — a linked list that grows anywhere and adds/removes at both ends cheaply — but in exchange for that flexibility it gives up random-access indexing entirely (no `list[i]`), so choosing between vector and list is choosing between C-array-like index speed versus C-linked-list-like two-ended growth, expressed here as a one-line design decision instead of a whole custom data structure. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`list name`** — declared like a vector, e.g. `list cars;`, requires ``. [S1] +- **No index access** — unlike vector, elements cannot be retrieved by `[i]` or `.at(i)`; only `.front()` and `.back()` are available. [S1] +- **Both-ends growth** — `.push_front()` / `.push_back()` add at the beginning/end; `.pop_front()` / `.pop_back()` remove from the beginning/end — vectors only optimize the "back" side. [S1] +- **`.front()` / `.back()` are also mutable** — assigning to `cars.front() = "Opel"` changes the first element directly, since there's no index-based assignment. [S1] +- **Looping restriction** — a traditional indexed `for` loop combined with `.size()` does NOT work for lists (no `cars[i]`); only a for-each loop (or, later, an iterator) can traverse a list. [S1] +- **`.size()` / `.empty()`** — same semantics as vector. [S1] + +## 📖 세부 내용 (Details) +- Declaration with initial values: `list cars = {"Volvo", "BMW", "Ford", "Mazda"};`. [S1] +- Add: `cars.push_front("Tesla"); cars.push_back("VW");`. [S1] +- Remove: `cars.pop_front(); cars.pop_back();`. [S1] +- The page explicitly shows the broken indexed-loop attempt (`for (int i = 0; i < cars.size(); i++) { cout << cars[i]; }`) as something that will NOT compile, then gives the working for-each replacement. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **인덱스 접근 자체가 존재하지 않음**: vector는 배열처럼 인덱스 접근이 가능했지만, list는 순차 연결 구조이기 때문에 인덱스 접근 자체가 언어 차원에서 불가능하다는 점이 이번 챕터에서 vector와의 핵심 차이로 명시됨. [S1] +- **양쪽 끝 삽입/삭제가 대칭적으로 지원됨**: vector는 뒤쪽(push_back/pop_back)에만 최적화되어 있었지만, list는 앞/뒤 양쪽 모두 push_front/pop_front, push_back/pop_back으로 대칭적으로 지원한다는 점이 vector와 대비됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 자동차 이름 리스트의 양 끝에 원소를 추가/삭제하는 예제가 원문에서 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +List-specific operations unavailable on vector — both-ends push/pop (C++): +```cpp +#include +list cars = {"Volvo", "BMW", "Ford", "Mazda"}; + +cars.push_front("Tesla"); // add at beginning +cars.push_back("VW"); // add at end +cars.pop_front(); // remove from beginning +cars.pop_back(); // remove from end + +// No index access — must use for-each: +for (string car : cars) { + cout << car << "\n"; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Vectors]], [[CPP Stacks]], [[CPP Data Structures]], [[C Pointers]] +- **참조 맥락:** 데이터 구조(STL) 섹션 — Stacks 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ List — https://www.w3schools.com/cpp/cpp_list.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ List" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Maps.md b/10_Wiki/Dev/Topic_CPP/CPP_Maps.md new file mode 100644 index 00000000..27c02a2d --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Maps.md @@ -0,0 +1,82 @@ +--- +id: cpp-maps +title: "C++ Maps" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["std::map", "key-value pairs C++", "C++ 맵"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "stl", "map"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_maps.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Maps]] + +## 🎯 한 줄 통찰 (One-line insight) +`map` reuses set's "auto-sort + unique" behavior but shifts what must be unique from the ELEMENT itself to just the KEY, letting VALUES repeat freely — and it overloads `[]` with a dual meaning no other container has: `people["Jenny"] = 22;` on a key that doesn't exist SILENTLY CREATES it (unlike vector's `[]`, which never grows the container), meaning map's `[]` is simultaneously a read, a write, AND an insert operator depending on context, a three-way overload that requires `.at()` or `.count()` when you need to tell those cases apart. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`map name`** — two type parameters instead of one, e.g. `map people;`; requires ``. [S1] +- **Unique keys, non-unique values** — like set's uniqueness rule but applied only to the key half of each pair; values can repeat freely. [S1] +- **Auto-sorted by key** — same ascending-order-by-default behavior as set, reversible with `greater` as the third template parameter. [S1] +- **`[]` as read/write/insert** — `people["John"]` reads the value for an existing key, `people["John"] = 50;` overwrites it, and `people["Jenny"] = 22;` on a NEW key silently inserts it — three distinct behaviors under one syntax. [S1] +- **`.at()`** — safer read/write alternative that throws if the key doesn't exist, unlike `[]` which would silently create a new entry instead of erroring. [S1] +- **`.insert({key, value})`** — explicit alternative to `[]` for adding; if the key already exists, the insert is silently ignored (first value wins, matching set's duplicate-drop behavior). [S1] +- **`.count(key)`** — returns 1/0 to check key existence without risking an accidental insert. [S1] +- **Looping requires `auto` + `.first`/`.second`** — `for (auto person : people) { cout << person.first << person.second; }`, since each element is a key-value pair, not a single value. [S1] + +## 📖 세부 내용 (Details) +- Declaration: `map people = { {"John", 32}, {"Adele", 45}, {"Bo", 29} };`. [S1] +- Access: `people["John"]`, `people.at("Adele")`; `.at()` throws for a missing key (`people.at("Jenny")` errors), while `people["Jenny"]` would just create it. [S1] +- Duplicate-key insert is ignored: `people.insert({"Jenny", 22}); people.insert({"Jenny", 30});` keeps only 22. [S1] +- Existence check without mutation: `people.count("John")` returns 1. [S1] +- Loop pattern: `for (auto person : people) { cout << person.first << " is: " << person.second << "\n"; }` — output is sorted by key (Adele, Bo, John), not insertion order. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **[] 연산자가 vector와 다르게 동작함**: vector의 []는 존재하는 인덱스만 읽고 범위를 벗어나면 정의되지 않은 동작이었지만, map의 []는 존재하지 않는 키에 값을 대입하면 조용히 새 요소를 생성한다는 점이 vector와의 핵심 차이로 확인됨. [S1] +- **set의 고유성 규칙이 키에만 적용되도록 완화됨**: set은 요소 전체가 고유해야 했지만, map은 키만 고유하면 되고 값은 자유롭게 중복될 수 있다는 점이 set 규칙의 부분적 완화로 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +사람 이름과 나이를 저장하는 map에서 값을 읽고, 수정하고, .count()로 존재 여부를 확인하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Map's `[]` reads, writes, AND silently inserts depending on context (C++): +```cpp +#include +map people = { {"John", 32}, {"Adele", 45}, {"Bo", 29} }; + +people["Jenny"] = 22; // key doesn't exist -> silently inserted +cout << people.at("Adele"); // safe read, throws if missing +cout << people.count("John"); // 1 if exists, 0 if not -- no risk of insert + +for (auto person : people) { // sorted by key: Adele, Bo, Jenny, John + cout << person.first << " is: " << person.second << "\n"; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Sets]], [[CPP Iterators]], [[CPP Data Structures]] +- **참조 맥락:** 데이터 구조(STL) 섹션 — Iterators 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Maps — https://www.w3schools.com/cpp/cpp_maps.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Maps" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Math.md b/10_Wiki/Dev/Topic_CPP/CPP_Math.md new file mode 100644 index 00000000..7c1a2812 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Math.md @@ -0,0 +1,67 @@ +--- +id: cpp-math +title: "C++ Math" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["max min functions", "cmath library", "C++ 수학 함수"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "math", "cmath"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_math.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Math]] + +## 🎯 한 줄 통찰 (One-line insight) +`max()` and `min()` are used with NO header include shown in the source's own examples, while `sqrt()`, `round()`, and `log()` explicitly require `#include ` — a distinction the source draws implicitly through its section structure (max/min presented first, standalone; `` functions grouped separately under their own header requirement), suggesting C++ split basic comparison-style math from the broader mathematical function library across different availability boundaries. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`max(x, y)`** — returns the higher of two values. [S1] +- **`min(x, y)`** — returns the lower of two values. [S1] +- **`` header** — required for broader math functions: `sqrt()` (square root), `round()` (rounds a number), `log()` (natural logarithm), and more. [S1] + +## 📖 세부 내용 (Details) +- Basic max/min: `cout << max(5, 10); cout << min(5, 10);`. [S1] +- cmath-based functions: `#include cout << sqrt(64); cout << round(2.6); cout << log(2);`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — sqrt/round/log 등 cmath 함수들이 이후 챕터의 다양한 계산 로직에서 재사용될 수 있는 기본 도구다. [S1] + +## 💻 코드 패턴 (Code patterns) +Using cmath library functions for square root, rounding, and logarithm (C++): +```cpp +#include +cout << sqrt(64); // 8 +cout << round(2.6); // 3 +cout << log(2); // 0.693147... +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Strings Numbers]], [[CPP Booleans]], [[C Math]] +- **참조 맥락:** 수학 섹션 유일 챕터 — 불리언(Booleans) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Math — https://www.w3schools.com/cpp/cpp_math.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Math" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Memory_Management.md b/10_Wiki/Dev/Topic_CPP/CPP_Memory_Management.md new file mode 100644 index 00000000..a0c2ba9e --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Memory_Management.md @@ -0,0 +1,70 @@ +--- +id: cpp-memory-management +title: "C++ Memory Management" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["memory management overview", "when to manage memory", "C++ 메모리 관리"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "memory-management"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_memory_management.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Memory Management]] + +## 🎯 한 줄 통찰 (One-line insight) +The source draws a sharp line between two memory scenarios rather than presenting C++ as "always manual" — normal variables (`int x = 10;`) are ALWAYS handled automatically by the compiler, and manual management only becomes YOUR job when you need to create memory WHILE THE PROGRAM RUNS (e.g. based on user input) — meaning the choice to manage memory manually is triggered by a specific need (unknown-size, runtime-determined data), not a default C++ obligation for every variable. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Automatic memory for normal variables** — `int myNumber = 10;` is fully handled by the compiler; no manual management needed. [S1] +- **`sizeof`** — checks how much memory a type uses, same as C. [S1] +- **Manual management triggers** — needed specifically when creating memory AT RUNTIME (e.g. size depends on user input), not for ordinary declared variables. [S1] +- **Risk of mismanagement** — using too much memory, or forgetting to release it, causes slow performance or crashes. [S1] +- **Preview of the tool** — pointers let you access/change memory directly; the NEXT chapter introduces `new` (create) and `delete` (free) for manual memory. [S1] + +## 📖 세부 내용 (Details) +- Confirming basic type sizes via sizeof: `int myInt; float myFloat; double myDouble; char myChar; cout << sizeof(myInt); // 4 cout << sizeof(myDouble); // 8`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **수동 메모리 관리는 특정 상황에서만 필요**: 일반 변수는 항상 컴파일러가 자동으로 처리하며, 사용자 입력 기반 등 실행 중 크기가 결정되는 메모리를 만들 때만 수동 관리가 필요하다는 점이 명확히 구분됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 이 챕터가 개관하는 자동/수동 메모리 관리의 경계가 다음 챕터(new/delete)의 구체적 예제로 이어진다. [S1] + +## 💻 코드 패턴 (Code patterns) +Checking the actual byte sizes of C++'s basic types with sizeof (C++): +```cpp +int myInt; +float myFloat; +double myDouble; +char myChar; +cout << sizeof(myInt) << "\n"; // 4 bytes +cout << sizeof(myDouble) << "\n"; // 8 bytes +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Pointers Modify]], [[CPP Memory Management New]], [[C Memory Management]] +- **참조 맥락:** 메모리 관리 개관 — new/delete(Memory Management New) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Memory Management — https://www.w3schools.com/cpp/cpp_memory_management.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Memory Management" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Memory_Management_New.md b/10_Wiki/Dev/Topic_CPP/CPP_Memory_Management_New.md new file mode 100644 index 00000000..390742ee --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Memory_Management_New.md @@ -0,0 +1,75 @@ +--- +id: cpp-memory-management-new +title: "C++ new and delete" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["new keyword", "delete keyword", "new[] delete[]", "dynamic arrays", "C++ new와 delete"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "memory-management", "new", "delete"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_memory_management_new.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP new and delete]] + +## 🎯 한 줄 통찰 (One-line insight) +C++'s `new`/`delete` pair REPLACES C's `malloc()`/`free()` pair entirely, but with a critical syntactic split C never had: single values use plain `new`/`delete`, while ARRAYS require the bracketed `new[]`/`delete[]` forms specifically — mismatching them (using plain `delete` on an array allocated with `new[]`) is exactly the kind of subtle bug this language-level distinction exists to prevent, unlike C where `malloc()`/`free()` work identically for both single values and arrays. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`new type`** — allocates memory for ONE value of `type`, returning a pointer to it. [S1] +- **`delete pointer;`** — releases memory allocated with plain `new`. [S1] +- **`new type[count]`** — allocates memory for an ARRAY of `count` elements; REQUIRES the bracketed form, not plain `new`. [S1] +- **`delete[] pointer;`** — releases memory allocated with `new[]`; must match the array form, not plain `delete`. [S1] +- **Memory leak** — forgetting `delete` doesn't crash the program immediately, but memory usage grows over time, eventually slowing or crashing it. [S1] +- **When to use `new`** — only when the required memory amount is unknown in advance (e.g. depends on user input) or full manual control is needed; ordinary variables never need it. [S1] + +## 📖 세부 내용 (Details) +- Basic single-value allocation: `int* ptr = new int; *ptr = 35; cout << *ptr; delete ptr;`. [S1] +- Dynamic array allocation sized by runtime user input: `int numGuests; cin >> numGuests; string* guests = new string[numGuests]; for (int i = 0; i < numGuests; i++) { getline(cin, guests[i]); } delete[] guests;` — array size determined entirely at runtime, impossible with a fixed-size array. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **배열용 new[]/delete[]와 단일 값용 new/delete는 반드시 짝을 맞춰야 함**: C의 malloc()/free()는 단일 값과 배열 모두에 동일하게 쓰이지만, C++는 배열엔 반드시 new[]/delete[]를, 단일 값엔 new/delete를 써야 한다는 점이 명시적으로 구분됨 — 짝을 맞추지 않으면 문제가 생길 수 있음이 암시됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +호텔 투숙객 수를 사용자에게 입력받아 그만큼의 이름을 저장할 동적 배열을 만드는 예제가 원문에서 직접 실전 활용 사례로 제시됨(배열 크기를 실행 중에 결정해야 하는 상황). [S1] + +## 💻 코드 패턴 (Code patterns) +A dynamic array sized at runtime by user input, freed with the matching delete[] form (C++): +```cpp +int numGuests; +cout << "How many guests? "; +cin >> numGuests; +string* guests = new string[numGuests]; +cin.ignore(); +for (int i = 0; i < numGuests; i++) { + getline(cin, guests[i]); +} +delete[] guests; // must match new[] with delete[] +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Memory Management]], [[CPP Functions]], [[C Memory Allocate]] +- **참조 맥락:** 참조·포인터·메모리 섹션 마지막 — 함수(Functions) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ new and delete — https://www.w3schools.com/cpp/cpp_memory_management_new.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ new and delete" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Namespaces.md b/10_Wiki/Dev/Topic_CPP/CPP_Namespaces.md new file mode 100644 index 00000000..b452f821 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Namespaces.md @@ -0,0 +1,73 @@ +--- +id: cpp-namespaces +title: "C++ Namespaces" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["namespace keyword", "std namespace", "C++ 네임스페이스"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "namespaces"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_namespaces.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Namespaces]] + +## 🎯 한 줄 통찰 (One-line insight) +This chapter finally reveals WHAT `std` actually is, after every prior chapter used `using namespace std;` without explanation — `cout`, `cin`, and `endl` all belong to a namespace literally named `std` (for "standard"), meaning the tutorial's own beginner convention of writing `using namespace std;` at the top of every program has been silently invoking the SAME feature this chapter formally introduces, retroactively explaining dozens of earlier code examples. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Namespace** — groups related code under a name to avoid naming conflicts, like a "folder" that lets the same variable name exist in two places without clashing. [S1] +- **`namespace Name { ... }`** — declares a namespace; members accessed via `Name::member`. [S1] +- **`using namespace Name;`** — imports a namespace's members so they can be used WITHOUT the `Name::` prefix — convenient but risks name conflicts in large programs. [S1] +- **`std`** — the Standard Library's namespace; `cout`, `cin`, `endl` all belong to it, which is why `std::cout` is the "full" form and `using namespace std;` is what makes plain `cout` work. [S1] +- **Scale-dependent recommendation** — `using namespace std;` is fine for small/learning programs; explicit `std::` prefixes are safer in large projects to avoid conflicts between libraries. [S1] + +## 📖 세부 내용 (Details) +- Basic custom namespace: `namespace MyNamespace { int x = 42; } cout << MyNamespace::x;`. [S1] +- Importing a namespace to drop the prefix: `using namespace MyNamespace; cout << x; // no need for MyNamespace::x`. [S1] +- The std namespace explained retroactively: `std::cout << "Hello World!\n";` (without `using namespace std;`) versus `using namespace std; cout << "Hello World!\n";` (with it). [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **std가 실제로는 네임스페이스였음이 뒤늦게 공개됨**: 이전의 모든 챕터에서 설명 없이 써온 using namespace std;가 사실 이 챕터에서 정식으로 소개하는 네임스페이스 기능을 그대로 사용한 것이었다는 점이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 대규모 프로젝트에서는 using namespace std; 대신 std::를 명시적으로 쓰는 것이 라이브러리 간 이름 충돌을 방지하는 실전 관행으로 권장됨. [S1] + +## 💻 코드 패턴 (Code patterns) +A custom namespace, accessed both explicitly and via using (C++): +```cpp +namespace MyNamespace { + int x = 42; +} +int main() { + cout << MyNamespace::x; // explicit form + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Templates]], [[CPP Syntax]], [[CPP Strings Namespace]], [[CPP Scope]] +- **참조 맥락:** 네임스페이스 — 변수 스코프(Scope) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Namespaces — https://www.w3schools.com/cpp/cpp_namespaces.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Namespaces" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_New_Lines.md b/10_Wiki/Dev/Topic_CPP/CPP_New_Lines.md new file mode 100644 index 00000000..17d35dee --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_New_Lines.md @@ -0,0 +1,69 @@ +--- +id: cpp-new-lines +title: "C++ New Lines" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["\\n vs endl", "escape sequence", "C++ 줄바꿈"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "newline", "endl"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_new_lines.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP New Lines]] + +## 🎯 한 줄 통찰 (One-line insight) +C++ offers TWO distinct ways to create a new line — the escape sequence `\n` and the `endl` manipulator — and the source explicitly states both do the same visible job but `\n` is "most used," meaning `endl` is a genuine C++-specific alternative to `\n` that C's `printf()` never had, since manipulators (objects that modify stream behavior via `<<`) are a C++-only I/O stream concept. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`\n`** — the escape sequence for a new line, same concept as in C; can be embedded inside a string OR appended via a separate `<<` operator. [S1] +- **`endl`** — a C++-specific stream MANIPULATOR that also breaks lines, inserted via `<<` like a regular value. [S1] +- **Doubled `\n` produces a blank line** — same behavior as C. [S1] +- **`\n` is more commonly used** than `endl`, despite both being valid. [S1] +- **Other escape sequences** — `\t` (tab), `\\` (backslash), `\"` (double quote) — same set as C. [S1] + +## 📖 세부 내용 (Details) +- Newline embedded in a string: `cout << "Hello World! \n"; cout << "I am learning C++";`. [S1] +- Newline appended via a separate `<<`: `cout << "Hello World!" << "\n";`. [S1] +- Blank line via doubled `\n`: `cout << "Hello World!" << "\n\n";`. [S1] +- Using the `endl` manipulator instead: `cout << "Hello World!" << endl; cout << "I am learning C++";`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **endl은 C++ 고유의 스트림 조작자**: \n과 같은 결과를 내지만, endl은 <<로 삽입되는 스트림 매니퓰레이터라는 C++만의 개념으로, C의 printf()에는 대응 개념이 없다는 점이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — \n과 endl 중 \n이 더 널리 쓰인다는 점이 실전 코드 스타일 선택의 기준으로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Using the endl manipulator as an alternative to \n (C++): +```cpp +cout << "Hello World!" << endl; +cout << "I am learning C++"; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Output Numbers]], [[CPP Variables]], [[C Newline]] +- **참조 맥락:** Basics 섹션 마지막 — 변수(Variables) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ New Lines — https://www.w3schools.com/cpp/cpp_new_lines.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ New Lines" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_OOP.md b/10_Wiki/Dev/Topic_CPP/CPP_OOP.md new file mode 100644 index 00000000..1c17307c --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_OOP.md @@ -0,0 +1,62 @@ +--- +id: cpp-oop +title: "C++ OOP" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["object-oriented programming", "DRY principle", "procedural vs OOP", "C++ 객체지향 프로그래밍"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "oop"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_oop.asp"] +applied_in: [] +github_commit: "" +--- + +# [[C++ OOP]] + +## 🎯 한 줄 통찰 (One-line insight) +The single-sentence distinction the source draws between procedural and object-oriented programming is organizational, not functional — procedural code is "organized around FUNCTIONS," OOP code is "organized around OBJECTS" that BUNDLE data and functions together — meaning the shift to OOP throughout this section of the tutorial isn't introducing new capabilities C++ lacked before, but reorganizing the SAME capabilities (variables, functions) around a different unit of grouping. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **OOP (Object-Oriented Programming)** — organizing code around "objects" that hold both data and functions operating on that data. [S1] +- **Class vs. object** — a class defines what an object should look like (a template); an object is created FROM a class and inherits its variables/functions. [S1] +- **DRY principle** — "Don't Repeat Yourself"; move repeated code into functions or classes and reuse it. [S1] +- **OOP advantages** — clearer program structure, easier maintenance/reuse/debugging, DRY-friendly, enables building full reusable applications faster. [S1] +- **Procedural vs. OOP** — procedural organizes code around FUNCTIONS operating on data; OOP organizes code around OBJECTS that contain both data and functions together. [S1] + +## 📖 세부 내용 (Details) +- The Class → Objects mapping example: Fruit class → Apple/Banana/Mango objects; Car class → Volvo/Audi/Toyota objects. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 이 챕터의 클래스-객체 개념 개관이 다음 챕터(Classes and Objects)의 실전 코드로 바로 이어진다. [S1] + +## 💻 코드 패턴 (Code patterns) +None — this is a conceptual overview page with no standalone code example. + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Functions Lambda]], [[CPP Classes]] +- **참조 맥락:** OOP 섹션 첫 챕터 — 클래스와 객체(Classes) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ OOP — https://www.w3schools.com/cpp/cpp_oop.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ OOP" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Operators.md b/10_Wiki/Dev/Topic_CPP/CPP_Operators.md new file mode 100644 index 00000000..3c93c3ca --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Operators.md @@ -0,0 +1,65 @@ +--- +id: cpp-operators +title: "C++ Operators" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["operator categories", "C++ 연산자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.82 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "operators"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_operators.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Operators]] + +## 🎯 한 줄 통찰 (One-line insight) +C++ organizes operators into the SAME five categories as C (Arithmetic, Assignment, Comparison, Logical, Bitwise) — but unlike C's equivalent chapter, which explicitly labeled Bitwise as "advanced," C++'s overview lists it as an ordinary fifth category with no such qualifier, suggesting the tutorial treats bitwise operations as standard-tier knowledge rather than a specially-flagged advanced topic. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Operator** — performs an operation on variables and/or values. [S1] +- **Five operator categories** — Arithmetic, Assignment, Comparison, Logical, Bitwise. [S1] +- **Uniform operand handling** — the same operator works on literal-literal, variable-literal, and variable-variable combinations identically. [S1] + +## 📖 세부 내용 (Details) +- Chained addition using literals and variables interchangeably: `int sum1 = 100 + 50; int sum2 = sum1 + 250; int sum3 = sum2 + sum2;` — evaluates to 150, 400, 800. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **비트 연산자가 "고급"으로 별도 표시되지 않음**: C 튜토리얼은 비트 연산자를 명시적으로 "advanced"라고 표시했지만, C++ 튜토리얼의 이 개관 챕터에서는 그런 수식어 없이 다섯 번째 일반 카테고리로만 나열됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 이 챕터가 제시하는 5개 연산자 분류가 이후 각 챕터 학습의 로드맵 역할을 한다. [S1] + +## 💻 코드 패턴 (Code patterns) +The + operator working uniformly across literals, a variable+literal, and variable+variable (C++): +```cpp +int sum1 = 100 + 50; // 150 (100 + 50) +int sum2 = sum1 + 250; // 400 (150 + 250) +int sum3 = sum2 + sum2; // 800 (400 + 400) +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.82 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Data Types RealLife]], [[CPP Operators Arithmetic]] +- **참조 맥락:** 연산자 섹션 개관 — 산술 연산자(Operators Arithmetic) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Operators — https://www.w3schools.com/cpp/cpp_operators.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Operators" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Operators_Arithmetic.md b/10_Wiki/Dev/Topic_CPP/CPP_Operators_Arithmetic.md new file mode 100644 index 00000000..71217864 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Operators_Arithmetic.md @@ -0,0 +1,71 @@ +--- +id: cpp-operators-arithmetic +title: "C++ Arithmetic Operators" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["integer division", "increment decrement", "C++ 산술 연산자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "operators", "arithmetic"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_operators_arithmetic.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Arithmetic Operators]] + +## 🎯 한 줄 통찰 (One-line insight) +Integer division truncation carries over from C completely unchanged — `10 / 3` still yields `3` in C++, and the fix is identical too (use `double` operands: `10.0 / 3` gives `3.333...`) — confirming that C++'s arithmetic semantics for the basic numeric types are inherited from C wholesale, not just its syntax. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Seven core arithmetic operators** — `+`, `-`, `*`, `/`, `%` (modulus), `++` (increment), `--` (decrement) — identical set to C. [S1] +- **Integer division truncation** — dividing two `int`s always yields an `int`, discarding any decimal remainder; use `double` operands for a decimal result. [S1] +- **Increment/decrement round-trip** — incrementing then decrementing the same variable returns it to its original value. [S1] + +## 📖 세부 내용 (Details) +- All seven operators demonstrated with chained cout output: `int x = 10; int y = 3; cout << (x + y) << "\n"; // 13 ... cout << (x % y) << "\n"; // 1`. [S1] +- Integer vs decimal division contrast: `int x = 10; int y = 3; cout << (x / y); // 3 (integer division)` versus `double a = 10.0; double b = 3.0; cout << (a / b); // 3.333...`. [S1] +- Real-life counting example: `int peopleInRoom = 0; peopleInRoom++; peopleInRoom++; peopleInRoom++; // 3 people enter cout << peopleInRoom; // 3` then `peopleInRoom--; // 2`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C와 완전히 동일한 정수 나눗셈 절삭**: int끼리 나누면 소수점이 버려진다는 점과 그 해결책(double 사용)이 C 챕터와 동일하게 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +방에 들어오고 나가는 사람 수를 ++/--로 세는 카운터 예제가 원문에서 직접 실전 활용 사례로 제시됨(C 챕터와 동일한 예제). [S1] + +## 💻 코드 패턴 (Code patterns) +Integer division truncates; use double operands for a decimal result (C++): +```cpp +int x = 10; +int y = 3; +cout << (x / y); // Integer division, result is 3 + +double a = 10.0; +double b = 3.0; +cout << (a / b); // Decimal division, result is 3.333... +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Operators]], [[CPP Operators Assignment]], [[C Operators Arithmetic]] +- **참조 맥락:** 산술 연산자 — 대입 연산자(Operators Assignment) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Arithmetic Operators — https://www.w3schools.com/cpp/cpp_operators_arithmetic.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Arithmetic Operators" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Operators_Assignment.md b/10_Wiki/Dev/Topic_CPP/CPP_Operators_Assignment.md new file mode 100644 index 00000000..ba75d405 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Operators_Assignment.md @@ -0,0 +1,67 @@ +--- +id: cpp-operators-assignment +title: "C++ Assignment Operators" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["compound assignment", "+= -= *=", "C++ 대입 연산자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "operators", "assignment"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_operators_assignment.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Assignment Operators]] + +## 🎯 한 줄 통찰 (One-line insight) +This chapter explicitly explains WHY these operators are called "compound" — they combine a regular operator (`+`, `-`, `*`, etc.) with the assignment operator (`=`) into ONE single operator (`+=` = `+` combined with `=`) — a naming rationale C's equivalent chapter never spelled out, even though the underlying expansion rule (`x OP= y` ≡ `x = x OP y`) is identical between the two languages. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`=`** — basic assignment. [S1] +- **Compound assignment operators** — `+=`, `-=`, `*=`, `/=`, `%=`, `&=`, `|=`, `^=`, `>>=`, `<<=`, each expanding to `x = x value`. [S1] +- **"Compound" naming rationale** — explicitly explained as combining a regular operator with `=` into one operator symbol. [S1] +- **Purpose** — pure shorthand for readability/brevity, especially when updating the same variable repeatedly. [S1] + +## 📖 세부 내용 (Details) +- Basic compound usage: `int x = 10; x += 5; // same as x = x + 5 cout << x; // 15 x *= 2; // same as x = x * 2 cout << x; // 30`. [S1] +- Real-life savings tracker: `int savings = 100; savings += 50; cout << "Total savings: " << savings;`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). C 챕터와 동일한 확장 규칙이 확인되었으나, "compound"라는 명칭의 유래(연산자+대입 결합)를 이 챕터가 더 명시적으로 설명함. + +## 🛠️ 적용 사례 (Applied in summary) +저축액에 50을 더하는 savings += 50 예제가 원문에서 직접 실전 활용 사례로 제시됨(계좌 잔액 누적 갱신). [S1] + +## 💻 코드 패턴 (Code patterns) +Tracking a running total using the compound addition-assignment operator (C++): +```cpp +int savings = 100; +savings += 50; // add 50 to savings +cout << "Total savings: " << savings; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Operators Arithmetic]], [[CPP Operators Comparison]], [[C Operators Assignment]] +- **참조 맥락:** 대입 연산자 — 비교 연산자(Operators Comparison) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Assignment Operators — https://www.w3schools.com/cpp/cpp_operators_assignment.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Assignment Operators" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Operators_Comparison.md b/10_Wiki/Dev/Topic_CPP/CPP_Operators_Comparison.md new file mode 100644 index 00000000..288d9a6c --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Operators_Comparison.md @@ -0,0 +1,67 @@ +--- +id: cpp-operators-comparison +title: "C++ Comparison Operators" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["== != > <", "boolean 1 or 0", "C++ 비교 연산자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "operators", "comparison"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_operators_comparison.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Comparison Operators]] + +## 🎯 한 줄 통찰 (One-line insight) +Even though C++ has a genuine `bool` type (unlike C, which needed ``), comparison operators STILL return the SAME 1/0 integer convention as C, not a distinct boolean-labeled value — meaning `cout << (x > y)` prints `1`, not `true`, showing that C++'s richer type system didn't change the underlying comparison-result representation inherited from C. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Six comparison operators** — `==`, `!=`, `>`, `<`, `>=`, `<=` — identical set to C. [S1] +- **Integer return value** — every comparison returns `1` (true) or `0` (false), printable directly via `cout <<` with no format specifier. [S1] +- **Practical decision-making use** — comparisons drive if/else logic (covered in upcoming chapters). [S1] + +## 📖 세부 내용 (Details) +- Basic greater-than check: `int x = 5; int y = 3; cout << (x > y); // returns 1 (true)`. [S1] +- Voting age eligibility check: `int age = 18; cout << (age >= 18) << "\n"; // 1 (true) cout << (age < 18) << "\n"; // 0 (false)`. [S1] +- Password length check: `int passwordLength = 5; cout << (passwordLength >= 8) << "\n"; // 0 (false), too short`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **bool 타입이 있어도 비교 결과는 여전히 1/0 정수**: C++가 진짜 bool 타입을 갖췄음에도 비교 연산 결과는 true/false 문자열이 아니라 여전히 1/0 정수로 출력된다는 점이 확인됨 — C의 관례가 그대로 이어짐. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +투표 가능 연령 확인(age >= 18)과 비밀번호 길이 확인(passwordLength >= 8)이 원문에서 직접 실전 활용 사례로 제시됨(C 챕터와 동일한 예제). [S1] + +## 💻 코드 패턴 (Code patterns) +Comparison operators still returning plain integers (1 or 0), despite C++ having a genuine bool type (C++): +```cpp +int age = 18; +cout << (age >= 18) << "\n"; // 1 (true), old enough to vote +cout << (age < 18) << "\n"; // 0 (false) +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Operators Assignment]], [[CPP Operators Logical]], [[CPP Data Types Bool]] +- **참조 맥락:** 비교 연산자 — 논리 연산자(Operators Logical) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Comparison Operators — https://www.w3schools.com/cpp/cpp_operators_comparison.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Comparison Operators" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Operators_Logical.md b/10_Wiki/Dev/Topic_CPP/CPP_Operators_Logical.md new file mode 100644 index 00000000..45739df3 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Operators_Logical.md @@ -0,0 +1,65 @@ +--- +id: cpp-operators-logical +title: "C++ Logical Operators" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["&& || !", "logical AND OR NOT", "C++ 논리 연산자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "operators", "logical"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_operators_logical.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Logical Operators]] + +## 🎯 한 줄 통찰 (One-line insight) +The source labels these results "true (1) or false (0)" in the SAME breath, explicitly pairing the boolean word with its integer representation — a small but telling detail showing C++ treats `true`/`false` as just readable NAMES for the underlying 1/0 values rather than a genuinely distinct data representation, consistent with the Comparison Operators chapter's finding. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`&&` (AND)** — returns true only if BOTH statements are true. [S1] +- **`||` (OR)** — returns true if AT LEAST ONE statement is true. [S1] +- **`!` (NOT)** — reverses the result. [S1] +- **True(1)/False(0) duality** — the source explicitly writes results as "true (1) or false (0)," reinforcing that boolean values ARE their integer representation, not a separate concept. [S1] + +## 📖 세부 내용 (Details) +- The three operators listed with example expressions: `x < 5 && x < 10` (AND), `x < 5 || x < 4` (OR), `!(x < 5 && x < 10)` (NOT). [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 이 챕터가 소개하는 세 논리 연산자가 이후 조건문 내 논리 연산(Conditions Logical) 챕터의 실전 응용으로 이어진다. [S1] + +## 💻 코드 패턴 (Code patterns) +Combining two conditions with logical AND (C++): +```cpp +int x = 4; +cout << (x < 5 && x > 2); // 1 (true) — both conditions hold +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Operators Comparison]], [[CPP Operators Precedence]], [[CPP Conditions Logical]] +- **참조 맥락:** 논리 연산자 — 연산자 우선순위(Operators Precedence) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Logical Operators — https://www.w3schools.com/cpp/cpp_operators_logical.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Logical Operators" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Operators_Precedence.md b/10_Wiki/Dev/Topic_CPP/CPP_Operators_Precedence.md new file mode 100644 index 00000000..57ab2331 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Operators_Precedence.md @@ -0,0 +1,66 @@ +--- +id: cpp-operators-precedence +title: "C++ Operator Precedence" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["order of operations", "parentheses precedence", "C++ 연산자 우선순위"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "operators", "precedence"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_operators_precedence.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Operator Precedence]] + +## 🎯 한 줄 통찰 (One-line insight) +The precedence hierarchy and left-to-right associativity rule are IDENTICAL to C's version, right down to the exact same worked examples (`2 + 3 * 4` = 14, `10 - 2 + 5` = 13) — meaning C++ programmers can reuse C's mental model for expression evaluation without any adjustment, since neither the ranking of operator tiers nor the tie-breaking rule for same-tier operators changed. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Precedence hierarchy (highest to lowest)** — `()` → `*`/`/`/`%` → `+`/`-` → comparison (`>`,`<`,`>=`,`<=`) → equality (`==`,`!=`) → `&&` → `||` → `=`. [S1] +- **Multiplication before addition** — `2 + 3 * 4` evaluates `*` first, giving `14`. [S1] +- **Parentheses override precedence** — `(2 + 3) * 4` forces addition first, giving `20`. [S1] +- **Left-to-right associativity for same-tier operators** — `10 - 2 + 5` evaluates as `(10 - 2) + 5 = 13`. [S1] + +## 📖 세부 내용 (Details) +- Precedence demonstration: `int result1 = 2 + 3 * 4; // 14 int result2 = (2 + 3) * 4; // 20`. [S1] +- Left-to-right associativity demonstration: `int result1 = 10 - 2 + 5; // 13 int result2 = 10 - (2 + 5); // 3`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). C 챕터와 우선순위표·예제가 완전히 동일함이 확인됨. + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 계산 순서가 애매할 때 항상 괄호를 사용하라는 권고가 C 챕터와 동일하게 강조된다. [S1] + +## 💻 코드 패턴 (Code patterns) +Same-precedence operators evaluate strictly left to right unless parentheses override it (C++): +```cpp +int result1 = 10 - 2 + 5; // (10 - 2) + 5 = 13 +int result2 = 10 - (2 + 5); // 10 - 7 = 3 +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Operators Logical]], [[CPP Strings]], [[C Operators Precedence]] +- **참조 맥락:** 연산자 섹션 마지막 — 문자열(Strings) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Operator Precedence — https://www.w3schools.com/cpp/cpp_operators_precedence.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Operator Precedence" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Output.md b/10_Wiki/Dev/Topic_CPP/CPP_Output.md new file mode 100644 index 00000000..e5bc0a43 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Output.md @@ -0,0 +1,70 @@ +--- +id: cpp-output +title: "C++ Output (Print Text)" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["cout insertion operator", "C++ 출력"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "output", "cout"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_output.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Output (Print Text)]] + +## 🎯 한 줄 통찰 (One-line insight) +`cout` never inserts a newline automatically — exactly the same behavior as C's `printf()` — meaning C++'s I/O model, despite replacing `printf()` with an object-and-operator syntax (`cout <<`), preserves the identical "no automatic line breaks" limitation, so multiple `cout` calls still concatenate onto one line unless the programmer explicitly adds a newline character. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`cout` + `<<`** — the object and insertion operator used to print text; text must be wrapped in double quotes. [S1] +- **No automatic newline** — multiple `cout` statements concatenate output onto ONE line, just like C's `printf()`. [S1] +- **Multiple `cout` calls allowed** — as many as needed in one program. [S1] + +## 📖 세부 내용 (Details) +- Basic print: `cout << "Hello World!";`. [S1] +- Newline-less concatenation across two calls: `cout << "Hello World!"; cout << "I am learning C++"; // both render on one line`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **cout도 printf()처럼 줄바꿈을 자동 삽입하지 않음**: 여러 cout 호출 결과가 모두 한 줄에 이어져 출력된다는 점이 C의 printf() 동작과 동일함이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 다음 챕터(New Lines)에서 \n과 endl로 줄바꿈을 명시적으로 추가하는 방법으로 이어진다. [S1] + +## 💻 코드 패턴 (Code patterns) +Two cout calls concatenating onto one line with no automatic newline (C++): +```cpp +#include +using namespace std; +int main() { + cout << "Hello World!"; + cout << "I am learning C++"; + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Comments]], [[CPP Output Numbers]], [[CPP New Lines]] +- **참조 맥락:** 텍스트 출력 — 숫자 출력(Output Numbers) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Output (Print Text) — https://www.w3schools.com/cpp/cpp_output.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Output (Print Text)" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Output_Numbers.md b/10_Wiki/Dev/Topic_CPP/CPP_Output_Numbers.md new file mode 100644 index 00000000..ec7dd1c8 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Output_Numbers.md @@ -0,0 +1,64 @@ +--- +id: cpp-output-numbers +title: "C++ Output Numbers" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["cout math expressions", "C++ 숫자 출력"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.82 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "output", "numbers"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_output_numbers.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Output Numbers]] + +## 🎯 한 줄 통찰 (One-line insight) +`cout <<` accepts a raw MATHEMATICAL EXPRESSION directly (`cout << 3 + 3;`), not just a pre-computed variable or literal — meaning `<<`'s right-hand side is evaluated as a genuine expression before printing, unlike a naive assumption that only simple values can follow the insertion operator. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **No quotes for numbers** — unlike text, numeric values are NOT wrapped in double quotes when printed with `cout`. [S1] +- **Inline expression evaluation** — `cout << 3 + 3;` computes the sum THEN prints the result (6), not the literal text "3 + 3". [S1] + +## 📖 세부 내용 (Details) +- Printing a bare number: `cout << 3;`. [S1] +- Printing the result of addition: `cout << 3 + 3; // 6`. [S1] +- Printing the result of multiplication: `cout << 2 * 5; // 10`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — cout에 수식을 직접 넣어 계산 결과를 출력하는 패턴이 이후 산술 연산자(Operators Arithmetic) 챕터의 기초가 된다. [S1] + +## 💻 코드 패턴 (Code patterns) +Printing the result of an inline arithmetic expression (C++): +```cpp +cout << 3 + 3; // Outputs 6, not "3 + 3" +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.82 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Output]], [[CPP New Lines]] +- **참조 맥락:** 숫자 출력 — 줄바꿈(New Lines) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Output Numbers — https://www.w3schools.com/cpp/cpp_output_numbers.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Output Numbers" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Pointers.md b/10_Wiki/Dev/Topic_CPP/CPP_Pointers.md new file mode 100644 index 00000000..586422ff --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Pointers.md @@ -0,0 +1,66 @@ +--- +id: cpp-pointers +title: "C++ Pointers" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["pointer declaration", "preferred syntax style", "C++ 포인터"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "pointers"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_pointers.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Pointers]] + +## 🎯 한 줄 통찰 (One-line insight) +The source explicitly ranks THREE valid pointer-declaration spacing styles (`string* mystring;`, `string *mystring;`, `string * mystring;`) and states the FIRST is "preferred" — a stylistic recommendation C's Pointers chapter never made, meaning C++ style guides have converged on attaching `*` to the TYPE rather than the variable name, even though all three compile identically. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Pointer** — a variable that stores another variable's memory address as its value. [S1] +- **Type-matched declaration** — a pointer's type must match the type it points to (`string* ptr` for a `string`). [S1] +- **Preferred spacing style** — `string* mystring;` (asterisk attached to the type) is explicitly called out as preferred over `string *mystring;` or `string * mystring;`, though all three are equivalent. [S1] + +## 📖 세부 내용 (Details) +- Creating a pointer and reading the address it stores: `string food = "Pizza"; string* ptr = &food; cout << ptr; // same address as &food`. [S1] +- Three equivalent but stylistically ranked declarations: `string* mystring; // Preferred string *mystring; string * mystring;`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **선호되는 포인터 선언 스타일이 명시됨**: C 챕터에는 없던 스타일 권고로, string* ptr처럼 별표를 타입에 붙이는 방식이 선호된다는 점이 명확히 제시됨(세 가지 모두 동일하게 작동하지만). [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 별표를 타입에 붙이는 스타일이 실전 C++ 코드 컨벤션에서 권장되는 표기법이다. [S1] + +## 💻 코드 패턴 (Code patterns) +Creating a pointer using the preferred declaration style (C++): +```cpp +string food = "Pizza"; +string* ptr = &food; // Preferred style: * attached to the type +cout << ptr << "\n"; // same address as &food +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP References Memory]], [[CPP Pointers Dereference]], [[C Pointers]] +- **참조 맥락:** 포인터 기초 — 역참조(Pointers Dereference) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Pointers — https://www.w3schools.com/cpp/cpp_pointers.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Pointers" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Pointers_Dereference.md b/10_Wiki/Dev/Topic_CPP/CPP_Pointers_Dereference.md new file mode 100644 index 00000000..c1ab7eab --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Pointers_Dereference.md @@ -0,0 +1,65 @@ +--- +id: cpp-pointers-dereference +title: "C++ Dereference" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["dereference operator", "* dual meaning", "C++ 역참조"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "pointers", "dereference"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_pointers_dereference.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Dereference]] + +## 🎯 한 줄 통찰 (One-line insight) +The `*` symbol does two OPPOSITE jobs depending on where it appears — identical to C's pointer chapter — in a declaration (`string* ptr`) it CREATES a pointer, but everywhere else (`*ptr`) it DEREFERENCES one to retrieve the pointed-to value, confirming C++ inherited this exact dual-meaning confusion point from C without modification. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`*` in declaration vs. elsewhere** — `string* ptr;` creates a pointer variable; `*ptr` (outside declaration) dereferences it to get the pointed-to value. [S1] +- **Reference (`&`) vs. dereference (`*`)** — `ptr` alone gives the address; `*ptr` gives the value. [S1] + +## 📖 세부 내용 (Details) +- Reference vs. dereference side by side: `string food = "Pizza"; string* ptr = &food; cout << ptr; // 0x6dfed4 (address) cout << *ptr; // Pizza (value)`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **`*`의 이중 의미가 C와 동일하게 확인됨**: 선언에서는 포인터를 만들고, 선언이 아닌 곳에서는 역참조 연산자로 동작한다는 혼동 요소가 C 챕터와 완전히 동일함. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 역참조 연산자를 이용해 포인터가 가리키는 변수의 값을 직접 변경하는 것이 다음 챕터(Modify Pointers)에서 실전 활용으로 이어진다. [S1] + +## 💻 코드 패턴 (Code patterns) +Reference vs. dereference on the same pointer (C++): +```cpp +string food = "Pizza"; +string* ptr = &food; +cout << ptr << "\n"; // Reference: memory address of food +cout << *ptr << "\n"; // Dereference: value of food (Pizza) +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Pointers]], [[CPP Pointers Modify]], [[C Pointers]] +- **참조 맥락:** 역참조 — 포인터 값 수정(Pointers Modify) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Dereference — https://www.w3schools.com/cpp/cpp_pointers_dereference.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Dereference" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Pointers_Modify.md b/10_Wiki/Dev/Topic_CPP/CPP_Pointers_Modify.md new file mode 100644 index 00000000..bdc40e09 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Pointers_Modify.md @@ -0,0 +1,65 @@ +--- +id: cpp-pointers-modify +title: "C++ Modify Pointers" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["mutating through a pointer", "C++ 포인터 값 수정"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "pointers"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_pointers_modify.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Modify Pointers]] + +## 🎯 한 줄 통찰 (One-line insight) +Assigning `*ptr = "Hamburger";` doesn't change what the POINTER points to — it changes the VALUE at the address the pointer already points to — so the original variable (`food`) changes too, since `ptr` and `food` still reference the exact same memory location; this is the mechanical proof behind why passing a pointer into a function lets that function permanently alter the caller's data. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`*ptr = newValue;`** — writes a new value AT the memory address the pointer references, which is the SAME memory the original variable occupies. [S1] +- **Original variable changes too** — because `ptr` and the original variable share one memory location, mutating through the pointer is indistinguishable from mutating the variable directly. [S1] + +## 📖 세부 내용 (Details) +- Full mutation-through-pointer sequence: `string food = "Pizza"; string* ptr = &food; cout << *ptr; // Pizza *ptr = "Hamburger"; cout << *ptr; // Hamburger cout << food; // Hamburger — the original changed too`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 포인터를 통해 원본 변수의 값을 변경하는 이 메커니즘이 함수에 포인터를 전달해 원본 데이터를 수정하는 실전 패턴(Function Pointer/Reference 챕터)의 근거가 된다. [S1] + +## 💻 코드 패턴 (Code patterns) +Mutating a value through a pointer changes the original variable (C++): +```cpp +string food = "Pizza"; +string* ptr = &food; +*ptr = "Hamburger"; // Change the value at the pointed-to address +cout << food; // Outputs "Hamburger" — the original variable changed +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Pointers Dereference]], [[CPP Memory Management]], [[C Pointers]] +- **참조 맥락:** 포인터 값 수정 — 메모리 관리(Memory Management) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Modify Pointers — https://www.w3schools.com/cpp/cpp_pointers_modify.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Modify Pointers" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Polymorphism.md b/10_Wiki/Dev/Topic_CPP/CPP_Polymorphism.md new file mode 100644 index 00000000..302a6d21 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Polymorphism.md @@ -0,0 +1,74 @@ +--- +id: cpp-polymorphism +title: "C++ Polymorphism" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["method overriding", "many forms", "C++ 다형성"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "oop", "polymorphism"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_polymorphism.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Polymorphism]] + +## 🎯 한 줄 통찰 (One-line insight) +Polymorphism is explicitly framed as Inheritance's NATURAL EXTENSION, not a separate feature — the source states "Inheritance lets us inherit... Polymorphism uses those methods to perform different tasks," meaning a `Pig` and `Dog` REDEFINING the SAME method name (`animalSound()`) inherited from `Animal` isn't a new syntax to learn, it's simply what happens when a derived class writes its own version of a method it already inherited by name. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Polymorphism** — "many forms"; occurs when related classes (via inheritance) implement the SAME method name differently, so ONE action behaves differently per class. [S1] +- **Method overriding** — a derived class REDEFINES a method it inherited from the base class, with the SAME name and signature. [S1] +- **Direct extension of inheritance** — polymorphism doesn't add new syntax; it's just what happens when derived classes redefine an inherited method name. [S1] + +## 📖 세부 내용 (Details) +- Three classes with the SAME method name, each behaving differently: `class Animal { public: void animalSound() { cout << "The animal makes a sound \n"; } }; class Pig : public Animal { public: void animalSound() { cout << "The pig says: wee wee \n"; } }; class Dog : public Animal { public: void animalSound() { cout << "The dog says: bow wow \n"; } };` — calling `.animalSound()` on each object type produces its own class's version. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +Animal 기반 클래스의 animalSound()를 Pig와 Dog가 각각 다르게 재정의하는 예제가 원문에서 직접 실전 활용 사례로 제시됨(동일한 행동, 클래스마다 다른 구현). [S1] + +## 💻 코드 패턴 (Code patterns) +The same method name behaving differently across sibling derived classes (C++): +```cpp +class Animal { +public: + void animalSound() { cout << "The animal makes a sound \n"; } +}; +class Pig : public Animal { +public: + void animalSound() { cout << "The pig says: wee wee \n"; } +}; +class Dog : public Animal { +public: + void animalSound() { cout << "The dog says: bow wow \n"; } +}; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Inheritance Multiple]], [[CPP Virtual Functions]] +- **참조 맥락:** 다형성 — 가상 함수(Virtual Functions) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Polymorphism — https://www.w3schools.com/cpp/cpp_polymorphism.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Polymorphism" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Queues.md b/10_Wiki/Dev/Topic_CPP/CPP_Queues.md new file mode 100644 index 00000000..bc8805e2 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Queues.md @@ -0,0 +1,80 @@ +--- +id: cpp-queues +title: "C++ Queues" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["std::queue", "FIFO", "C++ 큐"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "stl", "queue", "fifo"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_queues.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Queues]] + +## 🎯 한 줄 통찰 (One-line insight) +`queue` is stack's mirror image — same restricted-access philosophy (no arbitrary indexing, no brace-list initialization, only `.push()`/`.pop()`), but instead of both ends collapsing onto one "top," a queue keeps `.front()` and `.back()` as two DISTINCT accessible ends, encoding FIFO order (supermarket line: first in line, first served) the same way stack encoded LIFO — the two containers share nearly identical method names (`.push()`, `.pop()`, `.size()`, `.empty()`) but differ in exactly which end `.pop()` removes from, which is the single fact that determines whether a container behaves like a stack or a queue. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **FIFO (First In, First Out)** — the first element added is the first one removed, unlike stack's LIFO. [S1] +- **`queue name`** — requires ``; like stack, CANNOT be initialized with a curly-brace list at declaration — must use `.push()` after declaring. [S1] +- **`.push()`** — adds an element to the BACK (end) of the queue. [S1] +- **`.front()` / `.back()`** — TWO accessible points (unlike stack's single `.top()`): front is the oldest/first element, back is the newest/last element; both are also assignable. [S1] +- **`.pop()`** — removes the FRONT element (the oldest one) — this is the key difference from stack's `.pop()`, which removes from the top/back instead. [S1] +- **`.size()` / `.empty()`** — same semantics as stack/list/vector. [S1] + +## 📖 세부 내용 (Details) +- Declaration + fill: `queue cars; cars.push("Volvo"); cars.push("BMW"); cars.push("Ford"); cars.push("Mazda");` — resulting order: Volvo(front), BMW, Ford, Mazda(back). [S1] +- Access/modify: `cars.front()` → "Volvo", `cars.back()` → "Mazda"; both can be reassigned directly (`cars.front() = "Tesla";`). [S1] +- Remove: `cars.pop();` removes Volvo (the front/oldest), making BMW the new front. [S1] +- Same brace-initialization restriction as stack is called out explicitly: `queue cars = {"Volvo", ...};` is not allowed. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **stack과 동일한 메서드명, 반대 방향 의미**: stack의 `.pop()`은 top(가장 최근 추가된 요소)을 제거했지만, queue의 `.pop()`은 front(가장 오래된 요소)를 제거한다는 점이 이번 챕터에서 stack과의 핵심 대비로 확인됨 — 메서드 이름은 같아도 동작 방향이 정반대. [S1] +- **접근 가능 지점이 하나에서 둘로 늘어남**: stack은 `.top()` 하나만 노출했지만, queue는 `.front()`와 `.back()` 두 지점을 모두 노출한다는 점이 FIFO 구조의 특성상 필요한 차이로 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 슈퍼마켓 줄서기에 비유해 FIFO를 설명하고, 자동차 이름을 push()로 채운 뒤 front()/back()으로 확인하는 예제가 원문에서 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Queue push/front/back/pop — pop always removes from the front, unlike stack (C++): +```cpp +#include +queue cars; +cars.push("Volvo"); +cars.push("BMW"); +cars.push("Ford"); +cars.push("Mazda"); + +cout << cars.front(); // "Volvo" (oldest) +cout << cars.back(); // "Mazda" (newest) +cars.pop(); // removes "Volvo" (the front) +cout << cars.front(); // now "BMW" +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Stacks]], [[CPP Data Structures]], [[CPP Deque]] +- **참조 맥락:** 데이터 구조(STL) 섹션 — Stacks와 짝을 이루는 챕터, 다음은 Deque. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Queues — https://www.w3schools.com/cpp/cpp_queues.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Queues" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_References.md b/10_Wiki/Dev/Topic_CPP/CPP_References.md new file mode 100644 index 00000000..92af6758 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_References.md @@ -0,0 +1,68 @@ +--- +id: cpp-references +title: "C++ References" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["reference variable", "alias", "& operator", "C++ 참조"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "references"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_references.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP References]] + +## 🎯 한 줄 통찰 (One-line insight) +A reference isn't a COPY or even a pointer to a variable — it's a genuine ALIAS, meaning `food` and `meal` in `string &meal = food;` are two DIFFERENT NAMES for the exact SAME memory location, so changing `meal` changes `food` directly with no dereference operator ever needed — a concept with NO equivalent in C, where the closest thing (a pointer) always requires explicit `*` to reach the value. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Reference variable (`type &alias = original;`)** — an alias for an EXISTING variable, created with the `&` operator at declaration. [S1] +- **Same memory location** — the reference and the original variable refer to the identical memory address, not a copy. [S1] +- **No dereference needed** — unlike a pointer, using a reference to read or write the value requires no `*`; you just use the reference name directly. [S1] +- **Bidirectional change propagation** — changing either the original variable OR the reference changes the other, since they're the same storage. [S1] + +## 📖 세부 내용 (Details) +- Creating a reference and reading through both names: `string food = "Pizza"; string &meal = food; cout << food; // Pizza cout << meal; // Pizza`. [S1] +- Changing through the reference affects the original: `meal = "Burger"; cout << food; // Burger cout << meal; // Burger`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **참조는 C에 없던 완전히 새로운 개념**: 포인터처럼 별도의 역참조(*) 연산 없이도 원본 변수와 완전히 동일한 메모리를 가리키는 별칭(alias)이라는 점에서, C의 포인터와도 다른 C++ 고유의 개념임이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 참조는 이후 함수 매개변수를 값 복사 없이 전달하는 실전 활용(Function Reference 챕터)의 기초가 된다. [S1] + +## 💻 코드 패턴 (Code patterns) +A reference variable acting as a true alias — changing it changes the original directly (C++): +```cpp +string food = "Pizza"; // food variable +string &meal = food; // reference to food (an alias, not a copy) +meal = "Burger"; // changes both meal and food +cout << food; // Burger +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Enum]], [[CPP References Memory]], [[CPP Pointers]] +- **참조 맥락:** 참조·포인터·메모리 섹션 첫 챕터 — 메모리 주소(References Memory) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ References — https://www.w3schools.com/cpp/cpp_references.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ References" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_References_Memory.md b/10_Wiki/Dev/Topic_CPP/CPP_References_Memory.md new file mode 100644 index 00000000..1021ce04 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_References_Memory.md @@ -0,0 +1,65 @@ +--- +id: cpp-references-memory +title: "C++ Memory Address" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["& dual meaning", "C++ 메모리 주소"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "memory", "references", "pointers"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_references_memory.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Memory Address]] + +## 🎯 한 줄 통찰 (One-line insight) +The `&` operator does TWO completely different jobs depending on where it's used — in a DECLARATION (`string &meal = food;`) it creates a reference/alias, but STANDALONE (`cout << &food;`) it retrieves the memory address — meaning `&`'s dual meaning in C++ directly mirrors the earlier Pointers chapter's warning about `*`'s dual meaning (declaration vs. dereference), giving C++ TWO symbols with context-dependent behavior instead of C's one. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`&` as address-of operator** — outside a declaration, `&variable` retrieves the memory address. [S1] +- **`&` as reference-creation operator** — inside a declaration (`type &alias = var;`), `&` creates an alias instead. [S1] +- **Hexadecimal address format** — same as C, `0x...`, varies per run/machine. [S1] +- **Why it matters** — references AND pointers (covered next) let C++ manipulate memory directly, reducing code and improving performance — explicitly named as one of the things that distinguishes C++ from Python and Java. [S1] + +## 📖 세부 내용 (Details) +- Getting a variable's address: `string food = "Pizza"; cout << &food; // Outputs 0x6dfed4`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **&의 이중 의미**: 선언 안에서는 참조(별칭)를 만들지만, 선언 밖에서는 메모리 주소를 가져오는 연산자로 동작한다는 점이 확인되며, 이는 포인터 챕터의 * 이중 의미와 유사한 패턴이다. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 이 챕터의 & 연산자 개념이 다음 챕터(Pointers)에서 실제 포인터 변수 선언의 기초로 그대로 이어진다. [S1] + +## 💻 코드 패턴 (Code patterns) +Getting a variable's memory address with the & operator outside a declaration (C++): +```cpp +string food = "Pizza"; +cout << &food; // Outputs 0x6dfed4 +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP References]], [[CPP Pointers]], [[C Memory Address]] +- **참조 맥락:** 메모리 주소 — 포인터(Pointers) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Memory Address — https://www.w3schools.com/cpp/cpp_references_memory.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Memory Address" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Scope.md b/10_Wiki/Dev/Topic_CPP/CPP_Scope.md new file mode 100644 index 00000000..e118012b --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Scope.md @@ -0,0 +1,75 @@ +--- +id: cpp-scope +title: "C++ Variable Scope" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["local scope", "global scope", "shadowing", "C++ 변수 스코프"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "scope"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_scope.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Variable Scope]] + +## 🎯 한 줄 통찰 (One-line insight) +This chapter, and its exact example (a local `x=22` shadowing a global `x=5`), is IDENTICAL to C's Variable Scope chapter — confirming that C++'s scope rules, including the silent-shadowing behavior where same-named local and global variables coexist as two independent variables with no error, are inherited from C completely unmodified. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Scope** — the region where a variable is accessible; local (inside a function) or global (outside any function). [S1] +- **Local scope** — a variable created inside a function only usable within it; error if accessed outside. [S1] +- **Global scope** — accessible from ANY scope, both other functions and `main()`. [S1] +- **Name collision = shadowing, not conflict** — a local variable with the SAME NAME as a global one creates two independent variables; the local one takes precedence inside its function. [S1] +- **Global mutability risk** — any function can silently modify a global, making state harder to reason about. [S1] + +## 📖 세부 내용 (Details) +- Same-name shadowing — two independent variables coexist: `int x = 5; void myFunction() { int x = 22; cout << x; // 22, local } int main() { myFunction(); cout << x; // 5, global — untouched }`. [S1] +- A function silently mutating a global: `int x = 5; void myFunction() { cout << ++x; } // x is now 6`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). C 챕터와 완전히 동일한 스코프 규칙(섀도잉, 전역 변수 위험성)이 확인됨. + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 기존 C++ 프로그램이나 협업 코드에서 전역 변수를 마주칠 가능성이 높으므로 스코프 동작 원리를 이해해두는 것이 실전에서 유용하다고 원문에 명시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +A local variable shadowing a global variable of the same name (C++): +```cpp +int x = 5; // global +void myFunction() { + int x = 22; // local, shadows the global + cout << x << "\n"; // 22 (local x) +} +int main() { + myFunction(); + cout << x; // 5 (global x, untouched) + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Namespaces]], [[CPP User Input]], [[C Scope]] +- **참조 맥락:** 변수 스코프 — 사용자 입력(User Input) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Variable Scope — https://www.w3schools.com/cpp/cpp_scope.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Variable Scope" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Sets.md b/10_Wiki/Dev/Topic_CPP/CPP_Sets.md new file mode 100644 index 00000000..a33cfe2e --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Sets.md @@ -0,0 +1,80 @@ +--- +id: cpp-sets +title: "C++ Sets" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["std::set", "unique sorted elements C++", "C++ 셋"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "stl", "set"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_sets.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Sets]] + +## 🎯 한 줄 통찰 (One-line insight) +`set` is the first STL container in this series where insertion ORDER is thrown away entirely — every container so far (vector/list/stack/queue/deque) preserved the order elements were added in, but a set auto-sorts on every insert AND silently drops duplicates, meaning `cars.insert("BMW")` twice is not an error, not a no-op that keeps the old value, but simply invisible — the second insert vanishes with no feedback, which is the opposite of the C mentality where writing the same array slot twice always visibly overwrites it. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Automatic ascending sort** — elements are always kept in sorted order (alphabetical for strings, numeric for ints), regardless of insertion order. [S1] +- **Uniqueness enforced silently** — inserting a duplicate value is simply ignored; no error, no exception, no indication. [S1] +- **No index access, no in-place value change** — since order is determined by sorting rather than position, elements cannot be retrieved by `[i]`, and an existing element's VALUE cannot be modified (only added via `.insert()` or removed via `.erase()`). [S1] +- **`greater` functor** — passed as a second template parameter (`set> numbers`) to reverse the default ascending sort to descending. [S1] +- **`.insert()` / `.erase()` / `.clear()`** — add one element / remove one specific element / remove everything. [S1] +- **`.size()` / `.empty()`** — same semantics as other containers. [S1] +- **Looping** — for-each only (like list); no indexed loop since there's no index. [S1] + +## 📖 세부 내용 (Details) +- Declaration + auto-sort: `set cars = {"Volvo", "BMW", "Ford", "Mazda"};` prints in alphabetical order (BMW, Ford, Mazda, Volvo), NOT insertion order. [S1] +- Numeric sets sort numerically: `set numbers = {1, 7, 3, 2, 5, 9};` prints 1,2,3,5,7,9. [S1] +- Descending order: `set> numbers = {1, 7, 3, 2, 5, 9};` prints 9,7,5,3,2,1. [S1] +- Duplicate handling demonstrated directly: `set cars = {"Volvo", "BMW", "Ford", "BMW", "Mazda"};` still prints only 4 unique elements. [S1] +- Add/remove: `cars.insert("Tesla");` / `cars.erase("Volvo");` / `cars.clear();`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **삽입 순서가 완전히 무시됨**: 지금까지의 모든 컨테이너(vector/list/stack/queue/deque)는 삽입 순서를 유지했지만, set은 매번 자동으로 정렬 순서를 재적용하여 삽입 순서 자체가 의미를 잃는다는 점이 이번 챕터에서 확인됨. [S1] +- **중복 삽입이 조용히 무시됨**: C 배열에서 같은 인덱스에 값을 두 번 쓰면 항상 눈에 띄게 덮어써지지만, set에 같은 값을 두 번 insert()하면 아무 에러도 피드백도 없이 두 번째 삽입이 그냥 사라진다는 점이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 자동차 이름 set에 중복값을 넣어 자동으로 걸러지는 것을 보여주는 예제가 원문에서 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +A set auto-sorts and silently drops duplicates on insert (C++): +```cpp +#include +set cars = {"Volvo", "BMW", "Ford", "BMW", "Mazda"}; +// Output (sorted, deduplicated): BMW, Ford, Mazda, Volvo + +set> numbers = {1, 7, 3, 2, 5, 9}; +// Descending via greater: 9, 7, 5, 3, 2, 1 + +cars.insert("Tesla"); +cars.erase("Volvo"); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Deque]], [[CPP Maps]], [[CPP Iterators]] +- **참조 맥락:** 데이터 구조(STL) 섹션 — Maps 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Sets — https://www.w3schools.com/cpp/cpp_sets.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Sets" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Stacks.md b/10_Wiki/Dev/Topic_CPP/CPP_Stacks.md new file mode 100644 index 00000000..ce505a69 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Stacks.md @@ -0,0 +1,80 @@ +--- +id: cpp-stacks +title: "C++ Stacks" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["std::stack", "LIFO", "C++ 스택"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "stl", "stack", "lifo"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_stacks.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Stacks]] + +## 🎯 한 줄 통찰 (One-line insight) +A `stack` is the STL's most restrictive container by design — it exposes ONLY `.top()`, deliberately hiding every other element, which is the opposite philosophy from vector's "give me any index" approach; this is a case where LESS access is the feature, because the LIFO guarantee (pancakes added/removed only from the top) is what makes stacks useful for problems like undo-history or call-stack simulation, and that guarantee would be broken if arbitrary access were allowed. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **LIFO (Last In, First Out)** — the defining order: the last element pushed is the first one that can be accessed or removed. [S1] +- **`stack name`** — requires ``; unlike vector/list, a stack CANNOT be initialized with a curly-brace list at declaration time — elements must be added via `.push()` after declaring. [S1] +- **`.push()`** — adds an element to the top of the stack. [S1] +- **`.top()`** — the ONLY way to read (or, via assignment, change) an element; always refers to the most recently pushed element. [S1] +- **`.pop()`** — removes the top (most recently added) element; note this differs from vector's `.pop_back()` naming but same "remove from the active end" idea. [S1] +- **`.size()` / `.empty()`** — same semantics as vector/list. [S1] +- **Stacks and Queues are paired concepts** — the page explicitly notes queues (FIFO) are the mirror-image structure covered next. [S1] + +## 📖 세부 내용 (Details) +- Declaration: `stack cars;` then `cars.push("Volvo"); cars.push("BMW"); cars.push("Ford"); cars.push("Mazda");` — resulting order top-to-bottom: Mazda(top), Ford, BMW, Volvo. [S1] +- Access/modify: `cars.top()` returns `"Mazda"`; `cars.top() = "Tesla";` changes only the top element. [S1] +- Remove: `cars.pop();` removes Mazda, making Ford the new top. [S1] +- Attempting `stack cars = {"Volvo", "BMW", "Ford", "Mazda"};` is explicitly called out as NOT allowed — a direct contrast to vector/list initialization syntax. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **선언 시 초기화가 불가능함**: vector와 list는 `= {...}` 중괄호 리스트로 선언과 동시에 초기화할 수 있었지만, stack은 선언 후 반드시 `.push()`로만 요소를 채울 수 있다는 제약이 이번 챕터에서 vector/list와의 차이로 명시됨. [S1] +- **접근 가능한 요소가 단 하나(top)로 제한됨**: vector(인덱스 전체)·list(양 끝)에 비해 stack은 오직 top 요소 하나만 읽기/쓰기 가능하다는 점이 LIFO 보장을 위한 의도적 설계 제약으로 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 자동차 이름을 push()로 쌓고 top()으로 확인하는 예제가 원문에서 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Stack push/top/pop — only the top element is ever reachable (C++): +```cpp +#include +stack cars; +cars.push("Volvo"); +cars.push("BMW"); +cars.push("Ford"); +cars.push("Mazda"); // top is now "Mazda" + +cout << cars.top(); // "Mazda" +cars.pop(); // removes "Mazda" +cout << cars.top(); // now "Ford" +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP List]], [[CPP Queues]], [[CPP Data Structures]] +- **참조 맥락:** 데이터 구조(STL) 섹션 — Queues 챕터와 짝을 이루는 챕터, Queues로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Stacks — https://www.w3schools.com/cpp/cpp_stacks.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Stacks" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Statements.md b/10_Wiki/Dev/Topic_CPP/CPP_Statements.md new file mode 100644 index 00000000..b77d03cc --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Statements.md @@ -0,0 +1,66 @@ +--- +id: cpp-statements +title: "C++ Statements" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["semicolon", "C++ 명령문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "statements"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_statements.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Statements]] + +## 🎯 한 줄 통찰 (One-line insight) +Just as in C, a missing semicolon produces an error message pointing to the NEXT statement rather than the actual offending line (`error: expected ';' before 'return'`) — the identical error-location quirk from the C tutorial carries over unchanged to C++, confirming both languages share the same underlying parser behavior for this specific mistake. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Statement** — one instruction executed by the compiler; the basic building block of a C++ program. [S1] +- **Mandatory semicolon termination** — every statement must end with `;`; omitting it causes a compile error. [S1] +- **Sequential execution** — multiple statements execute strictly top-to-bottom, in written order. [S1] + +## 📖 세부 내용 (Details) +- Missing-semicolon error: `cout << "Hello World!"` (no `;`) → `error: expected ';' before 'return'`. [S1] +- Sequential multi-statement execution: `cout << "Hello World!"; cout << "Have a good day!"; return 0;` — runs top to bottom. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — C의 동일한 세미콜론 규칙과 에러 위치 특성이 그대로 이어진다는 점이 C 학습자가 C++로 전환할 때 유리한 지점이다. [S1] + +## 💻 코드 패턴 (Code patterns) +Three statements executing sequentially in source order (C++): +```cpp +cout << "Hello World!"; +cout << "Have a good day!"; +return 0; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Syntax]], [[CPP Comments]] +- **참조 맥락:** 명령문과 세미콜론 규칙 — 주석(Comments) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Statements — https://www.w3schools.com/cpp/cpp_statements.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Statements" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Strings.md b/10_Wiki/Dev/Topic_CPP/CPP_Strings.md new file mode 100644 index 00000000..b14c7451 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Strings.md @@ -0,0 +1,65 @@ +--- +id: cpp-strings +title: "C++ Strings" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["string library include", "C++ 문자열"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "strings"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_strings.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Strings]] + +## 🎯 한 줄 통찰 (One-line insight) +Unlike C, where storing multi-word text requires manually managing a `char` array and worrying about the null terminator, C++'s `string` type stores spaces and punctuation transparently ("Hello and welcome!" works with zero special handling) — proving that the earlier Data Types chapter's promise (string "behaves like" a built-in type) holds even for the exact scenario C explicitly warned about. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`string`** — stores a sequence of characters (text), double-quoted; requires `#include `. [S1] +- **Multi-word support with zero friction** — spaces and punctuation are stored and printed transparently, no escape handling or array sizing needed. [S1] + +## 📖 세부 내용 (Details) +- Basic string with the required include: `#include string greeting = "Hello"; cout << greeting;`. [S1] +- Multi-word string with spaces and punctuation: `string greeting = "Hello and welcome!"; cout << greeting;`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C의 다중 단어 문자열 문제가 C++에는 없음**: C에서는 char 배열의 크기와 널 종료 문자를 신경 써야 했지만, C++ string은 공백과 구두점을 포함한 여러 단어를 아무 특별 처리 없이 그대로 저장/출력한다는 점이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 헤더 포함이 문자열을 다루는 모든 C++ 프로그램의 실전 필수 전제 조건이다. [S1] + +## 💻 코드 패턴 (Code patterns) +A multi-word string with spaces and punctuation, stored and printed transparently (C++): +```cpp +#include +string greeting = "Hello and welcome!"; +cout << greeting; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Operators Precedence]], [[CPP Data Types String]], [[CPP Strings Access]] +- **참조 맥락:** 문자열 섹션 첫 챕터 — 문자열 접근(Strings Access) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Strings — https://www.w3schools.com/cpp/cpp_strings.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Strings" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Strings_Access.md b/10_Wiki/Dev/Topic_CPP/CPP_Strings_Access.md new file mode 100644 index 00000000..941cddc7 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Strings_Access.md @@ -0,0 +1,68 @@ +--- +id: cpp-strings-access +title: "C++ Access Strings" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["string index", "at() function", "C++ 문자열 접근"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "strings", "indexing"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_strings_access.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Access Strings]] + +## 🎯 한 줄 통찰 (One-line insight) +`myString.length() - 1` is the standard idiom for reaching the LAST character of a string of unknown length — since indexes are zero-based, the final valid index is always one less than the total length, and this exact formula reappears identically whether accessed via bracket indexing (`myString[myString.length() - 1]`) or the `.at()` function, showing the offset logic is independent of which access syntax is used. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Bracket indexing (`str[i]`)** — zero-based access to a string's characters, same convention as arrays. [S1] +- **Last-character idiom** — `str[str.length() - 1]` reaches the final character regardless of the string's actual length. [S1] +- **Mutable characters via index** — `myString[0] = 'J';` changes a specific character in place, using single quotes for the new value. [S1] +- **`.at(index)` function** — an alternative to bracket indexing, from the `` library, usable both for reading AND assigning (`myString.at(0) = 'J';`). [S1] + +## 📖 세부 내용 (Details) +- First and second character access: `string myString = "Hello"; cout << myString[0]; // H cout << myString[1]; // e`. [S1] +- Last-character idiom: `cout << myString[myString.length() - 1]; // o`. [S1] +- Mutating a character by index: `myString[0] = 'J'; cout << myString; // Jello`. [S1] +- Using `.at()` for both reading and writing: `cout << myString.at(0); myString.at(0) = 'J'; cout << myString; // Jello`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — length()-1 공식으로 마지막 문자에 접근하는 패턴이 문자열 길이를 미리 알 수 없는 실전 상황에서 표준적으로 쓰인다. [S1] + +## 💻 코드 패턴 (Code patterns) +Reaching the last character of a string regardless of its length (C++): +```cpp +string myString = "Hello"; +cout << myString[myString.length() - 1]; // Outputs 'o' +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Strings]], [[CPP Strings Concat]], [[CPP Strings Length]] +- **참조 맥락:** 문자열 접근 — 문자열 연결(Strings Concat) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Access Strings — https://www.w3schools.com/cpp/cpp_strings_access.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Access Strings" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Strings_Concat.md b/10_Wiki/Dev/Topic_CPP/CPP_Strings_Concat.md new file mode 100644 index 00000000..b7f430a7 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Strings_Concat.md @@ -0,0 +1,68 @@ +--- +id: cpp-strings-concat +title: "C++ String Concatenation" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["+ operator concatenation", "append() function", "C++ 문자열 연결"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "strings", "concatenation"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_strings_concat.asp"] +applied_in: [] +github_commit: "" +--- + +# [[C++ String Concatenation]] + +## 🎯 한 줄 통찰 (One-line insight) +The source reveals that a C++ `string` is actually an OBJECT with member functions — not just a data container — proven by `append()` being callable ON the string itself (`firstName.append(lastName)`) as an alternative to the `+` operator, meaning string concatenation in C++ has TWO equally valid forms (operator-based and method-based) that reflect the object-oriented nature of the type, unlike C's char arrays which have no such method-call syntax. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`+` operator for concatenation** — joins two strings into a new one. [S1] +- **Manual spacing** — a space must be explicitly included (either inside one of the strings or as a separate `" "` literal) since concatenation doesn't add spaces automatically. [S1] +- **`.append()` method** — an alternative to `+` for concatenation, callable directly on a string object, reflecting that C++ strings are objects with member functions. [S1] + +## 📖 세부 내용 (Details) +- Concatenation with a space baked into one string: `string firstName = "John "; string lastName = "Doe"; string fullName = firstName + lastName; cout << fullName;`. [S1] +- Concatenation with an explicit space literal: `string fullName = firstName + " " + lastName;`. [S1] +- Concatenation via the `.append()` method: `string fullName = firstName.append(lastName); cout << fullName;`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **문자열 연결에 자동 공백 삽입 없음**: firstName과 lastName을 그냥 더하면 공백 없이 붙기 때문에, 공백을 직접 문자열 안에 포함하거나 별도 " " 리터럴로 추가해야 한다는 점이 명시됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +이름(firstName)과 성(lastName)을 합쳐 전체 이름(fullName)을 만드는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Concatenating strings via the .append() method instead of the + operator (C++): +```cpp +string firstName = "John "; +string lastName = "Doe"; +string fullName = firstName.append(lastName); +cout << fullName; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Strings Access]], [[CPP Strings Cstyle]], [[CPP Classes]] +- **참조 맥락:** 문자열 연결 — C 스타일 문자열(Strings Cstyle) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ String Concatenation — https://www.w3schools.com/cpp/cpp_strings_concat.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ String Concatenation" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Strings_Cstyle.md b/10_Wiki/Dev/Topic_CPP/CPP_Strings_Cstyle.md new file mode 100644 index 00000000..8ad1ac51 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Strings_Cstyle.md @@ -0,0 +1,65 @@ +--- +id: cpp-strings-cstyle +title: "C++ C-Style Strings" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["char array strings", "CString functions", "C++ C 스타일 문자열"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "strings", "c-style"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_strings_cstyle.asp"] +applied_in: [] +github_commit: "" +--- + +# [[C++ C-Style Strings]] + +## 🎯 한 줄 통찰 (One-line insight) +C++ never removed C's original `char`-array string technique — it kept it fully supported alongside the modern `string` type specifically because it grants access to C standard library functions, meaning a C++ program can legally contain BOTH string styles simultaneously, and choosing C-style strings today is a deliberate interoperability decision, not a leftover habit from not knowing about `string`. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **C-style string** — a `char` array (e.g. `char greeting2[] = "Hello";`), the original C technique, inherited and still supported in C++. [S1] +- **Origin** — named after C, which lacks a native string type and represents text as character arrays. [S1] +- **Why it persists in C++** — grants access to functions from the C standard library (CString functions). [S1] +- **Modern recommendation** — the standard `string` type is more convenient for everyday use; C-style strings are a deliberate choice for specific interoperability needs. [S1] + +## 📖 세부 내용 (Details) +- Both string styles side by side: `string greeting1 = "Hello"; // Regular String char greeting2[] = "Hello"; // C-Style String (an array of characters)`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — C 표준 라이브러리 함수에 접근해야 하는 상황이 C 스타일 문자열을 계속 사용하는 실전 이유로 원문에 직접 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +The same text represented as a regular C++ string versus a C-style character array (C++): +```cpp +string greeting1 = "Hello"; // Regular String +char greeting2[] = "Hello"; // C-Style String (an array of characters) +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Strings Concat]], [[CPP Strings Esc]], [[C Strings]] +- **참조 맥락:** C 스타일 문자열 — 특수문자/이스케이프(Strings Esc) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ C-Style Strings — https://www.w3schools.com/cpp/cpp_strings_cstyle.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ C-Style Strings" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Strings_Esc.md b/10_Wiki/Dev/Topic_CPP/CPP_Strings_Esc.md new file mode 100644 index 00000000..eda834df --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Strings_Esc.md @@ -0,0 +1,65 @@ +--- +id: cpp-strings-esc +title: "C++ Special Characters" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["escape characters", "backslash escape", "C++ 이스케이프 문자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "strings", "escape-characters"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_strings_esc.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Special Characters]] + +## 🎯 한 줄 통찰 (One-line insight) +The exact same double-quote-ambiguity problem and `\"` fix from C reappears unchanged in C++ — a literal `"` inside a double-quoted string is still fundamentally ambiguous to the compiler, requiring the identical `\"` escape to disambiguate where the string actually ends, confirming C++ inherited its escape-sequence grammar directly from C with no modification. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **The core problem** — double quotes delimit strings, so a literal `"` inside one prematurely ends the string. [S1] +- **Core escape sequences** — `\'` (single quote), `\"` (double quote), `\\` (literal backslash). [S1] +- **Other common escapes** — `\n` (newline), `\t` (tab). [S1] + +## 📖 세부 내용 (Details) +- Escaping double quotes inside a string: `string txt = "We are the so-called \"Vikings\" from the north.";`. [S1] +- Escaping a single quote: `string txt = "It\'s alright.";`. [S1] +- Escaping a literal backslash: `string txt = "The character \\ is called backslash.";`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). C 챕터와 완전히 동일한 이스케이프 규칙임이 확인됨. + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 큰따옴표가 포함된 인용문을 문자열에 그대로 담아야 할 때 \" 이스케이프가 실전에서 바로 쓰인다. [S1] + +## 💻 코드 패턴 (Code patterns) +Escaping a literal double quote so it doesn't prematurely end the string (C++): +```cpp +string txt = "We are the so-called \"Vikings\" from the north."; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Strings Cstyle]], [[CPP Strings Input]], [[C Strings Esc]] +- **참조 맥락:** 이스케이프 문자 — 사용자 입력 문자열(Strings Input) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Special Characters — https://www.w3schools.com/cpp/cpp_strings_esc.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Special Characters" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Strings_Input.md b/10_Wiki/Dev/Topic_CPP/CPP_Strings_Input.md new file mode 100644 index 00000000..e09df582 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Strings_Input.md @@ -0,0 +1,68 @@ +--- +id: cpp-strings-input +title: "C++ User Input Strings" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["cin extraction operator", "getline function", "C++ 사용자 입력 문자열"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "strings", "cin", "getline"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_strings_input.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP User Input Strings]] + +## 🎯 한 줄 통찰 (One-line insight) +`cin >>` has the EXACT SAME whitespace-termination limitation as C's `scanf("%s", ...)` — typing "John Doe" only captures "John" — and C++'s fix (`getline(cin, fullName)`) mirrors C's `fgets()` fix conceptually, both existing specifically to read a full line including spaces, meaning this particular parsing limitation and its solution transferred from C to C++ despite the completely different I/O syntax (`>>`/`cin` versus `scanf`/format-strings). [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`cin >> variable`** — the extraction operator, reads user input into a variable. [S1] +- **`cin`'s whitespace-termination limitation** — treats spaces as a terminator, so it can only capture a SINGLE WORD even if the user types multiple words. [S1] +- **`getline(cin, variable)`** — reads a FULL LINE of text including spaces; takes `cin` as the first parameter and the target string as the second. [S1] + +## 📖 세부 내용 (Details) +- Basic single-word input: `string firstName; cin >> firstName;`. [S1] +- The space-termination trap demonstrated: `string fullName; cin >> fullName; // "John Doe" typed → only "John" stored`. [S1] +- The `getline()` fix for multi-word input: `string fullName; getline (cin, fullName); // "John Doe" typed → "John Doe" stored in full`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **cin >>은 공백에서 끊김**: "John Doe"를 입력해도 공백을 종료 문자로 취급해 "John"만 저장된다는 점이 C의 scanf("%s") 문제와 동일하게 확인되며, getline()이 fgets()와 동일한 역할의 해결책으로 제시됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +사용자의 전체 이름(공백 포함)을 정확히 입력받기 위해 cin >> 대신 getline()을 사용하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Reading a full line of text (including spaces) with getline() instead of cin >> (C++): +```cpp +string fullName; +cout << "Type your full name: "; +getline(cin, fullName); +cout << "Your name is: " << fullName; // "John Doe" prints in full +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Strings Esc]], [[CPP Strings Length]], [[C User Input]] +- **참조 맥락:** 사용자 입력 문자열 — 문자열 길이(Strings Length) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ User Input Strings — https://www.w3schools.com/cpp/cpp_strings_input.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ User Input Strings" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Strings_Length.md b/10_Wiki/Dev/Topic_CPP/CPP_Strings_Length.md new file mode 100644 index 00000000..1d3b064d --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Strings_Length.md @@ -0,0 +1,66 @@ +--- +id: cpp-strings-length +title: "C++ String Length" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["length() function", "size() alias", "C++ 문자열 길이"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "strings", "length"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_strings_length.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP String Length]] + +## 🎯 한 줄 통찰 (One-line insight) +`length()` and `size()` are explicitly stated to be EXACT ALIASES for each other — not two functions that happen to behave similarly, but literally the same operation under two names — meaning code encountered "in the wild" using `size()` instead of `length()` isn't using a different technique, just a different spelling of the identical call, and the choice between them is purely stylistic. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`.length()`** — returns the number of characters in a string. [S1] +- **`.size()`** — an exact ALIAS of `.length()`; both do precisely the same thing. [S1] +- **No functional difference** — unlike C's `sizeof` vs `strlen` distinction (which measure genuinely different things), C++'s `length()`/`size()` pair is purely a naming convenience with zero behavioral difference. [S1] + +## 📖 세부 내용 (Details) +- Getting length via `.length()`: `string txt = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; cout << txt.length(); // 26`. [S1] +- The identical result via `.size()`: `cout << txt.size(); // 26, same result`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **length()와 size()는 완전한 별칭**: C의 sizeof/strlen처럼 서로 다른 것을 측정하는 관계가 아니라, C++의 length()와 size()는 정확히 동일한 동작을 하는 두 개의 이름일 뿐이라는 점이 명시적으로 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 다른 사람의 C++ 코드에서 size()를 볼 수도 있다는 점을 미리 알아두면 실전 코드 독해에 도움이 된다. [S1] + +## 💻 코드 패턴 (Code patterns) +length() and size() are exact aliases of each other (C++): +```cpp +string txt = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +cout << txt.length(); // 26 +cout << txt.size(); // 26, identical result +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Strings Input]], [[CPP Strings Namespace]], [[C Strings Functions]] +- **참조 맥락:** 문자열 길이 — 네임스페이스 생략(Strings Namespace) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ String Length — https://www.w3schools.com/cpp/cpp_strings_length.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ String Length" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Strings_Namespace.md b/10_Wiki/Dev/Topic_CPP/CPP_Strings_Namespace.md new file mode 100644 index 00000000..0ae0d947 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Strings_Namespace.md @@ -0,0 +1,70 @@ +--- +id: cpp-strings-namespace +title: "C++ String Namespace" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["std::string", "omitting using namespace std", "C++ 문자열 네임스페이스"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.82 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "strings", "namespace"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_strings_namespace.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP String Namespace]] + +## 🎯 한 줄 통찰 (One-line insight) +The `std::` prefix rule from the earlier Syntax chapter applies EQUALLY to `string` as it does to `cout` — omitting `using namespace std;` means BOTH `std::string` and `std::cout` need the explicit prefix in the same program, showing this isn't a `cout`-specific quirk but a general rule: any name pulled from the standard library needs the `std::` qualifier once the blanket namespace import is removed. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`std::string`** — the fully-qualified form of `string` when `using namespace std;` is omitted, same pattern as `std::cout`. [S1] +- **Consistency across standard-library names** — the `std::` requirement applies uniformly to every std name used (`string`, `cout`, etc.), not selectively. [S1] +- **Stylistic choice, not correctness** — both forms compile and run identically; the tutorial continues using `using namespace std;` for brevity throughout. [S1] + +## 📖 세부 내용 (Details) +- Full program without the namespace declaration, using `std::` for both `string` and `cout`: `#include #include int main() { std::string greeting = "Hello"; std::cout << greeting; return 0; }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). Syntax 챕터에서 배운 std:: 규칙이 string에도 동일하게 적용됨이 확인됨. + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — using namespace std;를 생략한 코드를 실전에서 마주칠 수 있으므로 std:: 표기법을 이해해두는 것이 실용적이다. [S1] + +## 💻 코드 패턴 (Code patterns) +Both string and cout requiring the std:: prefix when the namespace declaration is omitted (C++): +```cpp +#include +#include +// using namespace std; - Removed +int main() { + std::string greeting = "Hello"; + std::cout << greeting; + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.82 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Strings Length]], [[CPP Syntax]], [[CPP Namespaces]] +- **참조 맥락:** 문자열 네임스페이스 — 숫자와 문자열(Strings Numbers) 챕터로 이어짐, 네임스페이스(Namespaces) 챕터와 직접 연결. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ String Namespace — https://www.w3schools.com/cpp/cpp_strings_namespace.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ String Namespace" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Strings_Numbers.md b/10_Wiki/Dev/Topic_CPP/CPP_Strings_Numbers.md new file mode 100644 index 00000000..d239800d --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Strings_Numbers.md @@ -0,0 +1,71 @@ +--- +id: cpp-strings-numbers +title: "C++ Numbers and Strings" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["+ operator overload", "string vs number addition", "C++ 숫자와 문자열"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "strings", "operator-overloading"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_strings_numbers.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Numbers and Strings]] + +## 🎯 한 줄 통찰 (One-line insight) +`+` isn't ONE operator with one behavior — it's overloaded to mean completely different things depending on operand type: numeric `+` performs arithmetic addition (`"10" + "20"` as ints = `30`), while string `+` performs concatenation (`"10" + "20"` as strings = `"1020"`), and mixing the two (a string plus a number) is explicitly flagged as an ERROR — meaning `+`'s meaning is entirely determined by the DECLARED TYPES of its operands, with no automatic conversion bridging string and number. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`+` on numbers** — performs arithmetic addition: `int x = 10; int y = 20; int z = x + y; // 30`. [S1] +- **`+` on strings** — performs concatenation, NOT addition: `string x = "10"; string y = "20"; string z = x + y; // "1020"`. [S1] +- **Mixing string and number with `+` fails** — `string x = "10"; int y = 20; string z = x + y;` produces an error; there's no automatic string-to-number or number-to-string coercion for `+`. [S1] + +## 📖 세부 내용 (Details) +- Numeric addition: `int x = 10; int y = 20; int z = x + y; // z will be 30 (an integer)`. [S1] +- String concatenation with the SAME `+` symbol producing a totally different result: `string x = "10"; string y = "20"; string z = x + y; // z will be 1020 (a string)`. [S1] +- The explicit error case: `string x = "10"; int y = 20; string z = x + y; // error`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **+ 연산자는 피연산자 타입에 따라 완전히 다른 동작**: 숫자끼리는 산술 덧셈, 문자열끼리는 연결(concatenation)을 수행하며, 문자열과 숫자를 섞어서 더하면 에러가 발생한다는 점이 "WARNING!"으로 강조되어 명시됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 사용자 입력이 숫자처럼 보여도 실제로는 문자열(string) 타입일 수 있어, + 연산 시 의도치 않게 덧셈 대신 연결이 일어날 수 있다는 점을 실전에서 주의해야 한다. [S1] + +## 💻 코드 패턴 (Code patterns) +The + operator meaning completely different things for numbers vs. strings (C++): +```cpp +int x = 10; +int y = 20; +int z = x + y; // z will be 30 (an integer) + +string a = "10"; +string b = "20"; +string z2 = a + b; // z2 will be "1020" (a string) +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Strings Namespace]], [[CPP Math]], [[CPP Operators Arithmetic]] +- **참조 맥락:** 문자열 섹션 마지막 — 수학 함수(Math) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Numbers and Strings — https://www.w3schools.com/cpp/cpp_strings_numbers.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Numbers and Strings" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Structs.md b/10_Wiki/Dev/Topic_CPP/CPP_Structs.md new file mode 100644 index 00000000..0f49c295 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Structs.md @@ -0,0 +1,77 @@ +--- +id: cpp-structs +title: "C++ Structures (struct)" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["named structures", "anonymous struct", "C++ 구조체"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "structs"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_structs.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Structures (struct)]] + +## 🎯 한 줄 통찰 (One-line insight) +Once a C++ struct is given a NAME (`struct car {...};`), that name alone becomes a usable data type — `car myCar1;` needs NO `struct` keyword before it — a direct contrast to C, where `struct car myCar1;` always requires the `struct` keyword UNLESS a separate `typedef` is used; meaning C++ eliminated an entire chapter's worth of C's typedef-with-struct workaround by making named structs behave as first-class types automatically. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Structure (`struct`)** — groups multiple MIXED-type variables ("members") into one unit; unlike C, members can include `string` directly. [S1] +- **Anonymous struct + variable in one declaration** — `struct { int myNum; string myString; } myStructure;` declares the type AND the variable together, with no reusable name. [S1] +- **Multiple variables of one anonymous struct** — `struct {...} myStruct1, myStruct2, myStruct3;` — comma-separated. [S1] +- **Named structs behave as data types with NO `struct` prefix needed** — `struct car {...}; car myCar1;` — unlike C, which always requires writing `struct car myCar1;` unless `typedef` is used. [S1] +- **Dot syntax (`.`)** — accesses/assigns individual members, same as C. [S1] + +## 📖 세부 내용 (Details) +- Anonymous struct with a single variable: `struct { int myNum; string myString; } myStructure; myStructure.myNum = 1; myStructure.myString = "Hello World!";`. [S1] +- Named struct usable as a type with no `struct` keyword at the use site: `struct car { string brand; string model; int year; }; car myCar1; myCar1.brand = "BMW";`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **이름 붙은 구조체는 struct 키워드 없이 타입처럼 사용 가능**: C에서는 typedef 없이는 항상 struct car myCar1;처럼 struct를 붙여야 했지만, C++에서는 struct car {...}; 선언 후 car myCar1;만으로 충분하다는 점이 명시적으로 확인됨 — C의 typedef-with-struct 챕터가 해결하던 문제를 C++는 언어 차원에서 이미 해결한 셈. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +Car 구조체 하나로 BMW와 Ford 두 대의 서로 다른 자동차 정보를 저장하는 예제가 원문에서 직접 실전 활용 사례로 제시됨(하나의 named struct, 여러 인스턴스). [S1] + +## 💻 코드 패턴 (Code patterns) +A named struct used directly as a type, with no "struct" keyword needed at the declaration site (C++): +```cpp +struct car { + string brand; + string model; + int year; +}; +int main() { + car myCar1; // no "struct" prefix needed + myCar1.brand = "BMW"; + myCar1.model = "X5"; + myCar1.year = 1999; + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Arrays RealLife]], [[CPP Enum]], [[C Structs]], [[C Typedef]] +- **참조 맥락:** 구조체 및 열거형 섹션 첫 챕터 — 열거형(Enum) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Structures (struct) — https://www.w3schools.com/cpp/cpp_structs.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Structures (struct)" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Switch.md b/10_Wiki/Dev/Topic_CPP/CPP_Switch.md new file mode 100644 index 00000000..8df63097 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Switch.md @@ -0,0 +1,76 @@ +--- +id: cpp-switch +title: "C++ Switch" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["switch case", "break keyword", "default keyword", "C++ switch 문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "switch"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_switch.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Switch]] + +## 🎯 한 줄 통찰 (One-line insight) +The syntax overview explicitly labels `break` and `default` as "optional" — a framing C's chapter never used — yet the same fall-through risk applies identically: without `break`, execution continues into subsequent cases regardless of match, meaning "optional" describes their SYNTACTIC status (the switch compiles without them) rather than their PRACTICAL necessity for correct behavior. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`switch (expression)`** — evaluates the expression ONCE, then compares it against each `case` value. [S1] +- **`case x:`** — a candidate value to match; its block runs if the switch expression equals `x`. [S1] +- **`break`** — exits the switch block once a match is handled; described as OPTIONAL syntactically, though omitting it causes execution to fall through into later cases. [S1] +- **`default:`** — runs if no case matches; also optional. [S1] + +## 📖 세부 내용 (Details) +- Weekday-name lookup via switch: `int day = 4; switch (day) { case 1: cout << "Monday"; break; ... case 4: cout << "Thursday"; break; ... }` — outputs "Thursday" for day 4. [S1] +- Using default for unmatched cases: `int day = 4; switch (day) { case 6: cout << "Today is Saturday"; break; case 7: cout << "Today is Sunday"; break; default: cout << "Looking forward to the Weekend"; }` — day 4 matches neither case 6 nor 7, so default runs. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **break와 default는 "선택 사항"이지만 실질적으로는 거의 필수**: 문법적으로는 생략 가능하다고 명시되지만, break가 없으면 이후 case로 계속 실행이 이어지는(fall-through) 문제가 C 챕터와 동일하게 존재함이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +요일 번호(1-7)를 요일 이름으로 변환하는 예제와, 주말이 아닌 요일에 대해 default로 메시지를 출력하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Using default to handle any value not matched by an explicit case (C++): +```cpp +int day = 4; +switch (day) { + case 6: + cout << "Today is Saturday"; + break; + case 7: + cout << "Today is Sunday"; + break; + default: + cout << "Looking forward to the Weekend"; +} +// Outputs "Looking forward to the Weekend" +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Conditions RealLife]], [[CPP While Loop]], [[C Switch]] +- **참조 맥락:** switch 섹션 유일 챕터 — 반복문(Loops) 섹션의 while 루프(While Loop) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Switch — https://www.w3schools.com/cpp/cpp_switch.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Switch" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Syntax.md b/10_Wiki/Dev/Topic_CPP/CPP_Syntax.md new file mode 100644 index 00000000..2a6c772b --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Syntax.md @@ -0,0 +1,71 @@ +--- +id: cpp-syntax +title: "C++ Syntax" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["using namespace std", "cout", "std::", "C++ 문법"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "syntax", "namespace"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_syntax.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Syntax]] + +## 🎯 한 줄 통찰 (One-line insight) +`using namespace std;` is entirely OPTIONAL and can be replaced everywhere by prefixing each standard-library name with `std::` (`std::cout` instead of `cout`) — both forms are equally valid, but the tutorial deliberately chooses the shorter `using namespace std;` form for teaching purposes, explicitly flagging that real-world/larger C++ programs often prefer the more explicit `std::` form to avoid naming conflicts — meaning the "beginner-friendly" style and the "production" style are known to diverge from the very first syntax lesson. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`#include `** — header enabling input/output objects like `cout`. [S1] +- **`using namespace std;`** — allows using standard-library names (like `cout`) without the `std::` prefix. [S1] +- **`cout` + `<<`** — the object and insertion operator used to print text/output. [S1] +- **Case sensitivity** — `cout` and `Cout` are different identifiers. [S1] +- **`std::` alternative** — omitting `using namespace std;` and prefixing each name with `std::` instead (e.g. `std::cout`) is equally valid, avoids naming conflicts, and is more common in larger/advanced programs. [S1] +- **Whitespace insignificance** — same as C: blank lines/extra spaces are ignored by the compiler, used only for readability. [S1] + +## 📖 세부 내용 (Details) +- Standard tutorial style: `#include using namespace std; int main() { cout << "Hello World!"; return 0; }`. [S1] +- Equivalent `std::`-prefixed style without the namespace declaration: `#include int main() { std::cout << "Hello World!"; return 0; }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **using namespace std;는 선택 사항**: std:: 접두사를 매번 붙이는 방식과 완전히 동등하며, 이름 충돌을 피하기 위해 실무/대규모 프로그램에서는 std::를 명시적으로 쓰는 경우가 많다는 점이 확인됨 — 튜토리얼은 학습 편의를 위해 using namespace std;를 주로 사용. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 이름 충돌 방지를 위한 std:: 명시적 사용이 대규모 프로그램에서의 실전 관행으로 언급됨. [S1] + +## 💻 코드 패턴 (Code patterns) +The equivalent std:: prefix form without using namespace std (C++): +```cpp +#include +int main() { + std::cout << "Hello World!"; + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Get Started]], [[CPP Statements]], [[CPP Namespaces]] +- **참조 맥락:** C++ 프로그램 구조 — 명령문(Statements) 챕터로 이어짐, 네임스페이스(Namespaces) 챕터와 직접 연결. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Syntax — https://www.w3schools.com/cpp/cpp_syntax.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Syntax" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Templates.md b/10_Wiki/Dev/Topic_CPP/CPP_Templates.md new file mode 100644 index 00000000..a68c31a2 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Templates.md @@ -0,0 +1,82 @@ +--- +id: cpp-templates +title: "C++ Templates" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["template keyword", "typename T", "generic programming", "C++ 템플릿"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.88 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "templates", "generics"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_templates.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Templates]] + +## 🎯 한 줄 통찰 (One-line insight) +Templates solve the EXACT problem Function Overloading solved for a FIXED set of types, but generalize it to work with ANY type without writing a separate version for each — `template T add(T a, T b)` handles `int`, `double`, or any other type with ONE definition, whereas overloading (from the Functions section) required a separate `plusFunc(int...)` and `plusFunc(double...)` pair, meaning templates are the more powerful, general-purpose evolution of what overloading only approximated for specific type combinations. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Function template** — `template return_type function_name(T parameter) { ... }`; `T` is a placeholder for ANY data type, resolved at each CALL site. [S1] +- **Explicit type specification** — `add(5, 3)` or `add(2.5, 1.5)` tells the compiler which concrete type `T` should be for that specific call. [S1] +- **Class template** — `template class ClassName { ... };` lets an entire class (members, methods) work generically with any type, instantiated per-type (`Box`, `Box`). [S1] +- **Multiple template parameters** — `template class Pair { ... };` handles TWO independently-typed values in one generic class (`Pair`, `Pair`). [S1] +- **File placement constraint** — templates must be defined in the SAME file where they're used (typically the header/`.h` file), unlike ordinary functions which can be split across declaration/definition files. [S1] + +## 📖 세부 내용 (Details) +- A generic add function working for both int and double: `template T add(T a, T b) { return a + b; } cout << add(5, 3); cout << add(2.5, 1.5);`. [S1] +- A generic class storing any single value type: `template class Box { public: T value; Box(T v) { value = v; } void show() { cout << "Value: " << value << "\n"; } }; Box intBox(50); Box strBox("Hello");`. [S1] +- A generic class handling two independently-typed values: `template class Pair { public: T1 first; T2 second; Pair(T1 a, T2 b) { first = a; second = b; } void display() { cout << "First: " << first << ", Second: " << second << "\n"; } }; Pair person("John", 30); Pair score(51, 9.5);`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **템플릿과 오버로딩은 같은 목표를 다른 방식으로 해결**: 오버로딩은 각 타입 조합마다 별도 함수 정의가 필요했지만, 템플릿은 하나의 정의로 모든 타입에 대응한다는 점에서 오버로딩보다 더 일반화된 해법임이 확인됨. [S1] +- **템플릿은 같은 파일에 정의되어야 함**: 일반 함수와 달리 템플릿은 선언과 정의를 분리할 수 없고 보통 헤더(.h) 파일에 함께 두어야 한다는 제약이 명시됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +이름/나이(문자열+정수), ID/점수(정수+실수)처럼 서로 다른 두 타입 조합을 하나의 Pair 템플릿 클래스로 처리하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +A generic class template handling two independently-typed values (C++): +```cpp +template +class Pair { +public: + T1 first; + T2 second; + Pair(T1 a, T2 b) { first = a; second = b; } + void display() { cout << "First: " << first << ", Second: " << second << "\n"; } +}; +int main() { + Pair person("John", 30); + Pair score(51, 9.5); + person.display(); + score.display(); + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.88 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Friend Function]], [[CPP Function Overloading]], [[CPP Namespaces]], [[CPP Vectors]] +- **참조 맥락:** 다형성 및 고급 OOP 섹션 마지막 — 네임스페이스(Namespaces) 섹션으로 이어짐, STL 컨테이너(Vectors 등)에서 템플릿이 실제로 쓰이는 방식과 직접 연결. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Templates — https://www.w3schools.com/cpp/cpp_templates.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Templates" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_User_Input.md b/10_Wiki/Dev/Topic_CPP/CPP_User_Input.md new file mode 100644 index 00000000..366f72c0 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_User_Input.md @@ -0,0 +1,70 @@ +--- +id: cpp-user-input +title: "C++ User Input" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["cin extraction operator", "C++ 사용자 입력"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "user-input", "cin"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_user_input.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP User Input]] + +## 🎯 한 줄 통찰 (One-line insight) +`cin` and `cout` form a deliberately symmetric pair — the source explicitly pairs their pronunciations ("see-out"/"see-in") and their operators (`<<` insertion / `>>` extraction) as mirror images of each other, meaning learning `cout <<` from the Output chapter directly transfers to `cin >>` here: same object-and-operator pattern, just reversed in data direction and operator angle. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`cin`** — a predefined variable that reads keyboard input, using the EXTRACTION operator `>>` (mirror of `cout`'s insertion operator `<<`). [S1] +- **Both belong to ``** — `cin` and `cout` are both part of the same standard input/output streams library. [S1] +- **Building a simple calculator** — chaining two `cin >>` reads plus arithmetic demonstrates a complete interactive program. [S1] + +## 📖 세부 내용 (Details) +- Basic numeric input: `int x; cout << "Type a number: "; cin >> x; cout << "Your number is: " << x;`. [S1] +- A two-number calculator: `int x, y, sum; cin >> x; cin >> y; sum = x + y; cout << "Sum is: " << sum;`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +두 숫자를 입력받아 합을 계산하는 간단한 계산기 프로그램이 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +A simple calculator built from two cin reads and an arithmetic sum (C++): +```cpp +int x, y, sum; +cout << "Type a number: "; +cin >> x; +cout << "Type another number: "; +cin >> y; +sum = x + y; +cout << "Sum is: " << sum; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Scope]], [[CPP Date]], [[CPP Strings Input]] +- **참조 맥락:** 사용자 입력 — 날짜와 시간(Date) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ User Input — https://www.w3schools.com/cpp/cpp_user_input.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ User Input" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Variables.md b/10_Wiki/Dev/Topic_CPP/CPP_Variables.md new file mode 100644 index 00000000..af860f2f --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Variables.md @@ -0,0 +1,71 @@ +--- +id: cpp-variables +title: "C++ Variables" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["variable declaration", "cout chaining", "C++ 변수"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "variables"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_variables.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Variables]] + +## 🎯 한 줄 통찰 (One-line insight) +Unlike C, where printing a variable requires a completely separate format-specifier mechanism (`printf("%d", myNum)`), C++'s `cout <<` can print a variable DIRECTLY and even CHAIN multiple variables and literal text together in one statement (`cout << name << " is " << age << " years old";`) — meaning C++'s output model eliminates the format-specifier/type-matching step entirely, since `<<` is overloaded to know how to print each type on its own. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Five introductory types** — `int` (whole numbers), `double` (decimals), `char` (single character, single quotes), `string` (text, double quotes), `bool` (true/false). [S1] +- **Declaration syntax** — `type variableName = value;`, or declare first and assign later. [S1] +- **Reassignment overwrites** — assigning a new value replaces the old one entirely. [S1] +- **Direct variable printing via `cout <<`** — no format specifier needed, unlike C's `printf()`. [S1] +- **Chaining text and variables** — `cout << "I am " << myAge << " years old.";` combines literal text and variable values in ONE statement using repeated `<<`. [S1] +- **Arithmetic with variables** — `+` works between variables just as with literals: `int sum = x + y;`. [S1] + +## 📖 세부 내용 (Details) +- Declare-and-assign, then print directly (no format specifier): `int myNum = 15; cout << myNum;`. [S1] +- Chaining multiple variables and text in one cout statement: `string name = "John"; int age = 35; double height = 6.1; cout << name << " is " << age << " years old and " << height << " feet tall.";`. [S1] +- Adding two variables: `int x = 5; int y = 6; int sum = x + y; cout << sum;`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C++는 포맷 지정자 없이 변수를 바로 출력**: C의 printf()와 달리 cout에 변수를 직접 넣고 여러 개를 << 로 이어붙일 수 있다는 점이, 타입별 포맷 지정자를 매번 맞춰야 했던 C와의 핵심 차이로 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 문자열, 정수, 실수를 하나의 cout 문에 이어붙여 사람이 읽기 좋은 문장을 만드는 패턴이 실전 출력 포맷팅의 대표 활용이다. [S1] + +## 💻 코드 패턴 (Code patterns) +Chaining multiple variables and literal text in one cout statement (C++): +```cpp +string name = "John"; +int age = 35; +double height = 6.1; +cout << name << " is " << age << " years old and " << height << " feet tall."; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP New Lines]], [[CPP Variables Identifiers]], [[C Variables]] +- **참조 맥락:** 변수 섹션 첫 챕터 — 식별자 규칙(Variables Identifiers) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Variables — https://www.w3schools.com/cpp/cpp_variables.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Variables" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Variables_Constants.md b/10_Wiki/Dev/Topic_CPP/CPP_Variables_Constants.md new file mode 100644 index 00000000..c83094c9 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Variables_Constants.md @@ -0,0 +1,64 @@ +--- +id: cpp-variables-constants +title: "C++ Constants" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["const keyword", "read-only variables", "C++ 상수"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "constants"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_variables_constants.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Constants]] + +## 🎯 한 줄 통찰 (One-line insight) +Just like in C, `const` requires initialization at the MOMENT of declaration — declaring `const int minutesPerHour;` and assigning it a value on a later line is explicitly shown to fail — meaning C++ inherits C's exact same "declare-without-assign is illegal for const" restriction rather than relaxing it. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`const` keyword** — declares a variable as unchangeable/read-only after initialization. [S1] +- **Mandatory initialization** — a `const` variable must receive its value at declaration time; assigning it later is a compile error. [S1] +- **Use case** — values unlikely to ever change (e.g. `minutesPerHour`). [S1] + +## 📖 세부 내용 (Details) +- Attempting reassignment fails: `const int myNum = 15; myNum = 10; // error: assignment of read-only variable 'myNum'`. [S1] +- Declare-without-assign fails: `const int minutesPerHour; minutesPerHour = 60; // error`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C와 동일한 const 초기화 규칙**: 선언과 동시에 값을 할당해야 하며, 나중에 대입하는 방식은 에러가 발생한다는 점이 C 챕터와 완전히 동일함이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 절대 변하지 않는 값(예: minutesPerHour = 60)을 const로 선언하는 것이 실전 코드의 표준 활용이다. [S1] + +## 💻 코드 패턴 (Code patterns) +Declaring a constant that must be initialized at the point of declaration (C++): +```cpp +const int minutesPerHour = 60; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Variables Identifiers]], [[CPP Variables Multiple]], [[C Constants]] +- **참조 맥락:** 상수 선언 — 여러 변수 한번에 선언하기(Variables Multiple) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Constants — https://www.w3schools.com/cpp/cpp_variables_constants.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Constants" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Variables_Identifiers.md b/10_Wiki/Dev/Topic_CPP/CPP_Variables_Identifiers.md new file mode 100644 index 00000000..c6c350a6 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Variables_Identifiers.md @@ -0,0 +1,66 @@ +--- +id: cpp-variables-identifiers +title: "C++ Identifiers" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["variable naming rules", "C++ 식별자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "variables", "naming"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_variables_identifiers.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Identifiers]] + +## 🎯 한 줄 통찰 (One-line insight) +The naming rules here are IDENTICAL to C's variable-naming chapter word-for-word (letters/digits/underscores, must start with letter or underscore, case-sensitive, no reserved words) — confirming that C++'s identifier grammar is inherited directly from C rather than redesigned, which is exactly what the Intro chapter's "almost the same syntax" claim predicted in concrete terms. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Identifier** — the unique name given to a variable. [S1] +- **Naming rules** — letters, digits, underscores allowed; must start with a letter or underscore; case-sensitive (`myVar` ≠ `myvar`); no whitespace/special characters; reserved keywords (like `int`) cannot be used as names. [S1] +- **Descriptive naming recommended** — `minutesPerHour` over `m`, for readability, even though both compile. [S1] + +## 📖 세부 내용 (Details) +- Descriptive vs terse naming: `int minutesPerHour = 60; // Good` versus `int m = 60; // OK, but unclear`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). C 챕터와 규칙이 동일함이 확인됨. + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — C에서 배운 식별자 규칙이 C++로 그대로 이어진다는 점이 언어 전환 학습자에게 유리한 지점이다. [S1] + +## 💻 코드 패턴 (Code patterns) +Descriptive vs. terse variable naming (C++): +```cpp +// Good +int minutesPerHour = 60; +// OK, but not so easy to understand what m actually is +int m = 60; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Variables]], [[CPP Variables Constants]], [[C Variables Names]] +- **참조 맥락:** 식별자 규칙 — 상수(Variables Constants) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Identifiers — https://www.w3schools.com/cpp/cpp_variables_identifiers.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Identifiers" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Variables_Multiple.md b/10_Wiki/Dev/Topic_CPP/CPP_Variables_Multiple.md new file mode 100644 index 00000000..919c2b38 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Variables_Multiple.md @@ -0,0 +1,65 @@ +--- +id: cpp-variables-multiple +title: "C++ Declare Multiple Variables" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["chained assignment", "comma-separated declaration", "C++ 여러 변수 선언"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.82 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "variables"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_variables_multiple.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Declare Multiple Variables]] + +## 🎯 한 줄 통찰 (One-line insight) +Both shortcuts here — comma-separated declaration (`int x = 5, y = 6, z = 50;`) and chained assignment (`x = y = z = 50;`) — are the exact same two patterns from C's equivalent chapter, with the identical same-type restriction applying: all variables in one comma-separated declaration must share the same type. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Comma-separated declaration** — `type a = v1, b = v2, c = v3;` declares and initializes multiple same-type variables in one statement. [S1] +- **Chained assignment** — `x = y = z = 50;` assigns the same value to multiple already-declared variables at once. [S1] + +## 📖 세부 내용 (Details) +- Comma-separated declaration with individual values: `int x = 5, y = 6, z = 50; cout << x + y + z;`. [S1] +- Chained assignment of one shared value: `int x, y, z; x = y = z = 50; cout << x + y + z;`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). C 챕터와 완전히 동일한 두 패턴임이 확인됨. + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 여러 카운터 변수를 동시에 0으로 초기화하는 상황이 체이닝 대입의 대표 실전 활용이다. [S1] + +## 💻 코드 패턴 (Code patterns) +Chained assignment giving multiple variables the same value at once (C++): +```cpp +int x, y, z; +x = y = z = 50; +cout << x + y + z; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.82 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Variables Constants]], [[CPP Variables RealLife]], [[C Variables Multiple]] +- **참조 맥락:** 여러 변수 동시 선언 — 변수 실전 예제(Variables RealLife) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Declare Multiple Variables — https://www.w3schools.com/cpp/cpp_variables_multiple.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Declare Multiple Variables" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Variables_RealLife.md b/10_Wiki/Dev/Topic_CPP/CPP_Variables_RealLife.md new file mode 100644 index 00000000..222da23c --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Variables_RealLife.md @@ -0,0 +1,67 @@ +--- +id: cpp-variables-reallife +title: "C++ Variables Examples" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["real-life variables", "rectangle area example", "C++ 변수 실전 예제"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.82 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "variables", "real-life-example"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_variables_reallife.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Variables Examples]] + +## 🎯 한 줄 통찰 (One-line insight) +The same admission from C's equivalent chapter appears here verbatim — the tutorial explicitly acknowledges its OWN convention of type-based names (`myInt`, `myChar`) is an artificial teaching simplification "to avoid confusion," and this chapter exists specifically to demonstrate the alternative: naming variables after what they REPRESENT (`studentID`, `studentGrade`) in a realistic multi-type program. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Type-based teaching names vs. domain names** — tutorial examples simplify names to match type for clarity, but real programs should name variables after their real-world meaning. [S1] +- **Multiple types working together** — one program combining `int`, `double`, and `char` variables representing facets of one entity (a student record). [S1] +- **Calculate-then-print pattern** — compute first, store the result, then print — same pattern as C's equivalent chapter. [S1] + +## 📖 세부 내용 (Details) +- Student record combining three types: `int studentID = 15; int studentAge = 23; double studentFee = 75.25; char studentGrade = 'B';` printed via chained `cout <<` statements. [S1] +- Rectangle area calculate-then-print: `int length = 4; int width = 6; int area = length * width; cout << "Area of the rectangle is: " << area << "\n";`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). + +## 🛠️ 적용 사례 (Applied in summary) +학생 정보(ID/나이/수수료/학점)를 하나의 프로그램에서 함께 다루는 예제가 서로 다른 타입의 변수를 실제 데이터 모델링에 사용하는 대표 사례다. [S1] + +## 💻 코드 패턴 (Code patterns) +Calculating a value first, then printing the stored result (C++): +```cpp +int length = 4; +int width = 6; +int area = length * width; +cout << "Area of the rectangle is: " << area << "\n"; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.82 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Variables Multiple]], [[CPP Data Types]], [[C Variables RealLife]] +- **참조 맥락:** 변수 섹션 마지막 — 데이터 타입(Data Types) 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Variables Examples — https://www.w3schools.com/cpp/cpp_variables_reallife.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Variables Examples" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Vectors.md b/10_Wiki/Dev/Topic_CPP/CPP_Vectors.md new file mode 100644 index 00000000..8508b38d --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Vectors.md @@ -0,0 +1,84 @@ +--- +id: cpp-vectors +title: "C++ Vectors" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["std::vector", "resizable array C++", "C++ 벡터"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "stl", "vector"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_vectors.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Vectors]] + +## 🎯 한 줄 통찰 (One-line insight) +A `vector` is the STL's answer to C's biggest array limitation — a fixed size decided at declaration and never changeable afterward — by wrapping a resizable buffer behind `.push_back()`/`.pop_back()` while keeping the exact `[]` index syntax C programmers already know, plus adding `.at()` as a bounds-checked alternative that C's raw arrays never offered (C silently reads/writes past the end; C++'s `.at()` throws instead). [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`vector name`** — declared with the element type inside angle brackets, e.g. `vector cars;`. [S1] +- **Fixed type, dynamic size** — the element type cannot change after declaration, but the number of elements can grow or shrink freely, unlike a C array whose size is fixed forever. [S1] +- **`[]` vs `.at()`** — both index into a vector, but `.at()` is safer because it signals an error when the index is out of range, while `[]` does not. [S1] +- **`.push_back()` / `.pop_back()`** — add/remove an element at the END of the vector; this is the vector's optimized operation direction. [S1] +- **`.front()` / `.back()`** — access the first/last element directly, without needing an index. [S1] +- **`.size()` / `.empty()`** — get element count / check whether the vector has zero elements (`.empty()` returns 1/0, not a named `true`/`false` string). [S1] +- **Looping** — classic indexed `for` with `.size()`, or the cleaner C++11 for-each (`for (string car : cars)`), or (mentioned, deferred) an iterator. [S1] + +## 📖 세부 내용 (Details) +- Declaration with initial values: `vector cars = {"Volvo", "BMW", "Ford", "Mazda"};`. [S1] +- Access: `cars[0]`, `cars.front()`, `cars.back()`, `cars.at(1)`. [S1] +- Modify: `cars[0] = "Opel";` or the safer `cars.at(0) = "Opel";`. [S1] +- Add: `cars.push_back("Tesla");` — repeatable for multiple elements. [S1] +- Remove: `cars.pop_back();` removes only from the end; for both-ends removal, W3Schools notes a deque is the better fit. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C 배열의 "크기 고정" 제약이 사라짐**: C의 배열은 선언 시 크기가 고정되어 요소를 추가/삭제할 수 없었으나, vector는 동일한 인덱스 문법([])을 유지하면서도 push_back/pop_back으로 동적 크기 조절이 가능해졌다는 점이 이번 챕터에서 확인됨. [S1] +- **`.at()`의 경계 검사는 C 배열에 없던 안전장치**: C는 배열 범위를 벗어난 접근을 컴파일러/런타임이 막지 않고 정의되지 않은 동작(undefined behavior)으로 남겨두지만, `.at()`은 범위를 벗어나면 명시적으로 에러를 발생시킨다. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 자동차 이름을 저장하는 vector에 원소를 추가/삭제/순회하는 예제가 원문 전반에 걸쳐 반복적으로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Core vector operations (C++): +```cpp +#include +vector cars = {"Volvo", "BMW", "Ford", "Mazda"}; + +cout << cars.front(); // Volvo +cout << cars.at(1); // BMW (bounds-checked) +cars.push_back("Tesla"); // add at end +cars.pop_back(); // remove from end +cout << cars.size(); // element count +cout << cars.empty(); // 0 or 1 + +for (string car : cars) { + cout << car << "\n"; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Data Structures]], [[CPP Arrays]], [[CPP List]], [[C Arrays]] +- **참조 맥락:** 데이터 구조(STL) 섹션 — List 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Vectors — https://www.w3schools.com/cpp/cpp_vectors.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Vectors" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_Virtual_Functions.md b/10_Wiki/Dev/Topic_CPP/CPP_Virtual_Functions.md new file mode 100644 index 00000000..006a4c9c --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_Virtual_Functions.md @@ -0,0 +1,81 @@ +--- +id: cpp-virtual-functions +title: "C++ Virtual Functions" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["virtual keyword", "override keyword", "pointer type vs object type", "C++ 가상 함수"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.88 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "oop", "virtual-functions", "polymorphism"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_virtual_functions.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP Virtual Functions]] + +## 🎯 한 줄 통찰 (One-line insight) +Without the `virtual` keyword, a base-class pointer calls the function based on its DECLARED TYPE (`Animal*`), completely ignoring what it actually POINTS TO (a `Dog` object) — the source's own example proves this: `Animal* a = &d;` (where `d` is a `Dog`) still calls `Animal::sound()`, not `Dog::sound()`, UNTIL `virtual` is added to the base method, at which point the SAME pointer-based call correctly resolves to the actual object's type — meaning polymorphism through pointers doesn't work AT ALL by default in C++, and `virtual` is the specific opt-in required to make it happen. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Virtual function** — a base-class member function that CAN be overridden in derived classes and resolved based on the ACTUAL object, not the pointer's declared type. [S1] +- **Without `virtual`** — a base-class pointer always calls the BASE class's version of a method, even if it points to a derived-class object. [S1] +- **With `virtual`** — the SAME pointer call now resolves to the DERIVED class's overridden version — this is how runtime polymorphism actually works in C++. [S1] +- **`override` keyword** — optional but recommended in the derived class, for clarity (documents that this method is intentionally overriding a virtual base method). [S1] +- **`->` operator** — accesses members through a pointer; shorthand for `(*pointer).member`. [S1] + +## 📖 세부 내용 (Details) +- Without virtual — the base class's version runs despite the pointer pointing to a Dog: `class Animal { public: void sound() { cout << "Animal sound\n"; } }; class Dog : public Animal { public: void sound() { cout << "Dog barks\n"; } }; Animal* a; Dog d; a = &d; a->sound(); // "Animal sound" — WRONG, ignores actual object type`. [S1] +- With virtual — the derived class's version correctly runs: `class Animal { public: virtual void sound() { cout << "Animal sound\n"; } }; class Dog : public Animal { public: void sound() override { cout << "Dog barks\n"; } }; Animal* a; Dog d; a = &d; a->sound(); // "Dog barks" — CORRECT`. [S1] +- The `->` shorthand explained: `Animal* a = new Animal(); a->sound(); // same as (*a).sound();`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **virtual 없이는 포인터 기반 다형성이 전혀 작동하지 않음**: Animal 포인터가 실제로는 Dog 객체를 가리키고 있어도 virtual이 없으면 항상 Animal::sound()가 호출된다는 점이 직접 예제로 증명됨 — virtual을 붙여야만 실제 객체 타입 기반으로 올바르게 해석됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 베이스 클래스 포인터로 파생 클래스 객체를 가리키고 올바른 오버라이드 메서드가 호출되도록 하는 것이 실전 다형성 구현의 핵심 요구사항이다. [S1] + +## 💻 코드 패턴 (Code patterns) +virtual making a base-class pointer correctly resolve to the derived class's overridden method (C++): +```cpp +class Animal { +public: + virtual void sound() { cout << "Animal sound\n"; } +}; +class Dog : public Animal { +public: + void sound() override { cout << "Dog barks\n"; } +}; +int main() { + Animal* a; + Dog d; + a = &d; + a->sound(); // Outputs: Dog barks (correct, thanks to virtual) + return 0; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.88 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Polymorphism]], [[CPP Pointers]], [[CPP Friend Function]] +- **참조 맥락:** 가상 함수 — friend 함수(Friend Function) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ Virtual Functions — https://www.w3schools.com/cpp/cpp_virtual_functions.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ Virtual Functions" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_While_Loop.md b/10_Wiki/Dev/Topic_CPP/CPP_While_Loop.md new file mode 100644 index 00000000..94ee5027 --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_While_Loop.md @@ -0,0 +1,68 @@ +--- +id: cpp-while-loop +title: "C++ While Loop" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["while statement", "C++ while 반복문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "loops", "while"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_while_loop.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP While Loop]] + +## 🎯 한 줄 통찰 (One-line insight) +Just as with C, the same explanation for why `i` is the traditional loop-counter name (short, traditional, stands for "index"/"iterator") is repeated verbatim — confirming this naming convention is treated as universal programming culture the tutorial deliberately re-teaches in every language, not something assumed to already be known from a prior language chapter. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`while (condition) { ... }`** — repeats the block as long as the condition remains true, checked before each iteration. [S1] +- **Mandatory condition-variable update** — forgetting to change the loop-controlling variable causes an infinite loop. [S1] +- **`i` as a counter convention** — short, traditional, stands for "index"/"iterator." [S1] + +## 📖 세부 내용 (Details) +- Basic counting loop: `int i = 0; while (i < 5) { cout << i << "\n"; i++; }`. [S1] +- Countdown loop: `int countdown = 3; while (countdown > 0) { cout << countdown << "\n"; countdown--; } cout << "Happy New Year!!\n";`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). C 챕터와 동일한 while 루프 문법 및 카운터 관례가 확인됨. + +## 🛠️ 적용 사례 (Applied in summary) +카운트다운 후 "Happy New Year!!"를 출력하는 예제가 C 챕터와 동일하게 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +A basic counting while loop (C++): +```cpp +int i = 0; +while (i < 5) { + cout << i << "\n"; + i++; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP Switch]], [[CPP While Loop RealLife]], [[C While Loop]] +- **참조 맥락:** 반복문 섹션 첫 챕터 — while 루프 실전 예제(While Loop RealLife) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ While Loop — https://www.w3schools.com/cpp/cpp_while_loop.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ While Loop" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CPP/CPP_While_Loop_RealLife.md b/10_Wiki/Dev/Topic_CPP/CPP_While_Loop_RealLife.md new file mode 100644 index 00000000..209779df --- /dev/null +++ b/10_Wiki/Dev/Topic_CPP/CPP_While_Loop_RealLife.md @@ -0,0 +1,70 @@ +--- +id: cpp-while-loop-reallife +title: "C++ While Loop Examples" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["number reversal", "Yatzy example", "C++ while 루프 실전 예제"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.82 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["cpp", "programming-language", "w3schools", "loops", "while", "real-life-example"] +raw_sources: ["https://www.w3schools.com/cpp/cpp_while_loop_reallife.asp"] +applied_in: [] +github_commit: "" +--- + +# [[CPP While Loop Examples]] + +## 🎯 한 줄 통찰 (One-line insight) +`while (numbers)` still works as a bare-integer condition in C++ exactly as it did in C — relying on the same implicit non-zero-is-true rule — confirming that C++'s inherited arithmetic/truthiness semantics extend even to this somewhat unusual loop-condition style, not just to explicit boolean comparisons. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Bare-integer condition** — `while (numbers)` treats any non-zero `numbers` as true; the loop stops when it becomes 0. [S1] +- **Digit extraction via `% 10` and `/ 10`** — same technique as C for reversing a number's digits. [S1] +- **While loop combined with if/else** — the Yatzy example nests conditional logic inside the loop body. [S1] + +## 📖 세부 내용 (Details) +- Number reversal using a bare-integer condition: `int numbers = 12345; int revNumbers = 0; while (numbers) { revNumbers = revNumbers * 10 + numbers % 10; numbers /= 10; } cout << "Reversed numbers: " << revNumbers << "\n";`. [S1] +- Yatzy dice-checking loop: `int dice = 1; while (dice <= 6) { if (dice < 6) { cout << "No Yatzy\n"; } else { cout << "Yatzy!\n"; } dice = dice + 1; }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- 현재까지 발견된 모순 사항 없음 (No contradictions found in available sources). C 챕터와 동일한 예제 및 정수 조건 특성이 확인됨. + +## 🛠️ 적용 사례 (Applied in summary) +12345를 54321로 뒤집는 숫자 반전 알고리즘이 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Reversing a number's digits using a bare-integer while condition (C++): +```cpp +int numbers = 12345; +int revNumbers = 0; +while (numbers) { + revNumbers = revNumbers * 10 + numbers % 10; + numbers /= 10; +} +cout << "Reversed numbers: " << revNumbers << "\n"; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.82 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C++ Tutorial]] +- **관련 개념:** [[CPP While Loop]], [[CPP Do While Loop]], [[C While Loop RealLife]] +- **참조 맥락:** while 루프 실전 예제 — do/while 루프(Do While Loop) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C++ While Loop Examples — https://www.w3schools.com/cpp/cpp_while_loop_reallife.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C++ While Loop Examples" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Topic_CSS/00_INDEX.md b/10_Wiki/Dev/Topic_CSS/00_INDEX.md similarity index 100% rename from 10_Wiki/Topic_CSS/00_INDEX.md rename to 10_Wiki/Dev/Topic_CSS/00_INDEX.md diff --git a/10_Wiki/Topic_CSS/CSS_2D_Transforms.md b/10_Wiki/Dev/Topic_CSS/CSS_2D_Transforms.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_2D_Transforms.md rename to 10_Wiki/Dev/Topic_CSS/CSS_2D_Transforms.md diff --git a/10_Wiki/Topic_CSS/CSS_2D_Transforms_Scale.md b/10_Wiki/Dev/Topic_CSS/CSS_2D_Transforms_Scale.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_2D_Transforms_Scale.md rename to 10_Wiki/Dev/Topic_CSS/CSS_2D_Transforms_Scale.md diff --git a/10_Wiki/Topic_CSS/CSS_2D_Transforms_Skew.md b/10_Wiki/Dev/Topic_CSS/CSS_2D_Transforms_Skew.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_2D_Transforms_Skew.md rename to 10_Wiki/Dev/Topic_CSS/CSS_2D_Transforms_Skew.md diff --git a/10_Wiki/Topic_CSS/CSS_3D_Transforms.md b/10_Wiki/Dev/Topic_CSS/CSS_3D_Transforms.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_3D_Transforms.md rename to 10_Wiki/Dev/Topic_CSS/CSS_3D_Transforms.md diff --git a/10_Wiki/Topic_CSS/CSS_Accessibility.md b/10_Wiki/Dev/Topic_CSS/CSS_Accessibility.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Accessibility.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Accessibility.md diff --git a/10_Wiki/Topic_CSS/CSS_Add_External.md b/10_Wiki/Dev/Topic_CSS/CSS_Add_External.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Add_External.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Add_External.md diff --git a/10_Wiki/Topic_CSS/CSS_Add_Inline.md b/10_Wiki/Dev/Topic_CSS/CSS_Add_Inline.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Add_Inline.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Add_Inline.md diff --git a/10_Wiki/Topic_CSS/CSS_Add_Internal.md b/10_Wiki/Dev/Topic_CSS/CSS_Add_Internal.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Add_Internal.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Add_Internal.md diff --git a/10_Wiki/Topic_CSS/CSS_Animations.md b/10_Wiki/Dev/Topic_CSS/CSS_Animations.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Animations.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Animations.md diff --git a/10_Wiki/Topic_CSS/CSS_Animations_Properties.md b/10_Wiki/Dev/Topic_CSS/CSS_Animations_Properties.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Animations_Properties.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Animations_Properties.md diff --git a/10_Wiki/Topic_CSS/CSS_Animations_Timing.md b/10_Wiki/Dev/Topic_CSS/CSS_Animations_Timing.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Animations_Timing.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Animations_Timing.md diff --git a/10_Wiki/Topic_CSS/CSS_Attribute_Selectors.md b/10_Wiki/Dev/Topic_CSS/CSS_Attribute_Selectors.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Attribute_Selectors.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Attribute_Selectors.md diff --git a/10_Wiki/Topic_CSS/CSS_Attribute_Selectors_Advanced.md b/10_Wiki/Dev/Topic_CSS/CSS_Attribute_Selectors_Advanced.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Attribute_Selectors_Advanced.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Attribute_Selectors_Advanced.md diff --git a/10_Wiki/Topic_CSS/CSS_Background_Attachment.md b/10_Wiki/Dev/Topic_CSS/CSS_Background_Attachment.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Background_Attachment.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Background_Attachment.md diff --git a/10_Wiki/Topic_CSS/CSS_Background_Clip.md b/10_Wiki/Dev/Topic_CSS/CSS_Background_Clip.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Background_Clip.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Background_Clip.md diff --git a/10_Wiki/Topic_CSS/CSS_Background_Color.md b/10_Wiki/Dev/Topic_CSS/CSS_Background_Color.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Background_Color.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Background_Color.md diff --git a/10_Wiki/Topic_CSS/CSS_Background_Image.md b/10_Wiki/Dev/Topic_CSS/CSS_Background_Image.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Background_Image.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Background_Image.md diff --git a/10_Wiki/Topic_CSS/CSS_Background_Origin.md b/10_Wiki/Dev/Topic_CSS/CSS_Background_Origin.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Background_Origin.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Background_Origin.md diff --git a/10_Wiki/Topic_CSS/CSS_Background_Repeat.md b/10_Wiki/Dev/Topic_CSS/CSS_Background_Repeat.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Background_Repeat.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Background_Repeat.md diff --git a/10_Wiki/Topic_CSS/CSS_Background_Shorthand.md b/10_Wiki/Dev/Topic_CSS/CSS_Background_Shorthand.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Background_Shorthand.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Background_Shorthand.md diff --git a/10_Wiki/Topic_CSS/CSS_Background_Size.md b/10_Wiki/Dev/Topic_CSS/CSS_Background_Size.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Background_Size.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Background_Size.md diff --git a/10_Wiki/Topic_CSS/CSS_Border_Color.md b/10_Wiki/Dev/Topic_CSS/CSS_Border_Color.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Border_Color.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Border_Color.md diff --git a/10_Wiki/Topic_CSS/CSS_Border_Images.md b/10_Wiki/Dev/Topic_CSS/CSS_Border_Images.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Border_Images.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Border_Images.md diff --git a/10_Wiki/Topic_CSS/CSS_Border_Shorthand.md b/10_Wiki/Dev/Topic_CSS/CSS_Border_Shorthand.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Border_Shorthand.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Border_Shorthand.md diff --git a/10_Wiki/Topic_CSS/CSS_Border_Sides.md b/10_Wiki/Dev/Topic_CSS/CSS_Border_Sides.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Border_Sides.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Border_Sides.md diff --git a/10_Wiki/Topic_CSS/CSS_Border_Style.md b/10_Wiki/Dev/Topic_CSS/CSS_Border_Style.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Border_Style.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Border_Style.md diff --git a/10_Wiki/Topic_CSS/CSS_Border_Width.md b/10_Wiki/Dev/Topic_CSS/CSS_Border_Width.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Border_Width.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Border_Width.md diff --git a/10_Wiki/Topic_CSS/CSS_Box_Model.md b/10_Wiki/Dev/Topic_CSS/CSS_Box_Model.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Box_Model.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Box_Model.md diff --git a/10_Wiki/Topic_CSS/CSS_Box_Shadow.md b/10_Wiki/Dev/Topic_CSS/CSS_Box_Shadow.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Box_Shadow.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Box_Shadow.md diff --git a/10_Wiki/Topic_CSS/CSS_Box_Sizing.md b/10_Wiki/Dev/Topic_CSS/CSS_Box_Sizing.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Box_Sizing.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Box_Sizing.md diff --git a/10_Wiki/Topic_CSS/CSS_Buttons.md b/10_Wiki/Dev/Topic_CSS/CSS_Buttons.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Buttons.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Buttons.md diff --git a/10_Wiki/Topic_CSS/CSS_Buttons_Groups.md b/10_Wiki/Dev/Topic_CSS/CSS_Buttons_Groups.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Buttons_Groups.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Buttons_Groups.md diff --git a/10_Wiki/Topic_CSS/CSS_Buttons_Hover.md b/10_Wiki/Dev/Topic_CSS/CSS_Buttons_Hover.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Buttons_Hover.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Buttons_Hover.md diff --git a/10_Wiki/Topic_CSS/CSS_Center_Align.md b/10_Wiki/Dev/Topic_CSS/CSS_Center_Align.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Center_Align.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Center_Align.md diff --git a/10_Wiki/Topic_CSS/CSS_Clear_Clearfix.md b/10_Wiki/Dev/Topic_CSS/CSS_Clear_Clearfix.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Clear_Clearfix.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Clear_Clearfix.md diff --git a/10_Wiki/Topic_CSS/CSS_Color_Keywords.md b/10_Wiki/Dev/Topic_CSS/CSS_Color_Keywords.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Color_Keywords.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Color_Keywords.md diff --git a/10_Wiki/Topic_CSS/CSS_Colors.md b/10_Wiki/Dev/Topic_CSS/CSS_Colors.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Colors.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Colors.md diff --git a/10_Wiki/Topic_CSS/CSS_Colors_CSS3.md b/10_Wiki/Dev/Topic_CSS/CSS_Colors_CSS3.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Colors_CSS3.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Colors_CSS3.md diff --git a/10_Wiki/Topic_CSS/CSS_Combinators.md b/10_Wiki/Dev/Topic_CSS/CSS_Combinators.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Combinators.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Combinators.md diff --git a/10_Wiki/Topic_CSS/CSS_Counters.md b/10_Wiki/Dev/Topic_CSS/CSS_Counters.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Counters.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Counters.md diff --git a/10_Wiki/Topic_CSS/CSS_Counters_Nested.md b/10_Wiki/Dev/Topic_CSS/CSS_Counters_Nested.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Counters_Nested.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Counters_Nested.md diff --git a/10_Wiki/Topic_CSS/CSS_Custom_Fonts.md b/10_Wiki/Dev/Topic_CSS/CSS_Custom_Fonts.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Custom_Fonts.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Custom_Fonts.md diff --git a/10_Wiki/Topic_CSS/CSS_Display.md b/10_Wiki/Dev/Topic_CSS/CSS_Display.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Display.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Display.md diff --git a/10_Wiki/Topic_CSS/CSS_Dropdowns.md b/10_Wiki/Dev/Topic_CSS/CSS_Dropdowns.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Dropdowns.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Dropdowns.md diff --git a/10_Wiki/Topic_CSS/CSS_Dropdowns_Advanced.md b/10_Wiki/Dev/Topic_CSS/CSS_Dropdowns_Advanced.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Dropdowns_Advanced.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Dropdowns_Advanced.md diff --git a/10_Wiki/Topic_CSS/CSS_Flexbox.md b/10_Wiki/Dev/Topic_CSS/CSS_Flexbox.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Flexbox.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Flexbox.md diff --git a/10_Wiki/Topic_CSS/CSS_Flexbox_Align.md b/10_Wiki/Dev/Topic_CSS/CSS_Flexbox_Align.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Flexbox_Align.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Flexbox_Align.md diff --git a/10_Wiki/Topic_CSS/CSS_Flexbox_Container.md b/10_Wiki/Dev/Topic_CSS/CSS_Flexbox_Container.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Flexbox_Container.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Flexbox_Container.md diff --git a/10_Wiki/Topic_CSS/CSS_Flexbox_Items.md b/10_Wiki/Dev/Topic_CSS/CSS_Flexbox_Items.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Flexbox_Items.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Flexbox_Items.md diff --git a/10_Wiki/Topic_CSS/CSS_Flexbox_Justify.md b/10_Wiki/Dev/Topic_CSS/CSS_Flexbox_Justify.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Flexbox_Justify.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Flexbox_Justify.md diff --git a/10_Wiki/Topic_CSS/CSS_Flexbox_Responsive.md b/10_Wiki/Dev/Topic_CSS/CSS_Flexbox_Responsive.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Flexbox_Responsive.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Flexbox_Responsive.md diff --git a/10_Wiki/Topic_CSS/CSS_Float.md b/10_Wiki/Dev/Topic_CSS/CSS_Float.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Float.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Float.md diff --git a/10_Wiki/Topic_CSS/CSS_Float_Examples.md b/10_Wiki/Dev/Topic_CSS/CSS_Float_Examples.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Float_Examples.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Float_Examples.md diff --git a/10_Wiki/Topic_CSS/CSS_Font_Fallbacks.md b/10_Wiki/Dev/Topic_CSS/CSS_Font_Fallbacks.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Font_Fallbacks.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Font_Fallbacks.md diff --git a/10_Wiki/Topic_CSS/CSS_Font_Family.md b/10_Wiki/Dev/Topic_CSS/CSS_Font_Family.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Font_Family.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Font_Family.md diff --git a/10_Wiki/Topic_CSS/CSS_Font_Google.md b/10_Wiki/Dev/Topic_CSS/CSS_Font_Google.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Font_Google.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Font_Google.md diff --git a/10_Wiki/Topic_CSS/CSS_Font_Pairings.md b/10_Wiki/Dev/Topic_CSS/CSS_Font_Pairings.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Font_Pairings.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Font_Pairings.md diff --git a/10_Wiki/Topic_CSS/CSS_Font_Shorthand.md b/10_Wiki/Dev/Topic_CSS/CSS_Font_Shorthand.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Font_Shorthand.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Font_Shorthand.md diff --git a/10_Wiki/Topic_CSS/CSS_Font_Size.md b/10_Wiki/Dev/Topic_CSS/CSS_Font_Size.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Font_Size.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Font_Size.md diff --git a/10_Wiki/Topic_CSS/CSS_Font_Style.md b/10_Wiki/Dev/Topic_CSS/CSS_Font_Style.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Font_Style.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Font_Style.md diff --git a/10_Wiki/Topic_CSS/CSS_Font_Web_Safe.md b/10_Wiki/Dev/Topic_CSS/CSS_Font_Web_Safe.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Font_Web_Safe.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Font_Web_Safe.md diff --git a/10_Wiki/Topic_CSS/CSS_Form_Elements.md b/10_Wiki/Dev/Topic_CSS/CSS_Form_Elements.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Form_Elements.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Form_Elements.md diff --git a/10_Wiki/Topic_CSS/CSS_Form_Focus.md b/10_Wiki/Dev/Topic_CSS/CSS_Form_Focus.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Form_Focus.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Form_Focus.md diff --git a/10_Wiki/Topic_CSS/CSS_Gradients_Conic.md b/10_Wiki/Dev/Topic_CSS/CSS_Gradients_Conic.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Gradients_Conic.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Gradients_Conic.md diff --git a/10_Wiki/Topic_CSS/CSS_Gradients_Linear.md b/10_Wiki/Dev/Topic_CSS/CSS_Gradients_Linear.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Gradients_Linear.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Gradients_Linear.md diff --git a/10_Wiki/Topic_CSS/CSS_Gradients_Radial.md b/10_Wiki/Dev/Topic_CSS/CSS_Gradients_Radial.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Gradients_Radial.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Gradients_Radial.md diff --git a/10_Wiki/Topic_CSS/CSS_Grid.md b/10_Wiki/Dev/Topic_CSS/CSS_Grid.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Grid.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Grid.md diff --git a/10_Wiki/Topic_CSS/CSS_Grid_12Column.md b/10_Wiki/Dev/Topic_CSS/CSS_Grid_12Column.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Grid_12Column.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Grid_12Column.md diff --git a/10_Wiki/Topic_CSS/CSS_Grid_Align.md b/10_Wiki/Dev/Topic_CSS/CSS_Grid_Align.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Grid_Align.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Grid_Align.md diff --git a/10_Wiki/Topic_CSS/CSS_Grid_Container.md b/10_Wiki/Dev/Topic_CSS/CSS_Grid_Container.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Grid_Container.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Grid_Container.md diff --git a/10_Wiki/Topic_CSS/CSS_Grid_Gaps.md b/10_Wiki/Dev/Topic_CSS/CSS_Grid_Gaps.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Grid_Gaps.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Grid_Gaps.md diff --git a/10_Wiki/Topic_CSS/CSS_Grid_Item_Align.md b/10_Wiki/Dev/Topic_CSS/CSS_Grid_Item_Align.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Grid_Item_Align.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Grid_Item_Align.md diff --git a/10_Wiki/Topic_CSS/CSS_Grid_Item_Named.md b/10_Wiki/Dev/Topic_CSS/CSS_Grid_Item_Named.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Grid_Item_Named.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Grid_Item_Named.md diff --git a/10_Wiki/Topic_CSS/CSS_Grid_Item_Order.md b/10_Wiki/Dev/Topic_CSS/CSS_Grid_Item_Order.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Grid_Item_Order.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Grid_Item_Order.md diff --git a/10_Wiki/Topic_CSS/CSS_Grid_Items.md b/10_Wiki/Dev/Topic_CSS/CSS_Grid_Items.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Grid_Items.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Grid_Items.md diff --git a/10_Wiki/Topic_CSS/CSS_Grid_Tracks.md b/10_Wiki/Dev/Topic_CSS/CSS_Grid_Tracks.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Grid_Tracks.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Grid_Tracks.md diff --git a/10_Wiki/Topic_CSS/CSS_Grouping_Selectors.md b/10_Wiki/Dev/Topic_CSS/CSS_Grouping_Selectors.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Grouping_Selectors.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Grouping_Selectors.md diff --git a/10_Wiki/Topic_CSS/CSS_HEX.md b/10_Wiki/Dev/Topic_CSS/CSS_HEX.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_HEX.md rename to 10_Wiki/Dev/Topic_CSS/CSS_HEX.md diff --git a/10_Wiki/Topic_CSS/CSS_HSL.md b/10_Wiki/Dev/Topic_CSS/CSS_HSL.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_HSL.md rename to 10_Wiki/Dev/Topic_CSS/CSS_HSL.md diff --git a/10_Wiki/Topic_CSS/CSS_Height_Width.md b/10_Wiki/Dev/Topic_CSS/CSS_Height_Width.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Height_Width.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Height_Width.md diff --git a/10_Wiki/Topic_CSS/CSS_Horizontal_Align.md b/10_Wiki/Dev/Topic_CSS/CSS_Horizontal_Align.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Horizontal_Align.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Horizontal_Align.md diff --git a/10_Wiki/Topic_CSS/CSS_Horizontal_Navbar.md b/10_Wiki/Dev/Topic_CSS/CSS_Horizontal_Navbar.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Horizontal_Navbar.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Horizontal_Navbar.md diff --git a/10_Wiki/Topic_CSS/CSS_Icons_Bootstrap.md b/10_Wiki/Dev/Topic_CSS/CSS_Icons_Bootstrap.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Icons_Bootstrap.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Icons_Bootstrap.md diff --git a/10_Wiki/Topic_CSS/CSS_Icons_Font_Awesome.md b/10_Wiki/Dev/Topic_CSS/CSS_Icons_Font_Awesome.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Icons_Font_Awesome.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Icons_Font_Awesome.md diff --git a/10_Wiki/Topic_CSS/CSS_Icons_Google.md b/10_Wiki/Dev/Topic_CSS/CSS_Icons_Google.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Icons_Google.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Icons_Google.md diff --git a/10_Wiki/Topic_CSS/CSS_Image_Centering.md b/10_Wiki/Dev/Topic_CSS/CSS_Image_Centering.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Image_Centering.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Image_Centering.md diff --git a/10_Wiki/Topic_CSS/CSS_Image_Effects.md b/10_Wiki/Dev/Topic_CSS/CSS_Image_Effects.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Image_Effects.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Image_Effects.md diff --git a/10_Wiki/Topic_CSS/CSS_Image_Filters.md b/10_Wiki/Dev/Topic_CSS/CSS_Image_Filters.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Image_Filters.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Image_Filters.md diff --git a/10_Wiki/Topic_CSS/CSS_Image_Gallery.md b/10_Wiki/Dev/Topic_CSS/CSS_Image_Gallery.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Image_Gallery.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Image_Gallery.md diff --git a/10_Wiki/Topic_CSS/CSS_Image_Hover.md b/10_Wiki/Dev/Topic_CSS/CSS_Image_Hover.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Image_Hover.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Image_Hover.md diff --git a/10_Wiki/Topic_CSS/CSS_Image_Modal.md b/10_Wiki/Dev/Topic_CSS/CSS_Image_Modal.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Image_Modal.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Image_Modal.md diff --git a/10_Wiki/Topic_CSS/CSS_Image_Shapes.md b/10_Wiki/Dev/Topic_CSS/CSS_Image_Shapes.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Image_Shapes.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Image_Shapes.md diff --git a/10_Wiki/Topic_CSS/CSS_Image_Sprites.md b/10_Wiki/Dev/Topic_CSS/CSS_Image_Sprites.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Image_Sprites.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Image_Sprites.md diff --git a/10_Wiki/Topic_CSS/CSS_Image_Styling.md b/10_Wiki/Dev/Topic_CSS/CSS_Image_Styling.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Image_Styling.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Image_Styling.md diff --git a/10_Wiki/Topic_CSS/CSS_Important.md b/10_Wiki/Dev/Topic_CSS/CSS_Important.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Important.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Important.md diff --git a/10_Wiki/Topic_CSS/CSS_Inheritance.md b/10_Wiki/Dev/Topic_CSS/CSS_Inheritance.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Inheritance.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Inheritance.md diff --git a/10_Wiki/Topic_CSS/CSS_Inline_Block.md b/10_Wiki/Dev/Topic_CSS/CSS_Inline_Block.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Inline_Block.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Inline_Block.md diff --git a/10_Wiki/Topic_CSS/CSS_Introduction.md b/10_Wiki/Dev/Topic_CSS/CSS_Introduction.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Introduction.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Introduction.md diff --git a/10_Wiki/Topic_CSS/CSS_Link_Buttons.md b/10_Wiki/Dev/Topic_CSS/CSS_Link_Buttons.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Link_Buttons.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Link_Buttons.md diff --git a/10_Wiki/Topic_CSS/CSS_Margin_Collapse.md b/10_Wiki/Dev/Topic_CSS/CSS_Margin_Collapse.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Margin_Collapse.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Margin_Collapse.md diff --git a/10_Wiki/Topic_CSS/CSS_Margins.md b/10_Wiki/Dev/Topic_CSS/CSS_Margins.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Margins.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Margins.md diff --git a/10_Wiki/Topic_CSS/CSS_Masking_Gradients.md b/10_Wiki/Dev/Topic_CSS/CSS_Masking_Gradients.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Masking_Gradients.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Masking_Gradients.md diff --git a/10_Wiki/Topic_CSS/CSS_Masking_PNG.md b/10_Wiki/Dev/Topic_CSS/CSS_Masking_PNG.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Masking_PNG.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Masking_PNG.md diff --git a/10_Wiki/Topic_CSS/CSS_Masking_SVG.md b/10_Wiki/Dev/Topic_CSS/CSS_Masking_SVG.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Masking_SVG.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Masking_SVG.md diff --git a/10_Wiki/Topic_CSS/CSS_Math_Functions.md b/10_Wiki/Dev/Topic_CSS/CSS_Math_Functions.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Math_Functions.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Math_Functions.md diff --git a/10_Wiki/Topic_CSS/CSS_Max_Width.md b/10_Wiki/Dev/Topic_CSS/CSS_Max_Width.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Max_Width.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Max_Width.md diff --git a/10_Wiki/Topic_CSS/CSS_Media_Queries.md b/10_Wiki/Dev/Topic_CSS/CSS_Media_Queries.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Media_Queries.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Media_Queries.md diff --git a/10_Wiki/Topic_CSS/CSS_Media_Queries_Examples.md b/10_Wiki/Dev/Topic_CSS/CSS_Media_Queries_Examples.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Media_Queries_Examples.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Media_Queries_Examples.md diff --git a/10_Wiki/Topic_CSS/CSS_Min_Max.md b/10_Wiki/Dev/Topic_CSS/CSS_Min_Max.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Min_Max.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Min_Max.md diff --git a/10_Wiki/Topic_CSS/CSS_Multiple_Backgrounds.md b/10_Wiki/Dev/Topic_CSS/CSS_Multiple_Backgrounds.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Multiple_Backgrounds.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Multiple_Backgrounds.md diff --git a/10_Wiki/Topic_CSS/CSS_Multiple_Columns.md b/10_Wiki/Dev/Topic_CSS/CSS_Multiple_Columns.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Multiple_Columns.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Multiple_Columns.md diff --git a/10_Wiki/Topic_CSS/CSS_Multiple_Columns_Rules.md b/10_Wiki/Dev/Topic_CSS/CSS_Multiple_Columns_Rules.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Multiple_Columns_Rules.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Multiple_Columns_Rules.md diff --git a/10_Wiki/Topic_CSS/CSS_Multiple_Style_Sheets.md b/10_Wiki/Dev/Topic_CSS/CSS_Multiple_Style_Sheets.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Multiple_Style_Sheets.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Multiple_Style_Sheets.md diff --git a/10_Wiki/Topic_CSS/CSS_Navbar.md b/10_Wiki/Dev/Topic_CSS/CSS_Navbar.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Navbar.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Navbar.md diff --git a/10_Wiki/Topic_CSS/CSS_Object_Fit.md b/10_Wiki/Dev/Topic_CSS/CSS_Object_Fit.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Object_Fit.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Object_Fit.md diff --git a/10_Wiki/Topic_CSS/CSS_Object_Position.md b/10_Wiki/Dev/Topic_CSS/CSS_Object_Position.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Object_Position.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Object_Position.md diff --git a/10_Wiki/Topic_CSS/CSS_Opacity.md b/10_Wiki/Dev/Topic_CSS/CSS_Opacity.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Opacity.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Opacity.md diff --git a/10_Wiki/Topic_CSS/CSS_Optimization.md b/10_Wiki/Dev/Topic_CSS/CSS_Optimization.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Optimization.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Optimization.md diff --git a/10_Wiki/Topic_CSS/CSS_Outline_Color.md b/10_Wiki/Dev/Topic_CSS/CSS_Outline_Color.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Outline_Color.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Outline_Color.md diff --git a/10_Wiki/Topic_CSS/CSS_Outline_Offset.md b/10_Wiki/Dev/Topic_CSS/CSS_Outline_Offset.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Outline_Offset.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Outline_Offset.md diff --git a/10_Wiki/Topic_CSS/CSS_Outline_Shorthand.md b/10_Wiki/Dev/Topic_CSS/CSS_Outline_Shorthand.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Outline_Shorthand.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Outline_Shorthand.md diff --git a/10_Wiki/Topic_CSS/CSS_Outline_Style.md b/10_Wiki/Dev/Topic_CSS/CSS_Outline_Style.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Outline_Style.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Outline_Style.md diff --git a/10_Wiki/Topic_CSS/CSS_Outline_Width.md b/10_Wiki/Dev/Topic_CSS/CSS_Outline_Width.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Outline_Width.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Outline_Width.md diff --git a/10_Wiki/Topic_CSS/CSS_Overflow.md b/10_Wiki/Dev/Topic_CSS/CSS_Overflow.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Overflow.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Overflow.md diff --git a/10_Wiki/Topic_CSS/CSS_Overflow_XY.md b/10_Wiki/Dev/Topic_CSS/CSS_Overflow_XY.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Overflow_XY.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Overflow_XY.md diff --git a/10_Wiki/Topic_CSS/CSS_Padding.md b/10_Wiki/Dev/Topic_CSS/CSS_Padding.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Padding.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Padding.md diff --git a/10_Wiki/Topic_CSS/CSS_Padding_Box_Sizing.md b/10_Wiki/Dev/Topic_CSS/CSS_Padding_Box_Sizing.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Padding_Box_Sizing.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Padding_Box_Sizing.md diff --git a/10_Wiki/Topic_CSS/CSS_Pagination.md b/10_Wiki/Dev/Topic_CSS/CSS_Pagination.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Pagination.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Pagination.md diff --git a/10_Wiki/Topic_CSS/CSS_Pagination_Styles.md b/10_Wiki/Dev/Topic_CSS/CSS_Pagination_Styles.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Pagination_Styles.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Pagination_Styles.md diff --git a/10_Wiki/Topic_CSS/CSS_Position.md b/10_Wiki/Dev/Topic_CSS/CSS_Position.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Position.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Position.md diff --git a/10_Wiki/Topic_CSS/CSS_Position_Fixed_Absolute.md b/10_Wiki/Dev/Topic_CSS/CSS_Position_Fixed_Absolute.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Position_Fixed_Absolute.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Position_Fixed_Absolute.md diff --git a/10_Wiki/Topic_CSS/CSS_Position_Offsets.md b/10_Wiki/Dev/Topic_CSS/CSS_Position_Offsets.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Position_Offsets.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Position_Offsets.md diff --git a/10_Wiki/Topic_CSS/CSS_Position_Sticky.md b/10_Wiki/Dev/Topic_CSS/CSS_Position_Sticky.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Position_Sticky.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Position_Sticky.md diff --git a/10_Wiki/Topic_CSS/CSS_Property_Rule.md b/10_Wiki/Dev/Topic_CSS/CSS_Property_Rule.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Property_Rule.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Property_Rule.md diff --git a/10_Wiki/Topic_CSS/CSS_Pseudo_Classes.md b/10_Wiki/Dev/Topic_CSS/CSS_Pseudo_Classes.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Pseudo_Classes.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Pseudo_Classes.md diff --git a/10_Wiki/Topic_CSS/CSS_Pseudo_Classes_Interactive.md b/10_Wiki/Dev/Topic_CSS/CSS_Pseudo_Classes_Interactive.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Pseudo_Classes_Interactive.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Pseudo_Classes_Interactive.md diff --git a/10_Wiki/Topic_CSS/CSS_Pseudo_Classes_Structural.md b/10_Wiki/Dev/Topic_CSS/CSS_Pseudo_Classes_Structural.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Pseudo_Classes_Structural.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Pseudo_Classes_Structural.md diff --git a/10_Wiki/Topic_CSS/CSS_Pseudo_Elements.md b/10_Wiki/Dev/Topic_CSS/CSS_Pseudo_Elements.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Pseudo_Elements.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Pseudo_Elements.md diff --git a/10_Wiki/Topic_CSS/CSS_Pseudo_Elements_Content.md b/10_Wiki/Dev/Topic_CSS/CSS_Pseudo_Elements_Content.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Pseudo_Elements_Content.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Pseudo_Elements_Content.md diff --git a/10_Wiki/Topic_CSS/CSS_Pseudo_Elements_Text.md b/10_Wiki/Dev/Topic_CSS/CSS_Pseudo_Elements_Text.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Pseudo_Elements_Text.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Pseudo_Elements_Text.md diff --git a/10_Wiki/Topic_CSS/CSS_RGB.md b/10_Wiki/Dev/Topic_CSS/CSS_RGB.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_RGB.md rename to 10_Wiki/Dev/Topic_CSS/CSS_RGB.md diff --git a/10_Wiki/Topic_CSS/CSS_RWD_Grid_View.md b/10_Wiki/Dev/Topic_CSS/CSS_RWD_Grid_View.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_RWD_Grid_View.md rename to 10_Wiki/Dev/Topic_CSS/CSS_RWD_Grid_View.md diff --git a/10_Wiki/Topic_CSS/CSS_RWD_Images.md b/10_Wiki/Dev/Topic_CSS/CSS_RWD_Images.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_RWD_Images.md rename to 10_Wiki/Dev/Topic_CSS/CSS_RWD_Images.md diff --git a/10_Wiki/Topic_CSS/CSS_RWD_Intro.md b/10_Wiki/Dev/Topic_CSS/CSS_RWD_Intro.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_RWD_Intro.md rename to 10_Wiki/Dev/Topic_CSS/CSS_RWD_Intro.md diff --git a/10_Wiki/Topic_CSS/CSS_RWD_Media_Queries.md b/10_Wiki/Dev/Topic_CSS/CSS_RWD_Media_Queries.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_RWD_Media_Queries.md rename to 10_Wiki/Dev/Topic_CSS/CSS_RWD_Media_Queries.md diff --git a/10_Wiki/Topic_CSS/CSS_RWD_Videos.md b/10_Wiki/Dev/Topic_CSS/CSS_RWD_Videos.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_RWD_Videos.md rename to 10_Wiki/Dev/Topic_CSS/CSS_RWD_Videos.md diff --git a/10_Wiki/Topic_CSS/CSS_RWD_Viewport.md b/10_Wiki/Dev/Topic_CSS/CSS_RWD_Viewport.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_RWD_Viewport.md rename to 10_Wiki/Dev/Topic_CSS/CSS_RWD_Viewport.md diff --git a/10_Wiki/Topic_CSS/CSS_Rounded_Borders.md b/10_Wiki/Dev/Topic_CSS/CSS_Rounded_Borders.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Rounded_Borders.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Rounded_Borders.md diff --git a/10_Wiki/Topic_CSS/CSS_Rounded_Corners.md b/10_Wiki/Dev/Topic_CSS/CSS_Rounded_Corners.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Rounded_Corners.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Rounded_Corners.md diff --git a/10_Wiki/Topic_CSS/CSS_Selectors.md b/10_Wiki/Dev/Topic_CSS/CSS_Selectors.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Selectors.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Selectors.md diff --git a/10_Wiki/Topic_CSS/CSS_Shadow_Text.md b/10_Wiki/Dev/Topic_CSS/CSS_Shadow_Text.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Shadow_Text.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Shadow_Text.md diff --git a/10_Wiki/Topic_CSS/CSS_Specificity.md b/10_Wiki/Dev/Topic_CSS/CSS_Specificity.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Specificity.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Specificity.md diff --git a/10_Wiki/Topic_CSS/CSS_Specificity_Hierarchy.md b/10_Wiki/Dev/Topic_CSS/CSS_Specificity_Hierarchy.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Specificity_Hierarchy.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Specificity_Hierarchy.md diff --git a/10_Wiki/Topic_CSS/CSS_Style_Forms.md b/10_Wiki/Dev/Topic_CSS/CSS_Style_Forms.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Style_Forms.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Style_Forms.md diff --git a/10_Wiki/Topic_CSS/CSS_Style_Inputs.md b/10_Wiki/Dev/Topic_CSS/CSS_Style_Inputs.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Style_Inputs.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Style_Inputs.md diff --git a/10_Wiki/Topic_CSS/CSS_Styling_Links.md b/10_Wiki/Dev/Topic_CSS/CSS_Styling_Links.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Styling_Links.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Styling_Links.md diff --git a/10_Wiki/Topic_CSS/CSS_Styling_Lists.md b/10_Wiki/Dev/Topic_CSS/CSS_Styling_Lists.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Styling_Lists.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Styling_Lists.md diff --git a/10_Wiki/Topic_CSS/CSS_Supports_Rule.md b/10_Wiki/Dev/Topic_CSS/CSS_Supports_Rule.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Supports_Rule.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Supports_Rule.md diff --git a/10_Wiki/Topic_CSS/CSS_Syntax.md b/10_Wiki/Dev/Topic_CSS/CSS_Syntax.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Syntax.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Syntax.md diff --git a/10_Wiki/Topic_CSS/CSS_Table_Alignment.md b/10_Wiki/Dev/Topic_CSS/CSS_Table_Alignment.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Table_Alignment.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Table_Alignment.md diff --git a/10_Wiki/Topic_CSS/CSS_Table_Borders.md b/10_Wiki/Dev/Topic_CSS/CSS_Table_Borders.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Table_Borders.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Table_Borders.md diff --git a/10_Wiki/Topic_CSS/CSS_Table_Responsive.md b/10_Wiki/Dev/Topic_CSS/CSS_Table_Responsive.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Table_Responsive.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Table_Responsive.md diff --git a/10_Wiki/Topic_CSS/CSS_Table_Size.md b/10_Wiki/Dev/Topic_CSS/CSS_Table_Size.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Table_Size.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Table_Size.md diff --git a/10_Wiki/Topic_CSS/CSS_Table_Styling.md b/10_Wiki/Dev/Topic_CSS/CSS_Table_Styling.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Table_Styling.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Table_Styling.md diff --git a/10_Wiki/Topic_CSS/CSS_Text_Alignment.md b/10_Wiki/Dev/Topic_CSS/CSS_Text_Alignment.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Text_Alignment.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Text_Alignment.md diff --git a/10_Wiki/Topic_CSS/CSS_Text_Color.md b/10_Wiki/Dev/Topic_CSS/CSS_Text_Color.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Text_Color.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Text_Color.md diff --git a/10_Wiki/Topic_CSS/CSS_Text_Decoration.md b/10_Wiki/Dev/Topic_CSS/CSS_Text_Decoration.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Text_Decoration.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Text_Decoration.md diff --git a/10_Wiki/Topic_CSS/CSS_Text_Decoration_Styles.md b/10_Wiki/Dev/Topic_CSS/CSS_Text_Decoration_Styles.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Text_Decoration_Styles.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Text_Decoration_Styles.md diff --git a/10_Wiki/Topic_CSS/CSS_Text_Effects.md b/10_Wiki/Dev/Topic_CSS/CSS_Text_Effects.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Text_Effects.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Text_Effects.md diff --git a/10_Wiki/Topic_CSS/CSS_Text_Shadow.md b/10_Wiki/Dev/Topic_CSS/CSS_Text_Shadow.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Text_Shadow.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Text_Shadow.md diff --git a/10_Wiki/Topic_CSS/CSS_Text_Spacing.md b/10_Wiki/Dev/Topic_CSS/CSS_Text_Spacing.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Text_Spacing.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Text_Spacing.md diff --git a/10_Wiki/Topic_CSS/CSS_Text_Transformation.md b/10_Wiki/Dev/Topic_CSS/CSS_Text_Transformation.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Text_Transformation.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Text_Transformation.md diff --git a/10_Wiki/Topic_CSS/CSS_Tooltip_Arrows.md b/10_Wiki/Dev/Topic_CSS/CSS_Tooltip_Arrows.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Tooltip_Arrows.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Tooltip_Arrows.md diff --git a/10_Wiki/Topic_CSS/CSS_Tooltips.md b/10_Wiki/Dev/Topic_CSS/CSS_Tooltips.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Tooltips.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Tooltips.md diff --git a/10_Wiki/Topic_CSS/CSS_Transitions.md b/10_Wiki/Dev/Topic_CSS/CSS_Transitions.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Transitions.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Transitions.md diff --git a/10_Wiki/Topic_CSS/CSS_Transitions_Timing.md b/10_Wiki/Dev/Topic_CSS/CSS_Transitions_Timing.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Transitions_Timing.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Transitions_Timing.md diff --git a/10_Wiki/Topic_CSS/CSS_Units.md b/10_Wiki/Dev/Topic_CSS/CSS_Units.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Units.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Units.md diff --git a/10_Wiki/Topic_CSS/CSS_Units_Absolute.md b/10_Wiki/Dev/Topic_CSS/CSS_Units_Absolute.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Units_Absolute.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Units_Absolute.md diff --git a/10_Wiki/Topic_CSS/CSS_Units_Relative.md b/10_Wiki/Dev/Topic_CSS/CSS_Units_Relative.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Units_Relative.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Units_Relative.md diff --git a/10_Wiki/Topic_CSS/CSS_User_Interface.md b/10_Wiki/Dev/Topic_CSS/CSS_User_Interface.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_User_Interface.md rename to 10_Wiki/Dev/Topic_CSS/CSS_User_Interface.md diff --git a/10_Wiki/Topic_CSS/CSS_Variables.md b/10_Wiki/Dev/Topic_CSS/CSS_Variables.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Variables.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Variables.md diff --git a/10_Wiki/Topic_CSS/CSS_Variables_JavaScript.md b/10_Wiki/Dev/Topic_CSS/CSS_Variables_JavaScript.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Variables_JavaScript.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Variables_JavaScript.md diff --git a/10_Wiki/Topic_CSS/CSS_Variables_MediaQueries.md b/10_Wiki/Dev/Topic_CSS/CSS_Variables_MediaQueries.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Variables_MediaQueries.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Variables_MediaQueries.md diff --git a/10_Wiki/Topic_CSS/CSS_Variables_Overriding.md b/10_Wiki/Dev/Topic_CSS/CSS_Variables_Overriding.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Variables_Overriding.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Variables_Overriding.md diff --git a/10_Wiki/Topic_CSS/CSS_Vertical_Align.md b/10_Wiki/Dev/Topic_CSS/CSS_Vertical_Align.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Vertical_Align.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Vertical_Align.md diff --git a/10_Wiki/Topic_CSS/CSS_Vertical_Navbar.md b/10_Wiki/Dev/Topic_CSS/CSS_Vertical_Navbar.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Vertical_Navbar.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Vertical_Navbar.md diff --git a/10_Wiki/Topic_CSS/CSS_Visibility_Hide.md b/10_Wiki/Dev/Topic_CSS/CSS_Visibility_Hide.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Visibility_Hide.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Visibility_Hide.md diff --git a/10_Wiki/Topic_CSS/CSS_Website_Layout.md b/10_Wiki/Dev/Topic_CSS/CSS_Website_Layout.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Website_Layout.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Website_Layout.md diff --git a/10_Wiki/Topic_CSS/CSS_Z_Index.md b/10_Wiki/Dev/Topic_CSS/CSS_Z_Index.md similarity index 100% rename from 10_Wiki/Topic_CSS/CSS_Z_Index.md rename to 10_Wiki/Dev/Topic_CSS/CSS_Z_Index.md diff --git a/10_Wiki/Dev/Topic_CSharp/00_INDEX.md b/10_Wiki/Dev/Topic_CSharp/00_INDEX.md new file mode 100644 index 00000000..38da8170 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/00_INDEX.md @@ -0,0 +1,158 @@ +--- +id: csharp-tutorial-index +title: "C# Tutorial" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["C# Tutorial", "C# MOC", "Topic_CSharp index", "C# 목차"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.90 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "moc", "index"] +raw_sources: ["https://www.w3schools.com/cs/cs_intro.php"] +applied_in: [] +github_commit: "" +--- + +# [[C# Tutorial]] + +## 🎯 한 줄 통찰 (One-line insight) +Map of Content (MOC) for the W3Schools C# Tutorial — the root that links every core C# knowledge page in this topic folder. [S1] + +## 🧠 핵심 개념 (Core concepts) +- This folder (`Topic_CSharp`) wikifies the C# programming language tutorial, one knowledge page per document, in P-Reinforce v3.1 format — same convention as `Topic_CPP` / `Topic_C` / `Topic_Java` / `Topic_PHP` / `Topic_Python` / `Topic_SQL` / `Topic_W3CSS` / `Topic_HTML` / `Topic_CSS` / `Topic_JavaScript`. [S1] +- **File prefix**: `CSharp_` (not `CS_`, to avoid ambiguity with "Computer Science"), folder `Topic_CSharp`. Source URL slugs use `cs_` and file extension `.php` (verified via curl, same as Topic_C — NOT `.asp` like Topic_CPP). [S1] +- **Scope**: tutorial + "Learning by examples" pages only, scraped from `cs_intro.php`'s sidebar (58 links total, confirmed as the full & final list — no separate `default.php` exists for this category, 404). **Excluded**: `cs_compiler`/`cs_exam`/`cs_examples`/`cs_exercises`/`cs_practice`/`cs_quiz`/`cs_server`/`cs_study_plan`/`cs_syllabus` (meta/index pages), `cs_howto_add_two_numbers` (1 page, reserved for the separate HOW TO category later in the series). Notably, unlike other categories, no `cs_ref_*` reference-dump pages appeared in this sidebar at all. [S1] +- **Progress:** **58 of 58 planned docs complete — C# category done.** [S1] +- Every page roots its Knowledge Graph back to this `[[C# Tutorial]]` node. + +## 📖 세부 내용 (Details) + +### Basics +- [[CSharp Intro]] ✅ +- [[CSharp Get Started]] ✅ +- [[CSharp Syntax]] ✅ +- [[CSharp Output]] ✅ +- [[CSharp Comments]] ✅ + +### Variables +- [[CSharp Variables]] ✅ +- [[CSharp Variables Identifiers]] ✅ +- [[CSharp Variables Constants]] ✅ +- [[CSharp Variables Display]] ✅ +- [[CSharp Variables Multiple]] ✅ + +### Data Types & Type Casting +- [[CSharp Data Types]] ✅ +- [[CSharp Type Casting]] ✅ + +### Operators +- [[CSharp Operators]] ✅ +- [[CSharp Operators Assignment]] ✅ +- [[CSharp Operators Comparison]] ✅ +- [[CSharp Operators Logical]] ✅ + +### Math +- [[CSharp Math]] ✅ + +### Strings +- [[CSharp Strings]] ✅ +- [[CSharp Strings Concat]] ✅ +- [[CSharp Strings Interpol]] ✅ +- [[CSharp Strings Access]] ✅ +- [[CSharp Strings Chars]] ✅ + +### Booleans +- [[CSharp Booleans]] ✅ + +### Conditions +- [[CSharp Conditions]] ✅ +- [[CSharp Conditions Else]] ✅ +- [[CSharp Conditions ElseIf]] ✅ +- [[CSharp Conditions Shorthand]] ✅ + +### Switch +- [[CSharp Switch]] ✅ + +### Loops +- [[CSharp While Loop]] ✅ +- [[CSharp For Loop]] ✅ +- [[CSharp Foreach Loop]] ✅ +- [[CSharp Break]] ✅ + +### Arrays +- [[CSharp Arrays]] ✅ +- [[CSharp Arrays Loop]] ✅ +- [[CSharp Arrays Sort]] ✅ +- [[CSharp Arrays Multi]] ✅ + +### Methods +- [[CSharp Methods]] ✅ +- [[CSharp Method Parameters]] ✅ +- [[CSharp Method Parameters Default]] ✅ +- [[CSharp Method Parameters Named Args]] ✅ +- [[CSharp Method Overloading]] ✅ +- [[CSharp Method Parameters Return]] ✅ + +### OOP Basics +- [[CSharp OOP]] ✅ +- [[CSharp Classes]] ✅ +- [[CSharp Class Members]] ✅ +- [[CSharp Classes Multi]] ✅ + +### Constructors +- [[CSharp Constructors]] ✅ + +### Access Modifiers & Properties +- [[CSharp Access Modifiers]] ✅ +- [[CSharp Properties]] ✅ + +### Inheritance +- [[CSharp Inheritance]] ✅ + +### Polymorphism & Abstract +- [[CSharp Polymorphism]] ✅ +- [[CSharp Abstract]] ✅ + +### Interface +- [[CSharp Interface]] ✅ +- [[CSharp Interface Multi]] ✅ + +### Enums +- [[CSharp Enums]] ✅ + +### User Input +- [[CSharp User Input]] ✅ + +### Exceptions +- [[CSharp Exceptions]] ✅ + +### Files +- [[CSharp Files]] ✅ + +## 🛠️ 적용 사례 (Applied in summary) +58 knowledge documents generated across 21 sections in this batch run. + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference) +- **신뢰 점수:** 0.90 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[10_Wiki]] +- **관련 개념:** [[C++ Tutorial]], [[Java Tutorial]], [[CSharp Intro]] +- **참조 맥락:** SQL/Python/Java/PHP/W3.CSS/C/C++에 이어 W3Schools 지식화 시리즈의 다음 카테고리 — C++ 다음의 Microsoft/.NET 계열 객체지향 언어. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Tutorial — https://www.w3schools.com/cs/cs_intro.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Created C# Tutorial MOC with scope decisions and full planned page list (Astra wiki-curation, P-Reinforce v3.1 format). +- 2026-07-04: Topic_CSharp completed — all 58 planned docs written across 21 sections (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Abstract.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Abstract.md new file mode 100644 index 00000000..87cbc5f8 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Abstract.md @@ -0,0 +1,86 @@ +--- +id: csharp-abstract +title: "C# Abstraction" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["abstract class method C#", "C# 추상화"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "oop", "abstraction"] +raw_sources: ["https://www.w3schools.com/cs/cs_abstract.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Abstraction]] + +## 🎯 한 줄 통찰 (One-line insight) +Where C++ makes a class abstract IMPLICITLY (simply by containing at least one pure virtual function written as `virtual void f() = 0;`, with no dedicated "this class is abstract" keyword), C# makes it EXPLICIT with a dedicated `abstract` keyword on both the class AND each bodyless method (`abstract class Animal { public abstract void animalSound(); }`) — the same underlying restriction (cannot instantiate, must be inherited to be used, subclass MUST supply the missing method body) is enforced, but C# spells out the intent in the declaration itself rather than deriving it as a side-effect of the method's syntax. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Data abstraction** — hiding certain implementation details, showing only essential information to the user; achievable via abstract classes OR interfaces (interfaces deferred to the next chapter). [S1] +- **`abstract` on a class** — creates a RESTRICTED class that cannot be used to instantiate objects directly (`new Animal()` on an abstract class is a compile error: "Cannot create an instance of the abstract class or interface"). [S1] +- **`abstract` on a method** — declared with NO body (just a signature ending in `;`); only legal inside an abstract class; the body must be supplied by whichever derived class inherits it, using `override`. [S1] +- **Mixed abstract classes** — an abstract class can freely combine abstract methods (no body) alongside regular, fully-implemented methods. [S1] +- **Must be accessed via inheritance** — the ONLY way to use an abstract class's functionality is to inherit from it and instantiate the DERIVED class instead. [S1] + +## 📖 세부 내용 (Details) +- Illegal direct instantiation: `abstract class Animal { public abstract void animalSound(); public void sleep() { Console.WriteLine("Zzz"); } } ... Animal myObj = new Animal(); // Error`. [S1] +- Full working example (Animal converted from the Polymorphism chapter into an abstract class): `abstract class Animal { public abstract void animalSound(); public void sleep() { Console.WriteLine("Zzz"); } } class Pig : Animal { public override void animalSound() { Console.WriteLine("The pig says: wee wee"); } } ... Pig myPig = new Pig(); myPig.animalSound(); myPig.sleep();` — the abstract method's body comes entirely from `Pig`, while `sleep()` (a regular method) is inherited unchanged. [S1] +- Purpose stated directly: achieving security by hiding certain details and showing only the important parts of an object. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **abstract가 클래스에도 명시적 키워드로 붙음**: C++는 순수 가상 함수(`virtual void f() = 0;`) 하나만 있어도 클래스가 암묵적으로 추상 클래스가 되고 별도의 "추상 클래스" 키워드가 없었지만, C#은 클래스 자체에도 `abstract` 키워드를 명시적으로 붙여야 한다는 점이 확인됨 — 같은 제약(인스턴스화 불가, 상속 필수, 파생 클래스가 반드시 구현 제공)을 표현하는 방식이 암묵적(C++) vs 명시적(C#)으로 다름. [S1] +- **Polymorphism 챕터의 Animal 예제가 그대로 재사용됨**: 새로운 예제를 만들지 않고 직전 Polymorphism 챕터의 Animal/Pig 예제를 abstract로 변환해 재사용한다는 점이 확인됨 — 개념을 처음부터 다시 설명하지 않고 이미 익힌 코드를 확장하는 방식. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +추상 메서드 animalSound()와 일반 메서드 sleep()을 함께 가진 abstract class Animal을 Pig가 상속해 animalSound()의 몸체만 제공하고 sleep()은 그대로 물려받아 쓰는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Abstract class mixing an abstract method (no body) and a regular method (C#): +```csharp +abstract class Animal +{ + public abstract void animalSound(); // no body -- must be overridden + public void sleep() // regular method -- inherited as-is + { + Console.WriteLine("Zzz"); + } +} +class Pig : Animal +{ + public override void animalSound() + { + Console.WriteLine("The pig says: wee wee"); + } +} + +Pig myPig = new Pig(); +myPig.animalSound(); // "The pig says: wee wee" +myPig.sleep(); // "Zzz" +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Polymorphism]], [[CSharp Interface]], [[CPP Templates]] +- **참조 맥락:** Polymorphism & Abstract 섹션의 마지막 챕터 — Interface 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Abstraction — https://www.w3schools.com/cs/cs_abstract.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Abstraction" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Access_Modifiers.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Access_Modifiers.md new file mode 100644 index 00000000..45ab11c2 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Access_Modifiers.md @@ -0,0 +1,83 @@ +--- +id: csharp-access-modifiers +title: "C# Access Modifiers" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["public private protected internal C#", "C# 접근 제한자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "oop", "access-modifiers"] +raw_sources: ["https://www.w3schools.com/cs/cs_access_modifiers.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Access Modifiers]] + +## 🎯 한 줄 통찰 (One-line insight) +C# adds a FOURTH access level — `internal` (accessible within the same assembly, not across assemblies) — that has no direct C++ equivalent, since "assembly" is a .NET-specific compiled-unit concept C++'s translation-unit/library model doesn't share; meanwhile `public`/`private`/`protected` carry the same meanings as C++, and the default-to-`private`-when-unspecified rule for class members is IDENTICAL to what Topic_CPP already confirmed for C++ classes — making `internal` (plus the two combinations `protected internal` and `private protected`, mentioned but deferred) the one genuinely new addition in this chapter. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`public`** — accessible from ALL classes. [S1] +- **`private`** — accessible ONLY within the same class. [S1] +- **`protected`** — accessible within the same class OR classes that inherit from it (full detail deferred to Inheritance). [S1] +- **`internal`** — accessible only within its own ASSEMBLY, not from another assembly (detail deferred; no equivalent concept in C/C++ covered so far in this series). [S1] +- **Combined modifiers** — `protected internal` and `private protected` exist but aren't covered in depth here. [S1] +- **Default access = private** — if no access modifier is specified on a class member, it defaults to `private`. [S1] +- **Purpose** — controls visibility/security of class members, and enables Encapsulation (hiding sensitive data by making fields private, deferred to the next chapter). [S1] + +## 📖 세부 내용 (Details) +- Private field, accessed from WITHIN its own class: works fine, prints `"Mustang"`. [S1] +- Private field, accessed from a DIFFERENT class (`Program`): compile error — `'Car.model' is inaccessible due to its protection level`. [S1] +- Public field, accessed from a different class: works, prints `"Mustang"`. [S1] +- Implicit private default: `class Car { string model; string year; }` — both fields are private even though no keyword is written. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **기본 접근 수준(private)은 C++와 동일**: 접근 제한자를 명시하지 않으면 private가 기본값이라는 규칙이 Topic_CPP의 Access Specifiers 챕터에서 확인된 규칙과 차이가 없다는 점이 확인됨. [S1] +- **internal은 C/C++에 대응 개념이 없는 새로운 접근 수준**: "같은 어셈블리 내에서만 접근 가능, 다른 어셈블리에서는 불가"라는 internal의 정의는 .NET의 컴파일 단위인 어셈블리 개념에 의존하며, 이 시리즈의 C/C++ 챕터에는 대응하는 개념이 없었다는 점이 새로운 차이로 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +private 필드를 같은 클래스 안에서 접근할 때는 성공하고, 다른 클래스(Program)에서 접근하면 컴파일 에러가 나는 것을 대비해 보여주는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +private field inaccessible from another class — compile error (C#): +```csharp +class Car +{ + private string model = "Mustang"; +} +class Program +{ + static void Main(string[] args) + { + Car myObj = new Car(); + Console.WriteLine(myObj.model); + // Error: 'Car.model' is inaccessible due to its protection level + } +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Constructors]], [[CSharp Properties]], [[CPP Access Specifiers]] +- **참조 맥락:** Access Modifiers & Properties 섹션 — Properties (Get and Set) 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Access Modifiers — https://www.w3schools.com/cs/cs_access_modifiers.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Access Modifiers" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Arrays.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Arrays.md new file mode 100644 index 00000000..60e16fc2 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Arrays.md @@ -0,0 +1,77 @@ +--- +id: csharp-arrays +title: "C# Arrays" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["array declaration C#", "new keyword arrays", "C# 배열"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "arrays"] +raw_sources: ["https://www.w3schools.com/cs/cs_arrays.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Arrays]] + +## 🎯 한 줄 통찰 (One-line insight) +C#'s array declaration puts the brackets right after the TYPE (`string[] cars;`), not after the variable name like C's `char cars[4];` — a real syntactic divergence hiding under superficial similarity, and the tutorial explicitly documents FOUR equivalent ways to construct the same array (bare braces, `new type[size]`, `new type[size] {...}`, `new type[] {...}`), while also stating a hard rule the C family never needed: if you declare an array first and assign its values LATER (in a separate statement), the `new` keyword becomes MANDATORY — omitting it is a compile error, unlike C where separate declaration and initialization of an array is simply not possible with a brace list at all. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Declaration syntax** — `type[] variableName;` — brackets attach to the TYPE, not the variable name (contrast with C's `type variableName[size];`). [S1] +- **Array literal** — `string[] cars = {"Volvo", "BMW", "Ford", "Mazda"};` — values in a comma-separated, brace-wrapped list. [S1] +- **Index access, 0-based** — `cars[0]` is the first element, same convention as every prior language in this series. [S1] +- **Mutable elements** — `cars[0] = "Opel";` overwrites an existing element directly. [S1] +- **`.Length` property** — no parentheses, matching the string `.Length` property's design (property, not method). [S1] +- **Four equivalent construction forms**: `new string[4]` (empty, size 4), `new string[4] {...}` (size + values), `new string[] {...}` (values, size inferred), and bare `{...}` (values, size inferred, no `new`). [S1] +- **`new` becomes mandatory when assigning after declaration** — `string[] cars; cars = new string[] {"Volvo", "BMW", "Ford"};` works, but `cars = {"Volvo", "BMW", "Ford"};` (without `new`) is a compile error. [S1] + +## 📖 세부 내용 (Details) +- Access: `string[] cars = {"Volvo", "BMW", "Ford", "Mazda"}; Console.WriteLine(cars[0]); // Volvo`. [S1] +- Modify: `cars[0] = "Opel"; Console.WriteLine(cars[0]); // Opel`. [S1] +- Length: `Console.WriteLine(cars.Length); // 4`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **대괄호가 변수명이 아니라 타입에 붙음**: C의 배열 선언은 `char cars[4];`처럼 대괄호가 변수명 뒤에 붙었지만, C#은 `string[] cars;`처럼 타입 바로 뒤에 대괄호가 붙는다는 점이 확인됨 — 표면적으로 비슷해 보이지만 실제 문법 위치가 다름. [S1] +- **선언 후 대입 시 new가 필수가 됨**: 선언과 초기화를 분리할 경우(`string[] cars;` 이후 `cars = {...};`) 중괄호만으로는 컴파일 에러가 나고 반드시 `new string[] {...}`처럼 new를 붙여야 한다는 규칙이 확인됨 — C는애초에 배열을 선언 후 별도 문장에서 중괄호 리스트로 재할당하는 것 자체가 불가능하므로 C에는 없던 규칙. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +자동차 이름 배열을 선언하고, 첫 원소를 읽고 바꾸고, 길이를 확인하는 기본 흐름이 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Four equivalent array construction forms, and the mandatory `new` on later assignment (C#): +```csharp +string[] cars1 = new string[4]; // empty, size 4 +string[] cars2 = new string[4] {"Volvo", "BMW", "Ford", "Mazda"}; +string[] cars3 = new string[] {"Volvo", "BMW", "Ford", "Mazda"}; +string[] cars4 = {"Volvo", "BMW", "Ford", "Mazda"}; // no `new` needed here + +string[] cars5; +cars5 = new string[] {"Volvo", "BMW", "Ford"}; // new REQUIRED when assigned separately +// cars5 = {"Volvo", "BMW", "Ford"}; // error without new +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Break]], [[CSharp Arrays Loop]], [[C Arrays]], [[CPP Arrays]] +- **참조 맥락:** Arrays 섹션 — Loop Through Arrays 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Arrays — https://www.w3schools.com/cs/cs_arrays.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Arrays" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Arrays_Loop.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Arrays_Loop.md new file mode 100644 index 00000000..45adc933 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Arrays_Loop.md @@ -0,0 +1,75 @@ +--- +id: csharp-arrays-loop +title: "C# Loop Through Arrays" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["for loop array C#", "foreach array C#", "C# 배열 순회"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.82 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "arrays", "loops"] +raw_sources: ["https://www.w3schools.com/cs/cs_arrays_loop.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Arrays Loop]] + +## 🎯 한 줄 통찰 (One-line insight) +This chapter directly recycles the exact `foreach` example already shown in the Loops section's Foreach chapter — same `cars` array, same code — but now frames it explicitly AGAINST the indexed `for` loop alternative, making an explicit value judgment the earlier chapter didn't state outright: `foreach` is "easier to write... does not require a counter... more readable," a direct trade-off statement this wiki hasn't seen phrased this bluntly for C or C++'s equivalent range-based loops. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Indexed `for` loop over an array** — uses `.Length` as the loop bound: `for (int i = 0; i < cars.Length; i++) { Console.WriteLine(cars[i]); }`. [S1] +- **`foreach` loop over an array** — no counter, no `.Length`, no index: `foreach (string i in cars) { Console.WriteLine(i); }`. [S1] +- **Explicit trade-off stated** — `foreach` is easier to write, doesn't need a counter, and is more readable than the indexed `for` — a direct recommendation, not just a neutral alternative. [S1] + +## 📖 세부 내용 (Details) +- Indexed loop: `string[] cars = {"Volvo", "BMW", "Ford", "Mazda"}; for (int i = 0; i < cars.Length; i++) { Console.WriteLine(cars[i]); }`. [S1] +- Foreach loop (identical to the earlier Foreach Loop chapter's own example): `string[] cars = {"Volvo", "BMW", "Ford", "Mazda"}; foreach (string i in cars) { Console.WriteLine(i); }`. [S1] +- Reading aid: "for each string element (called i — as in index) in cars, print out the value of i." [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **foreach가 for보다 명시적으로 권장됨**: 이전 Foreach Loop 챕터는 foreach를 단순히 소개만 했지만, 이번 챕터는 for와 나란히 비교하며 "카운터가 필요 없고 더 읽기 쉽다"고 명시적으로 우위를 선언한다는 점이 확인됨 — 두 방식이 동등한 대안이 아니라 foreach가 권장되는 선택임을 분명히 함. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +동일한 자동차 이름 배열을 인덱스 기반 for 루프와 foreach 루프 두 가지로 순회해 비교하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Indexed for loop vs. foreach — same output, different readability (C#): +```csharp +string[] cars = {"Volvo", "BMW", "Ford", "Mazda"}; + +for (int i = 0; i < cars.Length; i++) +{ + Console.WriteLine(cars[i]); +} + +foreach (string i in cars) +{ + Console.WriteLine(i); +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.82 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Arrays]], [[CSharp Arrays Sort]], [[CSharp Foreach Loop]] +- **참조 맥락:** Arrays 섹션 — Sort Arrays 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Loop Through Arrays — https://www.w3schools.com/cs/cs_arrays_loop.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Loop Through Arrays" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Arrays_Multi.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Arrays_Multi.md new file mode 100644 index 00000000..c9baa4a9 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Arrays_Multi.md @@ -0,0 +1,80 @@ +--- +id: csharp-arrays-multi +title: "C# Multidimensional Arrays" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["2D array C#", "GetLength()", "C# 다차원 배열"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "arrays", "multidimensional"] +raw_sources: ["https://www.w3schools.com/cs/cs_arrays_multi.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Multidimensional Arrays]] + +## 🎯 한 줄 통찰 (One-line insight) +C#'s true 2D array uses ONE bracket pair with an internal comma (`int[,] numbers`), fundamentally different from C's stacked-bracket 2D array (`int numbers[2][3]`, effectively an array of arrays) — and this single-object design is why C# needs a NEW method, `GetLength(dimension)`, instead of reusing `.Length` (which on a 2D array would only report the total flattened element count, not a per-dimension size), forcing a second, dimension-aware sizing API that C's simpler nested-array model never required. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`int[,] name = { {...}, {...} };`** — a single comma inside one bracket pair signals a 2D array; two commas (`[,,]`) would signal 3D. [S1] +- **Row/column indexing** — `numbers[row, col]` — a SINGLE index expression with two comma-separated values, not `numbers[row][col]` (double bracket, as in C's array-of-arrays model). [S1] +- **Element access & mutation** — `numbers[0, 2]` reads row 0, column 2; `numbers[0, 0] = 5;` writes to row 0, column 0. [S1] +- **`foreach` over a 2D array** — flattens automatically: `foreach (int i in numbers)` visits every element across all rows without needing nested loops. [S1] +- **`GetLength(dimension)`** — replaces `.Length` for multidimensional sizing; `GetLength(0)` returns the row count, `GetLength(1)` returns the column count — one loop bound per dimension. [S1] +- **Nested `for` loop required for row/column-aware iteration** — one loop per dimension, using `GetLength(0)` and `GetLength(1)` as the respective bounds. [S1] + +## 📖 세부 내용 (Details) +- Declaration: `int[,] numbers = { {1, 4, 2}, {3, 6, 8} };` — two "rows," each with three "columns." [S1] +- Access: `Console.WriteLine(numbers[0, 2]); // 2` (row 0, column 2). [S1] +- Modify: `numbers[0, 0] = 5; Console.WriteLine(numbers[0, 0]); // 5`. [S1] +- Flattened foreach: `foreach (int i in numbers) { Console.WriteLine(i); }` — prints all 6 elements in row-major order. [S1] +- Dimension-aware nested for: `for (int i = 0; i < numbers.GetLength(0); i++) { for (int j = 0; j < numbers.GetLength(1); j++) { Console.WriteLine(numbers[i, j]); } }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C의 배열의 배열 모델과 근본적으로 다른 단일 객체 설계**: C의 2D 배열(`int numbers[2][3]`)은 사실상 배열의 배열이라 `numbers[i][j]`처럼 대괄호를 두 번 쓰지만, C#의 `int[,] numbers`는 콤마로 차원을 표시하는 단일 객체이며 `numbers[i, j]`처럼 하나의 인덱스 표현식 안에 콤마로 두 값을 전달한다는 점이 확인됨. [S1] +- **Length 대신 GetLength(dimension)이 필요해짐**: 1차원 배열의 `.Length` 프로퍼티는 다차원 배열에서는 차원별 크기를 알려주지 못하므로, C#은 `GetLength(0)`/`GetLength(1)`처럼 차원 인덱스를 받는 별도 메서드를 도입했다는 점이 새로운 차이로 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +2행 3열의 정수 2D 배열을 선언하고, 특정 원소를 읽고/바꾸고, foreach와 이중 for 루프(GetLength 사용) 두 가지 방식으로 순회하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +2D array — single bracket + comma indexing, GetLength() for dimension-aware loops (C#): +```csharp +int[,] numbers = { {1, 4, 2}, {3, 6, 8} }; +Console.WriteLine(numbers[0, 2]); // 2 (row 0, col 2) + +for (int i = 0; i < numbers.GetLength(0); i++) // rows +{ + for (int j = 0; j < numbers.GetLength(1); j++) // columns + { + Console.WriteLine(numbers[i, j]); + } +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Arrays Sort]], [[CSharp Methods]], [[C Arrays]] +- **참조 맥락:** Arrays 섹션의 마지막 챕터 — Methods 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Multidimensional Arrays — https://www.w3schools.com/cs/cs_arrays_multi.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Multidimensional Arrays" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Arrays_Sort.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Arrays_Sort.md new file mode 100644 index 00000000..f28c7b5f --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Arrays_Sort.md @@ -0,0 +1,73 @@ +--- +id: csharp-arrays-sort +title: "C# Sort Arrays" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["Array.Sort", "System.Linq Max Min Sum", "C# 배열 정렬"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.82 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "arrays", "sort", "linq"] +raw_sources: ["https://www.w3schools.com/cs/cs_arrays_sort.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Sort Arrays]] + +## 🎯 한 줄 통찰 (One-line insight) +`Array.Sort(cars)` mirrors C++'s `sort()` from `` in spirit (both sort in place, ascending by default, work for strings and numbers alike) — but C#'s aggregate helpers (`myNumbers.Max()`, `.Min()`, `.Sum()`) come from a SEPARATE namespace (`System.Linq`) that must be explicitly imported with its own `using` statement, meaning basic sorting is a core language feature (`Array.Sort`) while summary statistics are an OPT-IN library extension — a modularity split C++'s `` (which bundles `sort()`, `min_element()`, `max_element()` all in one header) doesn't make. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`Array.Sort(arrayName)`** — sorts an array in place, alphabetically for strings or ascending for numbers; static method on the `Array` class. [S1] +- **`System.Linq` namespace** — must be explicitly imported (`using System.Linq;`) to unlock extension methods like `.Max()`, `.Min()`, `.Sum()` directly on array instances. [S1] +- **`.Max()` / `.Min()` / `.Sum()`** — instance-style method calls on the array itself (`myNumbers.Max()`), not static calls through a class name like `Array.Sort()`. [S1] + +## 📖 세부 내용 (Details) +- String sort: `string[] cars = {"Volvo", "BMW", "Ford", "Mazda"}; Array.Sort(cars); foreach (string i in cars) { Console.WriteLine(i); }` → alphabetical order. [S1] +- Int sort: `int[] myNumbers = {5, 1, 8, 9}; Array.Sort(myNumbers); foreach (int i in myNumbers) { Console.WriteLine(i); }` → ascending order. [S1] +- LINQ aggregates (requires `using System.Linq;` at the top of the file): `int[] myNumbers = {5, 1, 8, 9}; Console.WriteLine(myNumbers.Max()); Console.WriteLine(myNumbers.Min()); Console.WriteLine(myNumbers.Sum());` → 9, 1, 23. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **정렬은 핵심 기능, 집계 함수는 별도 네임스페이스 opt-in**: C++의 ``은 sort()/min_element()/max_element()를 한 헤더에 모두 묶어 제공했지만, C#은 `Array.Sort()`는 기본으로 쓸 수 있는 반면 Max()/Min()/Sum()은 `System.Linq`라는 별도 네임스페이스를 명시적으로 import해야만 쓸 수 있다는 점이 확인됨 — 기능 모듈화 방식이 C++와 다름. [S1] +- **호출 방식도 다름**: `Array.Sort(cars)`는 클래스 이름을 통한 정적 호출이지만, `myNumbers.Max()`는 배열 인스턴스 자체에 점(.)으로 붙는 확장 메서드 호출이라는 점에서 스타일이 다름. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +문자열 배열과 정수 배열을 각각 Array.Sort()로 정렬하고, System.Linq를 import해 Max/Min/Sum을 구하는 두 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Array.Sort() vs. System.Linq aggregate methods — different import requirements (C#): +```csharp +using System; +using System.Linq; // required for Max/Min/Sum + +int[] myNumbers = {5, 1, 8, 9}; +Array.Sort(myNumbers); // core feature, no extra using needed +Console.WriteLine(myNumbers.Max()); // 9 -- requires System.Linq +Console.WriteLine(myNumbers.Min()); // 1 +Console.WriteLine(myNumbers.Sum()); // 23 +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.82 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Arrays Loop]], [[CSharp Arrays Multi]], [[CPP Algorithms]] +- **참조 맥락:** Arrays 섹션의 마지막 챕터 — Multidimensional Arrays 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Sort Arrays — https://www.w3schools.com/cs/cs_arrays_sort.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Sort Arrays" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Booleans.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Booleans.md new file mode 100644 index 00000000..9ccfa529 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Booleans.md @@ -0,0 +1,81 @@ +--- +id: csharp-booleans +title: "C# Booleans" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["bool data type C#", "boolean expressions C#", "C# 불리언"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "booleans"] +raw_sources: ["https://www.w3schools.com/cs/cs_booleans.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Booleans]] + +## 🎯 한 줄 통찰 (One-line insight) +This chapter previews the if...else statement (voting-age example) BEFORE the Conditions section formally covers it, which is a deliberate pedagogical sequencing choice — showing WHY boolean expressions matter (they're the direct input to `if`) before teaching the `if` syntax itself — and the example itself reuses `Console.WriteLine(myAge >= votingAge);` printing a raw `True`/`False` before wrapping the identical comparison inside an `if {} else {}` block, making the connection between "a boolean expression" and "a branching decision" explicit and concrete rather than assumed. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`bool`** — a type that can only hold `true` or `false`, used for binary-state situations (yes/no, on/off). [S1] +- **Boolean expression** — an expression (typically built with comparison operators) that itself evaluates to `True`/`False`, e.g. `x > y`, `x == 10`. [S1] +- **Direct literal comparison** — comparisons work on literals too, not just variables: `Console.WriteLine(10 > 9);` is valid on its own. [S1] +- **Boolean expressions are the foundation of `if`/`else`** — the tutorial explicitly states "the boolean value of an expression is the basis for all C# comparisons and conditions." [S1] + +## 📖 세부 내용 (Details) +- Direct declaration: `bool isCSharpFun = true; bool isFishTasty = false;` — printed as `True`/`False`. [S1] +- Comparison-derived booleans: `int x = 10; int y = 9; Console.WriteLine(x > y); // True`; `Console.WriteLine(x == 10); // True`; `Console.WriteLine(10 == 15); // False`. [S1] +- Real-life voting-age example, first as a bare boolean print: `int myAge = 25; int votingAge = 18; Console.WriteLine(myAge >= votingAge);` → `True`. [S1] +- The SAME comparison then wrapped in a full if/else: + ``` + if (myAge >= votingAge) { Console.WriteLine("Old enough to vote!"); } + else { Console.WriteLine("Not old enough to vote."); } + ``` + [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **if/else 문법이 정식 챕터 전에 미리 사용됨**: Conditions 섹션에서 if...else를 formal하게 다루기 전에, 이 챕터가 투표 연령 예제를 통해 if/else 구문을 먼저 보여준다는 점이 확인됨 — "왜 boolean 표현식이 중요한가(if의 입력이기 때문)"를 문법을 가르치기 전에 개념적으로 먼저 연결하려는 의도적 구성. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +투표 가능 연령(18세)과 실제 나이(25세)를 비교해 먼저 bool 값을 출력하고, 그다음 동일 비교를 if...else로 감싸 "Old enough to vote!" 또는 "Not old enough to vote."를 출력하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Boolean expression as a bare print, then wrapped in if/else (C#): +```csharp +int myAge = 25; +int votingAge = 18; + +Console.WriteLine(myAge >= votingAge); // bare boolean -> True + +if (myAge >= votingAge) { + Console.WriteLine("Old enough to vote!"); +} else { + Console.WriteLine("Not old enough to vote."); +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Strings Chars]], [[CSharp Conditions]], [[CSharp Operators Comparison]] +- **참조 맥락:** Booleans 섹션의 유일 챕터 — Conditions 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Booleans — https://www.w3schools.com/cs/cs_booleans.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Booleans" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Break.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Break.md new file mode 100644 index 00000000..e2cabb2f --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Break.md @@ -0,0 +1,78 @@ +--- +id: csharp-break +title: "C# Break and Continue" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["break continue C#", "C# break continue"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.82 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "loops", "break", "continue"] +raw_sources: ["https://www.w3schools.com/cs/cs_break.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Break]] + +## 🎯 한 줄 통찰 (One-line insight) +This chapter explicitly ties `break` back to the Switch chapter ("You have already seen the break statement used... to jump out of a switch statement"), making the point that `break` is ONE keyword with TWO distinct jump targets (switch block vs. loop) — while `continue` is entirely new here, skipping only the CURRENT iteration rather than exiting entirely; both keywords and their exact semantics are identical to C/C++, but the while-loop `continue` example reveals a subtle placement rule: the increment (`i++`) must happen BEFORE `continue` inside a `while` loop (unlike a `for` loop, where the increment happens automatically), or the loop would spin forever on the skipped value. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`break`** — already introduced for exiting a `switch` block; here reused to exit a LOOP entirely (for or while), stopping all further iterations immediately. [S1] +- **`continue`** — skips the REST of the current iteration only, then proceeds to the next iteration; does not exit the loop. [S1] +- **`for` loop placement** — both `break` and `continue` are placed inside a conditional check (`if (i == 4) { break; }` / `{ continue; }`) within the loop body. [S1] +- **`while` loop placement subtlety** — in a `while` loop, `continue` must be preceded by the manual increment (`i++; continue;`), because `continue` jumps straight back to the condition check, skipping any code after it — including an increment that would otherwise appear later in the body. [S1] + +## 📖 세부 내용 (Details) +- `break` in a `for` loop: `for (int i = 0; i < 10; i++) { if (i == 4) { break; } Console.WriteLine(i); }` → prints 0,1,2,3 then stops entirely at 4. [S1] +- `continue` in a `for` loop: `for (int i = 0; i < 10; i++) { if (i == 4) { continue; } Console.WriteLine(i); }` → prints 0,1,2,3,5,6,7,8,9 (skips only 4). [S1] +- `break` in a `while` loop: increment happens BEFORE the break check (`i++; if (i == 4) { break; }`). [S1] +- `continue` in a `while` loop: increment happens BEFORE `continue` is called (`if (i == 4) { i++; continue; }`), specifically to avoid an infinite loop that would otherwise keep re-testing `i == 4` forever. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **break가 switch와 loop 두 곳에서 재사용되는 동일 키워드임을 명시**: 이번 챕터는 break가 switch 챕터에서 이미 배운 것과 같은 키워드이며, 단지 탈출 대상이 switch 블록에서 루프로 바뀔 뿐이라는 점을 직접 언급함 — C/C++와 마찬가지로 하나의 키워드가 문맥에 따라 다른 블록을 탈출하는 데 재사용됨. [S1] +- **while 루프에서 continue 앞에 증감식이 반드시 와야 함**: for 루프는 증감(statement3)이 자동으로 실행되지만, while 루프는 continue가 조건 검사로 바로 점프하므로 continue보다 먼저 i++를 실행해두지 않으면 무한 루프가 발생한다는 점이 while 루프 continue 예제에서 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +i==4일 때 루프를 완전히 탈출(break)하는 예제와, i==4만 건너뛰고 나머지는 계속 출력(continue)하는 예제가 for/while 양쪽 모두에서 원문에 직접 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +continue in a while loop — increment must come first to avoid infinite loop (C#): +```csharp +int i = 0; +while (i < 10) +{ + if (i == 4) + { + i++; // must increment BEFORE continue + continue; + } + Console.WriteLine(i); + i++; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.82 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Foreach Loop]], [[CSharp Switch]], [[CSharp Arrays]], [[CPP Break]] +- **참조 맥락:** Loops 섹션의 마지막 챕터 — Arrays 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Break and Continue — https://www.w3schools.com/cs/cs_break.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Break and Continue" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Class_Members.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Class_Members.md new file mode 100644 index 00000000..479c8296 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Class_Members.md @@ -0,0 +1,87 @@ +--- +id: csharp-class-members +title: "C# Class Members" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["fields and methods C#", "public vs static C#", "C# 클래스 멤버"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "oop", "class-members"] +raw_sources: ["https://www.w3schools.com/cs/cs_class_members.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Class Members]] + +## 🎯 한 줄 통찰 (One-line insight) +This chapter directly answers a question it poses itself — "why public, not static, like in the Methods chapter?" — with a crisp rule: `static` methods belong to the CLASS and need no object, while `public` methods belong to OBJECTS and can only be called through an instance; this reframes everything the Methods section taught (`static void MyMethod()`) as having been INCOMPLETE for real OOP use, since every method there was callable without ever creating an object — a limitation this chapter's Car/fullThrottle() example exists specifically to break. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Class members** — fields and methods declared inside a class, collectively. [S1] +- **Fields** — variables inside a class; accessed via an object using dot syntax (`myObj.color`), can be assigned a default value inline or left blank and set later via the object. [S1] +- **`static` vs. `public` methods** — `static` methods are callable WITHOUT creating an object (belong to the class); `public` methods require an object instance to call (belong to objects) — this is why object methods use `public`, not `static`. [S1] +- **Method access via dot syntax** — `myObj.fullThrottle();`, same pattern as field access. [S1] +- **Multiple objects, independent field values** — creating several objects of the same class (`Car Ford`, `Car Opel`) gives each its own independent copy of the fields. [S1] +- **Multiple classes for organization** — one class (e.g. `Car`) holds fields/methods, another (e.g. `Program`) holds `Main()` and does the work; recommended practice. [S1] +- **`public` as access modifier** — when fields need to be accessible from ANOTHER class (like `Program` accessing `Car`'s fields), those fields must be marked `public`; deferred full coverage to a later Access Modifiers chapter. [S1] + +## 📖 세부 내용 (Details) +- Field-only access: `class Car { string color = "red"; int maxSpeed = 200; static void Main(string[] args) { Car myObj = new Car(); Console.WriteLine(myObj.color); Console.WriteLine(myObj.maxSpeed); } }`. [S1] +- Blank fields set via object: `string color; int maxSpeed; ... myObj.color = "red"; myObj.maxSpeed = 200;`. [S1] +- Multiple independent objects: `Car Ford = new Car(); Ford.model = "Mustang"; ... Car Opel = new Car(); Opel.model = "Astra"; ...` — each object's fields are independent. [S1] +- Object method call requiring `public`: `public void fullThrottle() { Console.WriteLine("The car is going as fast as it can!"); } ... myObj.fullThrottle();`. [S1] +- Cross-class access with `public` fields: a `Car` class in one file exposes `public string model;` etc., and a separate `Program` class's `Main()` creates/uses `Car` objects. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **Methods 챕터의 static이 실제로는 제약이었음이 드러남**: Methods 챕터에서 배운 `static void MyMethod()`는 객체 생성 없이 클래스명만으로 호출 가능한 방식이었는데, 이번 챕터는 이것이 진짜 OOP의 "객체 메서드"와는 다른 것이며, 객체를 통해 호출하는 메서드는 반드시 `public`(static이 아님)이어야 한다는 점을 명확히 함 — Methods 챕터의 모든 예제가 사실 객체 없이도 동작하는 방식이었다는 한계가 이번 챕터에서 드러남. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +Ford와 Opel 두 Car 객체를 만들어 각각 다른 model/color/year 값을 독립적으로 저장하고, fullThrottle() 메서드를 public으로 선언해 객체를 통해 호출하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +static (class-level, no object needed) vs. public (object-level, requires an instance) methods (C#): +```csharp +class Car +{ + public string model; + public void fullThrottle() // public -- called through an object + { + Console.WriteLine("The car is going as fast as it can!"); + } +} + +class Program +{ + static void Main(string[] args) // static -- belongs to the class itself + { + Car myObj = new Car(); + myObj.fullThrottle(); // requires the object instance + } +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Classes]], [[CSharp Classes Multi]], [[CSharp Methods]], [[CSharp Access Modifiers]] +- **참조 맥락:** OOP Basics 섹션 — Multiple Classes and Objects 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Class Members — https://www.w3schools.com/cs/cs_class_members.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Class Members" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Classes.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Classes.md new file mode 100644 index 00000000..c4973bd7 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Classes.md @@ -0,0 +1,76 @@ +--- +id: csharp-classes +title: "C# Classes and Objects" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["new keyword objects C#", "field C#", "C# 클래스와 객체"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "oop", "classes"] +raw_sources: ["https://www.w3schools.com/cs/cs_classes.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Classes]] + +## 🎯 한 줄 통찰 (One-line insight) +The chapter's own explicit aside — "it is common that the name of the C# file and the class matches... However it is not required (like in Java)" — directly repeats the exact comparison already flagged in the Syntax chapter, meaning W3Schools' C# tutorial itself considers this Java contrast important enough to state TWICE across the series; the object-creation syntax `Car myObj = new Car();` is otherwise structurally identical to C++'s heap-allocation `new` (though C# never requires a matching `delete` — memory is garbage-collected, a fact not yet stated in this chapter but implied by its complete absence). [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`class` keyword** — defines a class, e.g. `class Car { string color = "red"; }`. [S1] +- **Field** — a variable declared directly inside a class; also called an "attribute". [S1] +- **Naming convention (again)** — class names should start uppercase (good practice, not enforced); file name matching class name is common but, unlike Java, NOT required. [S1] +- **Object creation** — `ClassName objectName = new ClassName();`, e.g. `Car myObj = new Car();`. [S1] +- **Dot syntax** — `myObj.color` accesses a field on an object instance. [S1] + +## 📖 세부 내용 (Details) +- Class with a field: `class Car { string color = "red"; }`. [S1] +- Full object creation + field access example: `class Car { string color = "red"; static void Main(string[] args) { Car myObj = new Car(); Console.WriteLine(myObj.color); } }` → outputs `"red"`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **Java와의 파일명 대비가 시리즈에서 두 번째로 반복됨**: Syntax 챕터에서 이미 "C#은 Java와 달리 파일명과 클래스명이 일치할 필요가 없다"고 언급했는데, 이번 Classes 챕터가 동일한 비교를 다시 명시적으로 반복한다는 점이 확인됨 — W3Schools가 이 차이를 중요하게 여겨 두 번 강조. [S1] +- **new 키워드는 C++와 문법이 같지만 delete 짝이 없음**: `new Car()`가 C++의 힙 할당 `new`와 문법상 동일해 보이지만, 이 챕터(그리고 이후 챕터들)에서 `delete`에 대응하는 언급이 전혀 등장하지 않는다는 점이 확인됨 — C#의 가비지 컬렉션 기반 메모리 관리를 암시(다만 이 챕터가 명시적으로 설명하지는 않음). [S1] + +## 🛠️ 적용 사례 (Applied in summary) +Car 클래스에 color 필드를 정의하고, new로 객체를 만들어 점(.) 문법으로 필드 값을 출력하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Class definition, object creation, and dot-syntax field access (C#): +```csharp +class Car +{ + string color = "red"; + + static void Main(string[] args) + { + Car myObj = new Car(); + Console.WriteLine(myObj.color); // "red" + } +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp OOP]], [[CSharp Class Members]], [[CSharp Syntax]], [[CPP Classes]] +- **참조 맥락:** OOP Basics 섹션 — Class Members 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Classes and Objects — https://www.w3schools.com/cs/cs_classes.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Classes and Objects" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Classes_Multi.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Classes_Multi.md new file mode 100644 index 00000000..e0db68b8 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Classes_Multi.md @@ -0,0 +1,78 @@ +--- +id: csharp-classes-multi +title: "C# Multiple Classes and Objects" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["multiple objects same class C#", "separate files classes C#", "C# 다중 클래스"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.82 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "oop", "classes"] +raw_sources: ["https://www.w3schools.com/cs/cs_classes_multi.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Multiple Classes and Objects]] + +## 🎯 한 줄 통찰 (One-line insight) +This short chapter is largely a distilled repeat of patterns already shown in Class Members (multiple objects of one class, splitting fields/methods into one class and `Main()` into another) — its only genuinely new emphasis is calling out the `public` keyword by its formal name, "access modifier," and stating outright that without it, a field defined in one class (`Car`) would NOT be reachable from another class (`Program`), making the two-file `prog2.cs`/`prog.cs` split only work BECAUSE of that modifier. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Multiple objects of one class** — `Car myObj1 = new Car(); Car myObj2 = new Car();` — each is an independent instance. [S1] +- **Splitting classes across files** — one class (fields/methods) in one file (`prog2.cs`), another class (with `Main()`) in a separate file (`prog.cs`) — recommended for organization. [S1] +- **`public` = access modifier** — explicitly named as such here; it's what makes a field defined in `Car` reachable from the unrelated `Program` class. Without `public`, cross-class access would fail. [S1] + +## 📖 세부 내용 (Details) +- Two objects, same class: `class Car { string color = "red"; static void Main(string[] args) { Car myObj1 = new Car(); Car myObj2 = new Car(); Console.WriteLine(myObj1.color); Console.WriteLine(myObj2.color); } }`. [S1] +- Cross-file class + access: `prog2.cs`: `class Car { public string color = "red"; }`; `prog.cs`: `class Program { static void Main(string[] args) { Car myObj = new Car(); Console.WriteLine(myObj.color); } }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **public이 "접근 제한자(access modifier)"라는 공식 용어로 명명됨**: Class Members 챕터에서는 public을 별도 이름 없이 사용했지만, 이번 챕터는 이를 명시적으로 "access modifier"라고 부르며 이것이 없으면 다른 클래스에서 필드에 접근할 수 없다는 점을 재확인함. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +동일한 Car 클래스로 두 개의 독립된 객체를 만드는 예제와, Car와 Program을 서로 다른 파일로 분리하되 public으로 필드를 노출하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Cross-class field access requires `public` (the access modifier) (C#): +```csharp +// prog2.cs +class Car +{ + public string color = "red"; // public required for cross-class access +} + +// prog.cs +class Program +{ + static void Main(string[] args) + { + Car myObj = new Car(); + Console.WriteLine(myObj.color); + } +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.82 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Class Members]], [[CSharp Constructors]], [[CSharp Access Modifiers]] +- **참조 맥락:** OOP Basics 섹션의 마지막 챕터 — Constructors 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Multiple Classes and Objects — https://www.w3schools.com/cs/cs_classes_multi.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Multiple Classes and Objects" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Comments.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Comments.md new file mode 100644 index 00000000..dfde6226 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Comments.md @@ -0,0 +1,71 @@ +--- +id: csharp-comments +title: "C# Comments" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["single-line comments C#", "multi-line comments C#", "C# 주석"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "comments"] +raw_sources: ["https://www.w3schools.com/cs/cs_comments.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Comments]] + +## 🎯 한 줄 통찰 (One-line insight) +C#'s comment syntax (`//` single-line, `/* */` multi-line) is byte-for-byte identical to C, C++, and Java's — the FIRST chapter in this entire C# series where the answer to "how is this different from what I already know" is simply "it isn't," confirming the Intro chapter's claim of syntactic closeness to the C family in the most literal, zero-abstraction way possible. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Single-line comments (`//`)** — everything from `//` to the end of the line is ignored; usable on its own line before code or appended at the end of a code line. [S1] +- **Multi-line comments (`/* ... */`)** — everything between the markers is ignored, regardless of how many lines it spans. [S1] +- **Convention** — `//` for short comments, `/* */` for longer explanatory blocks; purely a style choice. [S1] +- **Purpose** — explain code for readability, or temporarily disable code during testing. [S1] + +## 📖 세부 내용 (Details) +- Before-line comment: `// This is a comment` followed by `Console.WriteLine("Hello World!");`. [S1] +- End-of-line comment: `Console.WriteLine("Hello World!"); // This is a comment`. [S1] +- Multi-line block: `/* The code below will print the words Hello World to the screen, and it is amazing */` followed by the print statement. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C/C++/Java와 완전히 동일한 주석 문법**: `//`와 `/* */` 문법이 C, C++, Java와 토씨 하나 다르지 않게 동일하다는 점이 확인됨 — Intro 챕터가 주장한 "C 계열과 문법이 가깝다"는 서술이 이번 챕터에서는 차이 없이 그대로 성립하는 첫 사례. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 줄 앞/뒤 단일행 주석과 여러 줄 블록 주석 예제가 원문에서 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Single-line and multi-line comments — identical syntax to C/C++/Java (C#): +```csharp +// This is a comment +Console.WriteLine("Hello World!"); // This is a comment + +/* The code below will print the words Hello World +to the screen, and it is amazing */ +Console.WriteLine("Hello World!"); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Output]], [[CSharp Variables]], [[CPP Comments]] +- **참조 맥락:** Basics 섹션의 마지막 챕터 — Variables 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Comments — https://www.w3schools.com/cs/cs_comments.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Comments" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Conditions.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Conditions.md new file mode 100644 index 00000000..499b5487 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Conditions.md @@ -0,0 +1,70 @@ +--- +id: csharp-conditions +title: "C# If ... Else" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["if statement C#", "C# 조건문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "conditions", "if"] +raw_sources: ["https://www.w3schools.com/cs/cs_conditions.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Conditions]] + +## 🎯 한 줄 통찰 (One-line insight) +The `if (condition) { ... }` syntax is byte-identical to C/C++/Java, and the chapter's own explicit warning — "if is in lowercase letters; If or IF will generate an error" — is the same case-sensitivity rule already established in the Identifiers chapter, now applied to KEYWORDS rather than variable names, closing the loop on C#'s case-sensitivity being a blanket rule across the entire language (identifiers AND keywords), not just a variable-naming quirk. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Comparison conditions inherited from math** — `<`, `<=`, `>`, `>=`, `==`, `!=`, already covered in the Comparison Operators chapter, are the building blocks of every condition. [S1] +- **Four conditional constructs previewed** — `if` (execute if true), `else` (execute if false), `else if` (test a new condition if the first was false), `switch` (many alternative blocks). [S1] +- **`if` syntax**: `if (condition) { // code }` — code inside the braces runs only when `condition` evaluates to `True`. [S1] +- **Case-sensitivity applies to keywords, not just identifiers** — `If` or `IF` (capitalized) is a compile error; only lowercase `if` is valid. [S1] + +## 📖 세부 내용 (Details) +- Literal condition: `if (20 > 18) { Console.WriteLine("20 is greater than 18"); }`. [S1] +- Variable condition: `int x = 20; int y = 18; if (x > y) { Console.WriteLine("x is greater than y"); }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **대소문자 구분이 키워드에도 적용됨을 명시적으로 확인**: Identifiers 챕터에서 변수명의 대소문자 구분(`myVar` vs `myvar`)을 배웠는데, 이번 챕터는 `if`라는 키워드 자체도 대문자로 쓰면(`If`, `IF`) 에러가 난다고 명시 — 대소문자 구분이 식별자뿐 아니라 언어 전체(키워드 포함)에 적용되는 규칙임이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 리터럴 비교(20 > 18)와 변수 비교(x > y) 두 가지 if 예제가 원문에서 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Basic if statement — lowercase `if` only (C#): +```csharp +int x = 20; +int y = 18; +if (x > y) +{ + Console.WriteLine("x is greater than y"); +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Booleans]], [[CSharp Conditions Else]], [[CPP Conditions]] +- **참조 맥락:** Conditions 섹션 — The else Statement 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# If ... Else — https://www.w3schools.com/cs/cs_conditions.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# If ... Else" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Conditions_Else.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Conditions_Else.md new file mode 100644 index 00000000..5924f950 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Conditions_Else.md @@ -0,0 +1,71 @@ +--- +id: csharp-conditions-else +title: "C# The else Statement" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["else statement C#", "C# else 문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.82 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "conditions", "else"] +raw_sources: ["https://www.w3schools.com/cs/cs_conditions_else.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Conditions Else]] + +## 🎯 한 줄 통찰 (One-line insight) +This is the exact same `if (time >= votingAge) {...} else {...}` pattern already demonstrated in the Booleans chapter's voting example — the tutorial reuses the identical time/greeting scenario here with formal syntax framing, confirming this series deliberately teaches a concept informally (Booleans) before returning to name and formalize it (Conditions), rather than introducing each construct exactly once. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`else`** — specifies a block of code to execute when the `if` condition is `False`. [S1] +- **Syntax**: `if (condition) { // True branch } else { // False branch }` — exactly one of the two blocks ever executes. [S1] + +## 📖 세부 내용 (Details) +- Example: `int time = 20; if (time < 18) { Console.WriteLine("Good day."); } else { Console.WriteLine("Good evening."); }` → since `20` is NOT less than `18`, the condition is False, so the `else` branch runs, printing `"Good evening."`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **Booleans 챕터의 예제 패턴이 그대로 재사용됨**: Booleans 챕터에서 이미 투표 연령 예제로 if/else를 미리 보여줬는데, 이번 챕터는 시간대(time) 인사말이라는 다른 소재지만 동일한 "if 조건 → else 대안" 구조를 공식 문법 설명과 함께 다시 제시한다는 점이 확인됨 — 이 시리즈는 개념을 비공식적으로 먼저 보여준 뒤(Booleans) 나중에 공식적으로 명명·설명(Conditions)하는 방식을 취함. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 시각(time=20)이 18보다 작은지 확인해 "Good day."/"Good evening."을 출력하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +if/else — exactly one branch executes (C#): +```csharp +int time = 20; +if (time < 18) +{ + Console.WriteLine("Good day."); +} +else +{ + Console.WriteLine("Good evening."); +} +// Outputs "Good evening." +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.82 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Conditions]], [[CSharp Conditions ElseIf]], [[CSharp Booleans]] +- **참조 맥락:** Conditions 섹션 — The else if Statement 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# The else Statement — https://www.w3schools.com/cs/cs_conditions_else.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# The else Statement" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Conditions_ElseIf.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Conditions_ElseIf.md new file mode 100644 index 00000000..327a2ee7 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Conditions_ElseIf.md @@ -0,0 +1,77 @@ +--- +id: csharp-conditions-elseif +title: "C# The else if Statement" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["else if statement C#", "C# else if 문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.82 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "conditions", "elseif"] +raw_sources: ["https://www.w3schools.com/cs/cs_conditions_elseif.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Conditions ElseIf]] + +## 🎯 한 줄 통찰 (One-line insight) +`else if` is not a distinct keyword in C# any more than in C/C++/Java — it's just an `else` block whose body happens to be another `if` statement, which the three-way morning/day/evening example makes visible: each additional `else if` is really nested inside the previous `else`, and the chain only terminates in a plain `else` when every prior condition has failed, evaluated strictly top-to-bottom with short-circuit stopping at the first true condition. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`else if`** — tests a NEW condition only when all prior conditions in the chain were false. [S1] +- **Syntax**: `if (condition1) {...} else if (condition2) {...} else {...}` — any number of `else if` blocks can be chained between the initial `if` and the final `else`. [S1] +- **Top-to-bottom, first-match evaluation** — conditions are checked in order; the first one that's true runs its block and the rest of the chain is skipped entirely. [S1] + +## 📖 세부 내용 (Details) +- Three-branch time-of-day example: `int time = 22; if (time < 10) { Console.WriteLine("Good morning."); } else if (time < 20) { Console.WriteLine("Good day."); } else { Console.WriteLine("Good evening."); }` — since `22` is not `< 10` (condition1 false) and not `< 20` (condition2 also false), execution falls through to the final `else`, printing `"Good evening."`. [S1] +- The tutorial notes that if `time` were `14` instead, the program would print `"Good day."` (condition2 would be true). [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **else if는 별도 키워드가 아니라 else의 본문이 if인 구조**: C/C++/Java와 마찬가지로 C#의 else if 체인도 실제로는 else 블록 안에 또 다른 if가 중첩된 구조라는 점이 삼단계 시간대 예제(morning/day/evening)로 다시 확인됨 — 문법적 특수 케이스가 아니라 else+if의 자연스러운 조합. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +아침/낮/저녁 인사말을 시간(time) 값에 따라 세 가지로 분기하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Chained else-if — first true condition wins, rest skipped (C#): +```csharp +int time = 22; +if (time < 10) +{ + Console.WriteLine("Good morning."); +} +else if (time < 20) +{ + Console.WriteLine("Good day."); +} +else +{ + Console.WriteLine("Good evening."); +} +// Outputs "Good evening." +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.82 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Conditions Else]], [[CSharp Conditions Shorthand]], [[CSharp Switch]] +- **참조 맥락:** Conditions 섹션 — Short Hand If...Else 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# The else if Statement — https://www.w3schools.com/cs/cs_conditions_elseif.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# The else if Statement" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Conditions_Shorthand.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Conditions_Shorthand.md new file mode 100644 index 00000000..cc8d8a5b --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Conditions_Shorthand.md @@ -0,0 +1,72 @@ +--- +id: csharp-conditions-shorthand +title: "C# Short Hand If...Else" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["ternary operator C#", "? : C#", "C# 삼항 연산자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.82 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "conditions", "ternary"] +raw_sources: ["https://www.w3schools.com/cs/cs_conditions_shorthand.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Conditions Shorthand]] + +## 🎯 한 줄 통찰 (One-line insight) +The ternary operator syntax `variable = (condition) ? expressionTrue : expressionFalse;` is identical to C and C++'s `? :` operator, and the tutorial demonstrates it by directly collapsing the SAME time/greeting `if/else` example from the previous two chapters into one line — making this chapter function as a running "before/after" refactor of the exact code just taught, rather than a standalone new example. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Ternary operator (`? :`)** — called "short-hand if...else" here, consists of three operands (hence "ternary"), replacing a full `if/else` block with a single expression. [S1] +- **Syntax**: `variable = (condition) ? expressionTrue : expressionFalse;`. [S1] +- **Use case** — best suited for SIMPLE if/else logic that just assigns one of two values; not intended to replace complex multi-branch logic. [S1] + +## 📖 세부 내용 (Details) +- Full if/else form (identical to the `else` chapter's example): `int time = 20; if (time < 18) { Console.WriteLine("Good day."); } else { Console.WriteLine("Good evening."); }`. [S1] +- Ternary equivalent: `int time = 20; string result = (time < 18) ? "Good day." : "Good evening."; Console.WriteLine(result);` — produces the identical output in one line instead of five. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C/C++의 삼항 연산자와 문법이 동일**: `(condition) ? expressionTrue : expressionFalse` 문법이 C/C++와 차이가 없다는 점이 확인됨. [S1] +- **바로 앞 챕터(else)의 예제를 그대로 재사용해 리팩터링으로 제시**: 새로운 예제를 만들지 않고 else 챕터의 time/greeting 코드를 그대로 가져와 5줄을 1줄로 줄이는 "before/after" 형태로 가르친다는 점이 확인됨 — 개념을 처음부터 다시 설명하지 않고 직전 학습 내용을 압축하는 방식. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +if...else 5줄짜리 시간대 인사말 코드를 삼항 연산자 한 줄로 압축하는 리팩터링 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Full if/else vs. ternary shorthand — same output (C#): +```csharp +// Full if/else (5 lines) +int time = 20; +if (time < 18) { Console.WriteLine("Good day."); } +else { Console.WriteLine("Good evening."); } + +// Ternary shorthand (1 line) +string result = (time < 18) ? "Good day." : "Good evening."; +Console.WriteLine(result); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.82 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Conditions ElseIf]], [[CSharp Switch]], [[CPP Conditions Shorthand]] +- **참조 맥락:** Conditions 섹션의 마지막 챕터 — Switch 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Short Hand If...Else — https://www.w3schools.com/cs/cs_conditions_shorthand.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Short Hand If...Else" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Constructors.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Constructors.md new file mode 100644 index 00000000..b471c6cf --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Constructors.md @@ -0,0 +1,84 @@ +--- +id: csharp-constructors +title: "C# Constructors" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["default constructor C#", "constructor parameters C#", "C# 생성자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "oop", "constructors"] +raw_sources: ["https://www.w3schools.com/cs/cs_constructors.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Constructors]] + +## 🎯 한 줄 통찰 (One-line insight) +The "constructors save time" comparison at the end of this chapter directly rewrites the SAME Ford/Opel two-object example already shown across Class Members and Multiple Classes chapters — turning 8 lines of manual field assignment (`Ford.model = "Mustang"; Ford.color = "red"; Ford.year = 1969;` ×2) into 2 lines of parameterized construction (`new Car("Mustang", "Red", 1969)`), making constructors the payoff for a pattern this wiki has now seen written out the long way THREE times before finally being shown the short way — identical in spirit to C++'s constructor mechanism already covered in Topic_CPP, right down to the "name must match the class, no return type" rule and constructor overloading via differing parameter counts. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Constructor** — a special method that initializes an object; called automatically when an object of the class is created (`new Car()`). [S1] +- **Naming rule** — the constructor's name MUST match the class name exactly, and it CANNOT have a return type (no `void`, no `int`, nothing). [S1] +- **Default constructor** — every class has one even if you don't write it yourself; but the auto-generated one can't set initial field values the way a custom constructor can. [S1] +- **Constructor parameters** — a constructor can take parameters just like any method, used to set field values at creation time (`public Car(string modelName) { model = modelName; }`). [S1] +- **Multiple parameters** — a constructor can take as many parameters as needed, mapping each to a field. [S1] +- **Constructor overloading** — like ordinary methods, constructors can be overloaded with different parameter counts/types. [S1] + +## 📖 세부 내용 (Details) +- Parameterless constructor setting a fixed value: `class Car { public string model; public Car() { model = "Mustang"; } static void Main(string[] args) { Car Ford = new Car(); Console.WriteLine(Ford.model); } }` → `"Mustang"`. [S1] +- Single-parameter constructor: `public Car(string modelName) { model = modelName; } ... Car Ford = new Car("Mustang");` → `"Mustang"`. [S1] +- Multi-parameter constructor: `public Car(string modelName, string modelColor, int modelYear) { model = modelName; color = modelColor; year = modelYear; } ... Car Ford = new Car("Mustang", "Red", 1969);` → `"Red 1969 Mustang"`. [S1] +- Before/after comparison: manual field-by-field assignment for `Ford` and `Opel` (8 lines) collapses to `Car Ford = new Car("Mustang", "Red", 1969); Car Opel = new Car("Astra", "White", 2005);` (2 lines) with a parameterized constructor. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C++ 생성자 규칙과 동일**: 생성자 이름이 클래스명과 일치해야 하고 반환 타입을 가질 수 없다는 규칙, 그리고 매개변수 개수로 오버로딩할 수 있다는 규칙이 Topic_CPP의 Constructors/Constructors Overloading 챕터와 차이가 없다는 점이 확인됨. [S1] +- **이전 챕터들의 수동 필드 대입 패턴이 생성자로 압축됨**: Class Members와 Multiple Classes 챕터에서 반복적으로 보여준 "객체 생성 후 필드를 하나씩 대입"하는 8줄짜리 패턴이, 이번 챕터의 매개변수 생성자를 쓰면 2줄로 줄어든다는 것이 직접적인 비교로 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +Ford와 Opel 두 Car 객체를 생성자 없이 필드별로 수동 대입하는 방식과, 3개 매개변수를 받는 생성자로 한 줄에 생성하는 방식을 나란히 비교하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Manual field assignment vs. parameterized constructor — same result, less code (C#): +```csharp +// Without constructor +Car Ford = new Car(); +Ford.model = "Mustang"; Ford.color = "red"; Ford.year = 1969; + +// With constructor +class Car +{ + public string model, color; + public int year; + public Car(string modelName, string modelColor, int modelYear) + { + model = modelName; color = modelColor; year = modelYear; + } +} +Car Ford2 = new Car("Mustang", "Red", 1969); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Classes Multi]], [[CSharp Access Modifiers]], [[CPP Constructors]], [[CPP Constructors Overloading]] +- **참조 맥락:** Constructors 섹션의 유일 챕터 — Access Modifiers & Properties 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Constructors — https://www.w3schools.com/cs/cs_constructors.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Constructors" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Data_Types.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Data_Types.md new file mode 100644 index 00000000..acbc91d9 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Data_Types.md @@ -0,0 +1,75 @@ +--- +id: csharp-data-types +title: "C# Data Types" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["int long float double bool char string sizes", "C# 데이터 타입"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "data-types"] +raw_sources: ["https://www.w3schools.com/cs/cs_data_types.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Data Types]] + +## 🎯 한 줄 통찰 (One-line insight) +C# fixes its numeric type SIZES in the language spec itself (`int` = 4 bytes, `long` = 8 bytes, always, on every platform), unlike C where `int`/`long` sizes are implementation-defined and vary by compiler/platform (a recurring caveat throughout Topic_C's Data Types chapter) — trading C's "your mileage may vary" portability model for C#'s "the number never changes" guarantee, a direct consequence of C# always running on a single controlled runtime (.NET/CLR) rather than being compiled to arbitrary native targets. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Numeric types split into integer vs. floating-point** — integer types (`int`, `long`) store whole numbers; floating-point types (`float`, `double`) store fractional numbers. [S1] +- **Fixed sizes** — `int` 4 bytes (-2,147,483,648 to 2,147,483,647), `long` 8 bytes (much larger range), `float` 4 bytes (~6-7 decimal digit precision), `double` 8 bytes (~15 decimal digit precision), `bool` 1 byte, `char` 2 bytes, `string` 2 bytes per character. [S1] +- **Literal suffixes required** — `long` values need an `L` suffix (`15000000000L`), `float` values need `F` (`5.75F`), `double` values need `D` (`19.99D`) — the compiler needs the suffix to disambiguate which type the literal should be. [S1] +- **float vs. double precision trade-off** — float's ~6-7 digit precision vs. double's ~15 digits is the explicit reason the tutorial recommends double for "most calculations." [S1] +- **Scientific notation** — `float f1 = 35e3F; double d1 = 12E4D;` — the `e`/`E` indicates a power of 10. [S1] +- **`int` and `double` as the default go-to types** — despite the full menu of numeric types, the tutorial states int (whole numbers) and double (decimals) are the most commonly used throughout. [S1] + +## 📖 세부 내용 (Details) +- Boolean: `bool isCSharpFun = true; bool isFishTasty = false;` — printed values are capitalized `True`/`False` (not lowercase `true`/`false`) in console output. [S1] +- Char: `char myGrade = 'B';` — single quotes only. [S1] +- String: `string greeting = "Hello World";` — double quotes only. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **타입 크기가 플랫폼에 관계없이 고정됨**: Topic_C의 Data Types 챕터는 int/long 등의 정확한 크기가 컴파일러/플랫폼마다 다를 수 있다는 점을 반복적으로 경고했지만, C#은 int=4바이트, long=8바이트 등으로 크기를 언어 명세 차원에서 고정한다는 점이 이번 챕터에서 확인됨 — .NET/CLR이라는 단일 통제된 런타임 위에서만 실행되기 때문에 가능한 보장. [S1] +- **불리언 출력이 대문자로 표시됨**: `Console.WriteLine(isCSharpFun);`이 `True`(대문자 T)를 출력한다는 점이 확인됨 — C/C++가 0/1을 출력하거나 소문자 true/false를 요구하는 것과는 다른 표시 방식. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 7가지 데이터 타입 각각을 선언하고 출력하는 예제가 원문에서 개별적으로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Literal suffixes required for long/float/double (C#): +```csharp +int myInt = 100000; +long myLong = 15000000000L; // L suffix required +float myFloat = 5.75F; // F suffix required +double myDouble = 19.99D; // D suffix required +bool isCSharpFun = true; // prints "True" +char myGrade = 'B'; +string greeting = "Hello World"; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Variables]], [[CSharp Type Casting]], [[C Data Types]] +- **참조 맥락:** Data Types & Type Casting 섹션 — Type Casting 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Data Types — https://www.w3schools.com/cs/cs_data_types.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Data Types" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Enums.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Enums.md new file mode 100644 index 00000000..e3649b93 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Enums.md @@ -0,0 +1,80 @@ +--- +id: csharp-enums +title: "C# Enum" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["enumerations C#", "enum switch C#", "C# 열거형"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "enums"] +raw_sources: ["https://www.w3schools.com/cs/cs_enums.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Enums]] + +## 🎯 한 줄 통찰 (One-line insight) +`Console.WriteLine(myVar)` on a C# enum prints the symbolic NAME (`"Medium"`), not the underlying integer — a real behavioral difference from C++'s enum, which prints its raw integer value when streamed through `cout <<` unless a custom conversion is written, meaning C# enums carry name-string-printability as a built-in feature (via an implicit `ToString()`) where C++ requires the programmer to bridge that gap manually; the auto-incrementing 0/1/2... numbering and the ability to override a starting value (which cascades to all subsequent members) otherwise matches the C++ enum model already documented in `[[CPP Enum]]`. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`enum` keyword** — declares an enum instead of `class`/`interface`; members separated by commas, no explicit values required. [S1] +- **Dot syntax access** — `Level myVar = Level.Medium;` — same pattern as accessing a static class member. [S1] +- **Printing an enum prints its NAME** — `Console.WriteLine(myVar);` outputs `"Medium"`, not a number. [S1] +- **Default integer values** — the first member is `0`, the second `1`, and so on, incrementing automatically. [S1] +- **Explicit cast to get the integer** — `(int) Months.April` is required to retrieve the underlying numeric value; it isn't exposed by default. [S1] +- **Custom starting values cascade forward** — assigning a value to one member (e.g. `March = 6`) shifts every SUBSEQUENT member's auto-incremented value accordingly (`April` becomes `7`, not `3`). [S1] +- **Enums inside a class** — an enum can be declared as a member of a class, scoped to it. [S1] +- **Enums in `switch`** — a natural fit for `switch` statements, matching each `case` against an enum member. [S1] +- **Use case** — values known never to change: month names, weekdays, colors, card suits, etc. [S1] + +## 📖 세부 내용 (Details) +- Basic declaration + access: `enum Level { Low, Medium, High } ... Level myVar = Level.Medium; Console.WriteLine(myVar);` → `"Medium"`. [S1] +- Enum inside a class: `class Program { enum Level { Low, Medium, High } static void Main(string[] args) { Level myVar = Level.Medium; Console.WriteLine(myVar); } }` → `"Medium"`. [S1] +- Default numbering + explicit cast: `enum Months { January, February, March, April, May, June, July } ... int myNum = (int) Months.April;` → `3` (0-indexed). [S1] +- Custom starting value cascading: `enum Months { January, February, March=6, April, May, June, July } ... int myNum = (int) Months.April;` → `7` (March=6 shifts April to 7, not the default 3). [S1] +- Switch on enum: `switch(myVar) { case Level.Low: ...; break; case Level.Medium: Console.WriteLine("Medium level"); break; case Level.High: ...; break; }` → `"Medium level"`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **enum을 출력하면 이름이 나옴(C++와 다름)**: C++에서 enum을 `cout <<`으로 출력하면 기본적으로 정수값이 나오지만(별도 변환 없이는 이름이 출력되지 않음), C#은 `Console.WriteLine(myVar)`가 곧바로 심볼릭 이름("Medium")을 출력한다는 점이 확인됨 — C#의 enum이 기본적으로 문자열 표현을 내장하고 있음을 보여줌. [S1] +- **자동 증가·수동 재지정 방식은 C++의 enum과 동일**: 첫 멤버가 0부터 시작해 자동 증가하고, 특정 멤버에 값을 수동으로 지정하면 그 이후 멤버들이 그 값을 기준으로 다시 증가한다는 규칙이 `[[CPP Enum]]`에서 확인된 C++ enum 규칙과 차이가 없다는 점이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +Level enum(Low/Medium/High)을 switch문에서 각 case와 매칭시켜 해당 레벨 메시지를 출력하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Printing an enum prints its name; explicit cast needed for the integer value (C#): +```csharp +enum Level { Low, Medium, High } + +Level myVar = Level.Medium; +Console.WriteLine(myVar); // "Medium" -- name, not a number + +int myNum = (int) Level.Medium; // explicit cast required +Console.WriteLine(myNum); // 1 +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Interface Multi]], [[CSharp Switch]], [[CSharp User Input]], [[CPP Enum]] +- **참조 맥락:** Enums 섹션의 유일 챕터 — User Input 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Enum — https://www.w3schools.com/cs/cs_enums.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Enum" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Exceptions.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Exceptions.md new file mode 100644 index 00000000..55aef0cc --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Exceptions.md @@ -0,0 +1,94 @@ +--- +id: csharp-exceptions +title: "C# Exceptions - Try..Catch" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["try catch finally throw C#", "e.Message", "C# 예외 처리"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "exceptions"] +raw_sources: ["https://www.w3schools.com/cs/cs_exceptions.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Exceptions]] + +## 🎯 한 줄 통찰 (One-line insight) +The `try { } catch (Exception e) { } finally { }` structure is functionally identical to C++'s exception handling already documented in `[[CPP Exceptions]]`, but where C++ typically catches by REFERENCE to a specific exception type (`catch (std::exception& e)`) and reads its message via `.what()`, C# catches the generic base `Exception` type and reads the message via a `.Message` PROPERTY (no parentheses — consistent with the property-not-method pattern already confirmed for `.Length` in the Strings chapter); `throw new ArithmeticException("...")` also demonstrates that C# ships a family of ready-made, semantically-named exception classes (`ArithmeticException`, `FileNotFoundException`, `IndexOutOfRangeException`, `TimeOutException`) rather than requiring the programmer to define custom exception types from scratch for common cases. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Exception** — the technical term for an error C# "throws" when something goes wrong (bad input, coding errors, unforeseen conditions). [S1] +- **`try { }`** — a block of code tested for errors during execution. [S1] +- **`catch (Exception e) { }`** — a block that runs IF an error occurs inside the paired `try` block; `e` is a variable holding the exception object. [S1] +- **`e.Message`** — a property (no parentheses) on the caught exception, describing what went wrong. [S1] +- **`finally { }`** — runs AFTER the try/catch, regardless of whether an error occurred or was caught. [S1] +- **`throw new ExceptionType("message")`** — creates and raises a CUSTOM error, using one of C#'s built-in exception classes (`ArithmeticException`, `FileNotFoundException`, `IndexOutOfRangeException`, `TimeOutException`, etc.). [S1] + +## 📖 세부 내용 (Details) +- Unhandled error: `int[] myNumbers = {1, 2, 3}; Console.WriteLine(myNumbers[10]);` → `System.IndexOutOfRangeException: 'Index was outside the bounds of the array.'`. [S1] +- Caught with built-in message: `try { ...myNumbers[10]... } catch (Exception e) { Console.WriteLine(e.Message); }` → `"Index was outside the bounds of the array."`. [S1] +- Caught with custom message: `catch (Exception e) { Console.WriteLine("Something went wrong."); }` → `"Something went wrong."` (note: `e` is available but not necessarily used). [S1] +- With `finally`: adding `finally { Console.WriteLine("The 'try catch' is finished."); }` runs that line AFTER the catch block regardless of outcome. [S1] +- Custom throw: `static void checkAge(int age) { if (age < 18) { throw new ArithmeticException("Access denied - You must be at least 18 years old."); } else { Console.WriteLine("Access granted - You are old enough!"); } } ... checkAge(15);` → throws `System.ArithmeticException: 'Access denied...'`; `checkAge(20);` → prints `"Access granted - You are old enough!"`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C++의 예외 처리와 구조는 동일, 메시지 접근 방식이 다름**: try/catch/finally 구조 자체는 `[[CPP Exceptions]]`에서 확인된 C++와 차이가 없지만, C++가 보통 `.what()` 메서드로 예외 메시지를 얻는 반면 C#은 `.Message`라는 프로퍼티(괄호 없음)로 접근한다는 점이 확인됨 — Strings 챕터에서 확인된 프로퍼티 vs 메서드 구분이 예외 객체에도 그대로 적용됨. [S1] +- **즉시 사용 가능한 다양한 내장 예외 클래스 제공**: `ArithmeticException`, `FileNotFoundException`, `IndexOutOfRangeException`, `TimeOutException` 등 의미가 명확한 예외 클래스들이 기본 제공되어, throw할 때 매번 커스텀 예외 타입을 새로 정의할 필요가 없다는 점이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +나이가 18세 미만이면 ArithmeticException을 throw하고, 18세 이상이면 "Access granted"를 출력하는 checkAge() 함수 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +try/catch/finally with a custom throw (C#): +```csharp +static void checkAge(int age) +{ + if (age < 18) + { + throw new ArithmeticException("Access denied - You must be at least 18 years old."); + } + else + { + Console.WriteLine("Access granted - You are old enough!"); + } +} + +try +{ + checkAge(15); +} +catch (Exception e) +{ + Console.WriteLine(e.Message); // property, no parentheses +} +finally +{ + Console.WriteLine("The 'try catch' is finished."); +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp User Input]], [[CSharp Files]], [[CPP Exceptions]], [[CSharp Strings]] +- **참조 맥락:** Exceptions 섹션의 유일 챕터 — Files 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Exceptions - Try..Catch — https://www.w3schools.com/cs/cs_exceptions.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Exceptions - Try..Catch" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Files.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Files.md new file mode 100644 index 00000000..b9e74ee5 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Files.md @@ -0,0 +1,71 @@ +--- +id: csharp-files +title: "C# Files" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["System.IO File class", "WriteAllText ReadAllText", "C# 파일"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "files"] +raw_sources: ["https://www.w3schools.com/cs/cs_files.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Files]] + +## 🎯 한 줄 통찰 (One-line insight) +C# collapses file I/O into ONE-LINE static method calls on the `File` class (`File.WriteAllText("filename.txt", writeText);` / `File.ReadAllText("filename.txt")`) — a fundamentally different model from C++'s stream-object approach in `[[CPP Files]]` (create an `ofstream`/`ifstream` object, use `<<`/`getline()`, explicitly `.close()` it) or C's `fopen`/`fprintf`/`fclose` triad; there's no open/close lifecycle to manage at all in the basic C# examples shown here — `File.WriteAllText()` opens, writes, AND closes the file internally in a single call, trading the C-family's manual resource-management ceremony for a higher-level, one-shot convenience API. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`System.IO` namespace** — must be imported (`using System.IO;`) to access the `File` class. [S1] +- **`File` class** — a static class (no instantiation, no `new File()`) offering methods for creating/reading/writing/deleting files. [S1] +- **Key methods**: `AppendText()` (append to end), `Copy()` (copy a file), `Create()` (create/overwrite), `Delete()`, `Exists()` (test existence), `ReadAllText()` (read entire contents), `Replace()` (replace one file's contents with another's), `WriteAllText()` (create/overwrite AND write in one call). [S1] +- **No explicit open/close** — unlike C++'s `ofstream`/`ifstream` objects (which must be created, used, then `.close()`d) or C's `fopen`/`fclose` pair, `File.WriteAllText()` and `File.ReadAllText()` handle the entire file lifecycle internally in a single static call. [S1] + +## 📖 세부 내용 (Details) +- Write then read: `using System.IO; string writeText = "Hello World!"; File.WriteAllText("filename.txt", writeText); string readText = File.ReadAllText("filename.txt"); Console.WriteLine(readText);` → outputs `"Hello World!"`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **파일 생명주기 관리 방식이 C/C++와 근본적으로 다름**: `[[CPP Files]]`는 ofstream/ifstream 객체를 만들고 `<<`/`getline()`으로 쓰고 읽은 뒤 반드시 `.close()`를 호출해야 했고, C도 fopen/fprintf/fclose 3단계가 필요했지만, C#은 `File.WriteAllText()`/`File.ReadAllText()`라는 정적 메서드 한 번 호출로 열기-쓰기(또는 읽기)-닫기가 전부 내부적으로 처리된다는 점이 확인됨 — 객체 생성이나 명시적 close 호출이 전혀 없음. [S1] +- **File은 인스턴스화되지 않는 정적 클래스**: `ofstream`/`ifstream`처럼 객체를 만드는 방식이 아니라, `File.MethodName()`처럼 클래스 이름으로 직접 호출하는 정적 메서드 모음이라는 점이 C++ 파일 클래스들과의 설계 차이로 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +"Hello World!"라는 문자열을 filename.txt에 WriteAllText()로 쓰고, 곧바로 ReadAllText()로 읽어 출력하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +One-line file write and read — no explicit open/close lifecycle (C#): +```csharp +using System.IO; + +string writeText = "Hello World!"; +File.WriteAllText("filename.txt", writeText); // create + write + close, all in one call + +string readText = File.ReadAllText("filename.txt"); // open + read + close, all in one call +Console.WriteLine(readText); // "Hello World!" +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Exceptions]], [[CPP Files]], [[C Files]] +- **참조 맥락:** Files 섹션의 유일 챕터이자 C# 튜토리얼의 마지막 챕터 — Topic_CSharp 전체 완료. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Files — https://www.w3schools.com/cs/cs_files.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Files" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_For_Loop.md b/10_Wiki/Dev/Topic_CSharp/CSharp_For_Loop.md new file mode 100644 index 00000000..7fc7cd44 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_For_Loop.md @@ -0,0 +1,81 @@ +--- +id: csharp-for-loop +title: "C# For Loop" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["nested loops C#", "C# for 반복문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "loops", "for"] +raw_sources: ["https://www.w3schools.com/cs/cs_for_loop.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp For Loop]] + +## 🎯 한 줄 통찰 (One-line insight) +The three-statement `for (statement1; statement2; statement3)` structure and its nested-loop composition (outer loop's body containing a complete inner loop, with the inner loop restarting fully on every single outer iteration) are unchanged from C/C++ — the nested-loop iteration-count math shown here (`2 outer × 3 inner = 6 inner executions total`) is the same multiplicative relationship this wiki has already confirmed for C and C++ nested loops. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`for (statement1; statement2; statement3) { ... }`** — statement1 runs ONCE before the loop starts (initialization); statement2 is the condition checked before EVERY iteration; statement3 runs AFTER each iteration (typically increment/decrement). [S1] +- **Step size is arbitrary** — statement3 doesn't have to be `i++`; it can be any expression, e.g. `i = i + 2` to iterate only even numbers. [S1] +- **Nested loops** — a complete `for` loop placed inside another `for` loop's body; the inner loop runs to completion once for EVERY iteration of the outer loop. [S1] + +## 📖 세부 내용 (Details) +- Basic count: `for (int i = 0; i < 5; i++) { Console.WriteLine(i); }` → prints 0 through 4. [S1] +- Step-by-2: `for (int i = 0; i <= 10; i = i + 2) { Console.WriteLine(i); }` → prints even numbers 0 through 10. [S1] +- Nested loop with execution counts explicitly annotated: + ``` + for (int i = 1; i <= 2; ++i) { + Console.WriteLine("Outer: " + i); // executes 2 times + for (int j = 1; j <= 3; j++) { + Console.WriteLine(" Inner: " + j); // executes 6 times total (2 * 3) + } + } + ``` + [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **for문 구조와 중첩 반복 곱셈 관계가 C/C++와 동일**: 3-statement for 구조, 그리고 중첩 루프에서 "외부 루프 횟수 × 내부 루프 횟수"라는 곱셈 관계가 C/C++에서 확인된 것과 차이가 없다는 점이 이번 챕터에서 재확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +0-4 카운트, 짝수만 출력하는 step-2 루프, 2×3 중첩 루프의 실행 횟수를 주석으로 명시한 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Nested for loops — inner runs fully for each outer iteration (C#): +```csharp +for (int i = 1; i <= 2; ++i) +{ + Console.WriteLine("Outer: " + i); // 2 times + for (int j = 1; j <= 3; j++) + { + Console.WriteLine(" Inner: " + j); // 6 times total (2 * 3) + } +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp While Loop]], [[CSharp Foreach Loop]], [[CPP For Loop Nested]] +- **참조 맥락:** Loops 섹션 — Foreach Loop 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# For Loop — https://www.w3schools.com/cs/cs_for_loop.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# For Loop" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Foreach_Loop.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Foreach_Loop.md new file mode 100644 index 00000000..35d19d1e --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Foreach_Loop.md @@ -0,0 +1,68 @@ +--- +id: csharp-foreach-loop +title: "C# Foreach Loop" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["foreach in C#", "C# foreach 반복문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.82 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "loops", "foreach"] +raw_sources: ["https://www.w3schools.com/cs/cs_foreach_loop.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Foreach Loop]] + +## 🎯 한 줄 통찰 (One-line insight) +C# spells its range-based loop as the dedicated keyword `foreach (type variableName in arrayName)`, whereas C++11's equivalent range-based for loop reuses the SAME `for` keyword with a colon (`for (type var : container)`) — same underlying concept (iterate every element without manual indexing) expressed through two genuinely different keywords, meaning "foreach" isn't just C++'s range-for renamed, it's C#'s own dedicated syntax that happens to solve the identical problem. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`foreach (type variableName in arrayName) { ... }`** — a loop construct used EXCLUSIVELY for iterating over elements of an array (or other data sets); no index variable, no manual bounds. [S1] +- **`in` keyword** — connects the per-element variable to the collection being iterated, distinct from C++'s `:` colon syntax for the same relationship. [S1] +- **No indexing needed** — unlike a `for` loop over an array (`arr[i]`), `foreach` never exposes an index; you only get direct access to each element's value. [S1] +- **Deferred prerequisite** — the tutorial explicitly tells readers not to worry about the array syntax shown here, deferring full array coverage to the later Arrays chapter. [S1] + +## 📖 세부 내용 (Details) +- Example: `string[] cars = {"Volvo", "BMW", "Ford", "Mazda"}; foreach (string i in cars) { Console.WriteLine(i); }` — prints all four car names, one per line. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **for가 아니라 별도 키워드 foreach를 사용함**: C++11의 범위 기반 for 루프(`for (string car : cars)`)는 기존 `for` 키워드를 콜론(:)과 함께 재사용했지만, C#은 `foreach`라는 완전히 별도의 전용 키워드와 `in`을 사용한다는 점이 확인됨 — 개념은 동일(인덱스 없이 각 원소 순회)하지만 문법 표현이 실제로 다름. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +자동차 이름이 담긴 문자열 배열을 foreach로 순회해 각 원소를 출력하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +foreach — dedicated keyword + `in`, unlike C++'s `for ... :` syntax (C#): +```csharp +string[] cars = {"Volvo", "BMW", "Ford", "Mazda"}; +foreach (string i in cars) +{ + Console.WriteLine(i); +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.82 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp For Loop]], [[CSharp Break]], [[CSharp Arrays]], [[CPP For Loop Foreach]] +- **참조 맥락:** Loops 섹션 — Break and Continue 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Foreach Loop — https://www.w3schools.com/cs/cs_foreach_loop.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Foreach Loop" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Get_Started.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Get_Started.md new file mode 100644 index 00000000..15167b48 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Get_Started.md @@ -0,0 +1,92 @@ +--- +id: csharp-get-started +title: "C# Get Started" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["Visual Studio setup", "C# IDE", "C# 시작하기"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "setup", "visual-studio"] +raw_sources: ["https://www.w3schools.com/cs/cs_getstarted.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Get Started]] + +## 🎯 한 줄 통찰 (One-line insight) +Unlike C/C++'s tutorial-neutral "any compiler will do" framing, this chapter names ONE specific tool — Visual Studio Community — as the recommended path, and justifies it not on technical merit but on ownership: "the program, the framework, and the language are all created by Microsoft," a same-vendor argument that has no equivalent in the C/C++ chapters (gcc/clang are not made by the same organization that wrote the C/C++ standard). [S1] + +## 🧠 핵심 개념 (Core concepts) +- **IDE (Integrated Development Environment)** — used to edit and compile code; Visual Studio Community is the recommended free option. [S1] +- **Same-vendor stack** — Visual Studio, the .NET Framework, and C# are all Microsoft products, which is given as the reason to prefer Visual Studio specifically. [S1] +- **Console App (.NET Core)** project template — the starting project type used throughout the tutorial. [S1] +- **Auto-generated boilerplate** — creating a new console project auto-generates a `Program.cs` file containing `using System;`, a `namespace`, a `class Program`, and a `static void Main(string[] args)` method with a `Console.WriteLine("Hello World!");` call — introduced here without explanation, to be unpacked in the next chapter (Syntax). [S1] +- **F5 to run** — pressing F5 (or Debug → Start Debugging) compiles and executes the code. [S1] +- **W3Schools "Try it Yourself"** — the tutorial's own in-browser alternative to installing Visual Studio, used throughout the rest of the series. [S1] + +## 📖 세부 내용 (Details) +- Full auto-generated starter file: + ``` + using System; + namespace HelloWorld + { + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Hello World!"); + } + } + } + ``` + [S1] +- Expected console output after running: `Hello World!` followed by a process-exit message. [S1] +- A debugging option is mentioned to auto-close the console window when debugging stops (Tools → Options → Debugging). [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **툴체인 선택이 언어와 결합됨**: C/C++ 튜토리얼은 컴파일러 선택을 사용자에게 맡기고 어떤 표준 준수 컴파일러든 무방하다는 전제였지만, C#은 처음부터 "언어·프레임워크·IDE가 모두 같은 회사 제품"이라는 이유로 Visual Studio를 사실상 유일한 권장 경로로 제시한다는 점이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +Visual Studio에서 새 Console App (.NET Core) 프로젝트를 생성하고 F5로 실행해 "Hello World!"를 출력하는 전체 설치→실행 흐름이 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Auto-generated Visual Studio console app boilerplate (C#): +```csharp +using System; +namespace HelloWorld +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Hello World!"); + } + } +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Intro]], [[CSharp Syntax]] +- **참조 맥락:** Basics 섹션 — Syntax 챕터로 이어짐(이 챕터에서 등장한 보일러플레이트를 한 줄씩 설명). + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Get Started — https://www.w3schools.com/cs/cs_getstarted.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Get Started" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Inheritance.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Inheritance.md new file mode 100644 index 00000000..aefaac46 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Inheritance.md @@ -0,0 +1,85 @@ +--- +id: csharp-inheritance +title: "C# Inheritance" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["derived base class C#", "sealed keyword C#", "C# 상속"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "oop", "inheritance"] +raw_sources: ["https://www.w3schools.com/cs/cs_inheritance.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Inheritance]] + +## 🎯 한 줄 통찰 (One-line insight) +C#'s inheritance syntax `class Car : Vehicle` OMITS the access specifier that C++'s equivalent `class Car : public Vehicle` REQUIRES — C# never lets you write `class Car : private Vehicle`, because member-level access (public/private/protected on each field/method) is the only lever C# offers, unlike C++ which layers an ADDITIONAL access specifier onto the inheritance relationship itself; and where C++ uses `final` to block further subclassing, C# uses a differently-named but functionally identical `sealed` keyword. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Derived class (child)** — the class that inherits from another class. [S1] +- **Base class (parent)** — the class being inherited from. [S1] +- **`:` syntax** — `class Car : Vehicle` — no access specifier before the base class name, unlike C++'s `class Car : public Vehicle`. [S1] +- **Inherited members** — a derived class gains ALL fields and methods from its base class, callable/accessible directly on the derived class's own objects. [S1] +- **Motivation** — code reusability: reuse an existing class's fields/methods instead of rewriting them in the new class. [S1] +- **`sealed` keyword** — prevents a class from being inherited at all; attempting to derive from a sealed class is a compile error (`'Car': cannot derive from sealed type 'Vehicle'`). [S1] + +## 📖 세부 내용 (Details) +- Full example: `class Vehicle { public string brand = "Ford"; public void honk() { Console.WriteLine("Tuut, tuut!"); } } class Car : Vehicle { public string modelName = "Mustang"; } ... Car myCar = new Car(); myCar.honk(); Console.WriteLine(myCar.brand + " " + myCar.modelName);` → calls the PARENT's `honk()` and reads the PARENT's `brand` field directly on a `Car` object, alongside `Car`'s own `modelName`. [S1] +- Sealed class blocking inheritance: `sealed class Vehicle { ... } class Car : Vehicle { ... }` → compile error. [S1] +- The tutorial explicitly points forward to Polymorphism as building on inherited methods to perform different tasks. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **상속 문법에 접근 지정자가 없음**: C++는 `class Car : public Vehicle`처럼 상속 관계 자체에 public/private/protected 접근 지정자를 붙여야 했지만, C#은 `class Car : Vehicle`처럼 이 지정자 없이 상속하며, 접근 제어는 오직 멤버 단위(각 필드/메서드의 public/private/protected)로만 이뤄진다는 점이 확인됨. [S1] +- **final 대신 sealed라는 다른 이름의 동일 개념**: C++11의 `final` 키워드와 동일한 역할(더 이상 상속 불가)을 C#은 `sealed`라는 이름으로 제공한다는 점이 확인됨 — 개념은 같지만 키워드가 다름. [S1] +- **원문 구조상 상속이 단일 챕터로 압축됨**: Topic_CPP는 Inheritance/Access/Multilevel/Multiple을 4개 문서로 나눴지만, C# 사이드바는 cs_inheritance.php 단 하나로 기본 상속과 sealed를 모두 다룬다는 점이 확인됨 — 다단계·다중 상속에 대한 별도 챕터가 C# 튜토리얼에는 없음. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +Vehicle(부모)의 brand 필드와 honk() 메서드를 Car(자식)가 상속받아 Car 객체에서 그대로 사용하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Inheritance without an access specifier on the base class (C#): +```csharp +class Vehicle +{ + public string brand = "Ford"; + public void honk() + { + Console.WriteLine("Tuut, tuut!"); + } +} +class Car : Vehicle // no `public`/`private` before Vehicle, unlike C++ +{ + public string modelName = "Mustang"; +} + +Car myCar = new Car(); +myCar.honk(); // inherited method +Console.WriteLine(myCar.brand + " " + myCar.modelName); // inherited field + own field +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Properties]], [[CSharp Polymorphism]], [[CPP Inheritance]] +- **참조 맥락:** Inheritance 섹션의 유일 챕터 — Polymorphism & Abstract 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Inheritance — https://www.w3schools.com/cs/cs_inheritance.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Inheritance" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Interface.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Interface.md new file mode 100644 index 00000000..4efde23a --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Interface.md @@ -0,0 +1,84 @@ +--- +id: csharp-interface +title: "C# Interface" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["interface implements C#", "IAnimal", "C# 인터페이스"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "oop", "interface"] +raw_sources: ["https://www.w3schools.com/cs/cs_interface.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Interface]] + +## 🎯 한 줄 통찰 (One-line insight) +The tutorial states outright why interfaces exist at all: "C# does not support 'multiple inheritance' (a class can only inherit from ONE base class)" — a hard restriction with NO equivalent in Topic_CPP, where C++ freely supports true multiple class inheritance (`class Derived : public Base1, public Base2`, already documented in `[[CPP Inheritance Multiple]]`) — so C# compensates by letting a class implement MANY interfaces via the SAME `:` syntax used for single-class inheritance, making interfaces less a stylistic alternative to abstract classes and more a structural workaround for a capability C# deliberately doesn't offer at the class level. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Interface** — a "completely abstract class" containing ONLY abstract methods and properties with empty bodies; no fields/variables allowed. [S1] +- **Naming convention** — interfaces are conventionally prefixed with `I` (e.g. `IAnimal`) to distinguish them from ordinary classes at a glance. [S1] +- **Default member modifiers** — interface members are implicitly `abstract` AND `public`, with no need to write those keywords. [S1] +- **Implementation via `:`** — the SAME symbol used for inheritance; a class "implements" an interface using `:`, and must provide bodies for ALL the interface's methods. [S1] +- **No `override` keyword needed** — unlike overriding a `virtual` base method, implementing an interface method requires no `override` keyword at all. [S1] +- **Cannot instantiate an interface directly** — like an abstract class, an interface can never be `new`'d into an object. [S1] +- **No constructors** — an interface cannot have a constructor, since it can never be instantiated. [S1] +- **Motivation #2, stated explicitly** — because C# disallows multiple class inheritance, interfaces are the mechanism for achieving multiple-inheritance-like behavior (a class implementing several interfaces). [S1] + +## 📖 세부 내용 (Details) +- Interface declaration: `interface Animal { void animalSound(); void run(); }` — both methods bodyless. [S1] +- Implementation: `interface IAnimal { void animalSound(); } class Pig : IAnimal { public void animalSound() { Console.WriteLine("The pig says: wee wee"); } } ... Pig myPig = new Pig(); myPig.animalSound();`. [S1] +- Explicit note that `IAnimal myObj = new IAnimal();` would be impossible, mirroring the abstract class restriction. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **다중 상속 부재를 인터페이스로 보완함**: C++는 `class Derived : public Base1, public Base2`처럼 여러 클래스를 동시에 상속하는 진짜 다중 상속을 지원했지만(`[[CPP Inheritance Multiple]]`), C#은 클래스 단위 다중 상속을 아예 지원하지 않고 대신 여러 인터페이스를 구현(implement)하는 방식으로 유사한 효과를 낸다는 점이 원문에서 직접 그 이유로 명시됨. [S1] +- **인터페이스 구현에는 override가 필요 없음**: Abstract 챕터에서 abstract 클래스를 상속할 때는 override 키워드가 필수였지만, 인터페이스를 implement할 때는 override 없이 그냥 메서드를 정의하면 된다는 차이가 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +IAnimal 인터페이스의 animalSound() 메서드를 Pig 클래스가 override 없이 그대로 구현해 호출하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Interface implementation — no `override` keyword required (C#): +```csharp +interface IAnimal +{ + void animalSound(); // no body +} +class Pig : IAnimal // "implements" -- same : syntax as inheritance +{ + public void animalSound() // no `override` needed + { + Console.WriteLine("The pig says: wee wee"); + } +} + +Pig myPig = new Pig(); +myPig.animalSound(); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Abstract]], [[CSharp Interface Multi]], [[CPP Inheritance Multiple]] +- **참조 맥락:** Interface 섹션 — Multiple Interfaces 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Interface — https://www.w3schools.com/cs/cs_interface.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Interface" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Interface_Multi.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Interface_Multi.md new file mode 100644 index 00000000..67446125 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Interface_Multi.md @@ -0,0 +1,72 @@ +--- +id: csharp-interface-multi +title: "C# Multiple Interfaces" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["implement multiple interfaces C#", "C# 다중 인터페이스"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "oop", "interface"] +raw_sources: ["https://www.w3schools.com/cs/cs_interface_multi.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Interface Multi]] + +## 🎯 한 줄 통찰 (One-line insight) +This short chapter delivers exactly the payoff the previous Interface chapter promised: a single class implementing MULTIPLE interfaces via a comma-separated list after `:` (`class DemoClass : IFirstInterface, ISecondInterface`) — this is as close as C# gets to C++'s multiple inheritance, but the constraint is real: every interface in the list contributes only bodyless method signatures, never actual field data or base implementation, so C# is achieving multiple "contracts" rather than C++'s multiple actual base-class STATE and behavior. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Comma-separated interface list** — `class DemoClass : IFirstInterface, ISecondInterface { ... }` — any number of interfaces can follow the `:`. [S1] +- **Each interface method must be implemented** — the implementing class must provide a body for every method declared across ALL implemented interfaces. [S1] +- **Still no shared state from interfaces** — since interfaces can't contain fields (per the previous chapter), implementing multiple interfaces never brings in multiple sets of DATA, only multiple sets of METHOD CONTRACTS. [S1] + +## 📖 세부 내용 (Details) +- Two interfaces: `interface IFirstInterface { void myMethod(); } interface ISecondInterface { void myOtherMethod(); }`. [S1] +- Combined implementation: `class DemoClass : IFirstInterface, ISecondInterface { public void myMethod() { Console.WriteLine("Some text.."); } public void myOtherMethod() { Console.WriteLine("Some other text..."); } }`. [S1] +- Usage: `DemoClass myObj = new DemoClass(); myObj.myMethod(); myObj.myOtherMethod();` → prints both messages. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C++ 다중 상속의 데이터 상속과 달리 계약(메서드 시그니처)만 상속됨**: C++의 다중 상속(`[[CPP Inheritance Multiple]]`)은 여러 베이스 클래스의 실제 필드와 구현을 함께 물려받았지만, C#의 다중 인터페이스 구현은 인터페이스가 필드를 가질 수 없으므로 메서드 시그니처(계약)만 여러 개 물려받는다는 점이 확인됨 — 실질적으로 더 제한된 형태의 "다중 상속". [S1] + +## 🛠️ 적용 사례 (Applied in summary) +IFirstInterface와 ISecondInterface 두 인터페이스를 DemoClass 하나가 동시에 구현해 두 메서드를 모두 호출하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Implementing two interfaces in one class, comma-separated (C#): +```csharp +interface IFirstInterface { void myMethod(); } +interface ISecondInterface { void myOtherMethod(); } + +class DemoClass : IFirstInterface, ISecondInterface +{ + public void myMethod() { Console.WriteLine("Some text.."); } + public void myOtherMethod() { Console.WriteLine("Some other text..."); } +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Interface]], [[CSharp Enums]], [[CPP Inheritance Multiple]] +- **참조 맥락:** Interface 섹션의 마지막 챕터 — Enums 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Multiple Interfaces — https://www.w3schools.com/cs/cs_interface_multi.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Multiple Interfaces" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Intro.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Intro.md new file mode 100644 index 00000000..0bc7d0e7 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Intro.md @@ -0,0 +1,63 @@ +--- +id: csharp-intro +title: "C# Introduction" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["What is C#", "C-Sharp", "C# 소개"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.87 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "intro"] +raw_sources: ["https://www.w3schools.com/cs/cs_intro.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Intro]] + +## 🎯 한 줄 통찰 (One-line insight) +C# is explicitly introduced as sitting in the SAME "C family" lineage as the two languages this wiki just finished (C, C++) plus Java, but with a decisive fork: it's not an independent open standard like C/C++, it's a Microsoft-owned language tied to the .NET Framework — meaning the "which compiler/runtime do I use" question that barely mattered for C/C++ (any standards-compliant compiler works) becomes central for C# (tooling is Microsoft-specific, as the next chapter's Visual-Studio-only "Get Started" flow will confirm). [S1] + +## 🧠 핵심 개념 (Core concepts) +- **C# ("C-Sharp")** — an object-oriented programming language created by Microsoft, runs on the .NET Framework. [S1] +- **Family lineage** — has roots in the C family; syntactically close to C++ and Java (explicitly stated, not implied). [S1] +- **History** — first released in 2002; latest version at time of writing is C# 13 (November 2024). [S1] +- **Use cases** — mobile apps, desktop apps, web apps/services/sites, games, VR, database applications. [S1] +- **Why C#** — popularity, ease of learning, huge community support, object-oriented structure enabling code reuse (lowers development cost), and easy migration to/from C/C++/Java due to syntactic closeness. [S1] + +## 📖 세부 내용 (Details) +- No prior programming experience is assumed for the tutorial. [S1] +- The explicit "close to C, C++, and Java" claim is the tutorial's own framing for why switching between these languages is easy — a claim this wiki can directly test chapter-by-chapter against the already-completed Topic_C/Topic_CPP/Topic_Java. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C/C++는 특정 회사 소유가 아니었지만 C#은 Microsoft 소유**: Topic_C/Topic_CPP는 언어 표준이 특정 기업에 종속되지 않았지만(ISO 표준), C#은 Microsoft가 만들고 .NET Framework 위에서 동작하는 언어라는 점이 이번 챕터에서 확인된 근본적 차이 — 이는 다음 챕터(Get Started)에서 Visual Studio 전용 설치 절차로 구체화됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 모바일/데스크톱/웹 앱, 게임, VR, 데이터베이스 애플리케이션 등 광범위한 사용처가 원문에서 나열됨. [S1] + +## 💻 코드 패턴 (Code patterns) +없음 — 이 챕터는 코드 예제가 없는 개념 소개 챕터. + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.87 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Get Started]], [[CPP Intro]], [[Java Intro]] +- **참조 맥락:** C# 튜토리얼의 첫 챕터 — Get Started로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Introduction — https://www.w3schools.com/cs/cs_intro.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Introduction" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Math.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Math.md new file mode 100644 index 00000000..14402e09 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Math.md @@ -0,0 +1,74 @@ +--- +id: csharp-math +title: "C# Math" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["Math.Max Math.Min Math.Sqrt", "C# 수학"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.82 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "math"] +raw_sources: ["https://www.w3schools.com/cs/cs_math.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Math]] + +## 🎯 한 줄 통찰 (One-line insight) +Where C provides math functions as free-standing functions from `` (`sqrt()`, `fabs()`) and C++ inherits that same free-function model (optionally namespaced as `std::sqrt`), C# packages every math operation as a STATIC METHOD of a `Math` CLASS (`Math.Sqrt()`, `Math.Max()`) — a direct, small-scale demonstration of the Syntax chapter's earlier rule that everything in C# must live inside a class, extended here to even the standard library's most basic utility functions. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`Math.Max(x, y)`** — returns the higher of two values. [S1] +- **`Math.Min(x, y)`** — returns the lower of two values. [S1] +- **`Math.Sqrt(x)`** — returns the square root of `x`. [S1] +- **`Math.Abs(x)`** — returns the absolute (positive) value of `x`. [S1] +- **`Math.Round()`** — rounds a number to the nearest whole number. [S1] +- All are static methods called through the `Math` class name — no instance of `Math` is ever created. [S1] + +## 📖 세부 내용 (Details) +- `Math.Max(5, 10);` → 10. [S1] +- `Math.Min(5, 10);` → 5. [S1] +- `Math.Sqrt(64);` → 8. [S1] +- `Math.Abs(-4.7);` → 4.7. [S1] +- `Math.Round(9.99);` → 10. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **자유 함수(free function)가 아니라 클래스 정적 메서드로 제공됨**: C는 ``의 `sqrt()`/`fabs()`를 자유 함수로 호출했고 C++도 이 모델을 그대로 계승했지만, C#은 이를 모두 `Math` 클래스의 정적 메서드(`Math.Sqrt()`, `Math.Abs()`)로 감쌌다는 점이 확인됨 — Syntax 챕터에서 확립된 "모든 코드는 클래스 안에" 원칙이 표준 라이브러리 함수에도 그대로 적용된 사례. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — Max/Min/Sqrt/Abs/Round 각각의 최소 호출 예제가 원문에서 개별적으로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Math operations as static methods of the Math class (C#): +```csharp +Math.Max(5, 10); // 10 +Math.Min(5, 10); // 5 +Math.Sqrt(64); // 8 +Math.Abs(-4.7); // 4.7 +Math.Round(9.99); // 10 +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.82 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Operators]], [[CSharp Strings]], [[CPP Math]], [[C Math Random]] +- **참조 맥락:** Math 섹션의 유일 챕터 — Strings 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Math — https://www.w3schools.com/cs/cs_math.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Math" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Method_Overloading.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Method_Overloading.md new file mode 100644 index 00000000..67826f96 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Method_Overloading.md @@ -0,0 +1,78 @@ +--- +id: csharp-method-overloading +title: "C# Method Overloading" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["overload same name different parameters", "C# 메서드 오버로딩"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "methods", "overloading"] +raw_sources: ["https://www.w3schools.com/cs/cs_method_overloading.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Method Overloading]] + +## 🎯 한 줄 통찰 (One-line insight) +Method overloading in C# (`PlusMethod(int, int)` and `PlusMethod(double, double)` sharing one name) is conceptually and syntactically identical to C++'s function overloading already covered in Topic_CPP — same rule ("as long as the number and/or type of parameters are different"), same motivating example structure (separately-named `PlusMethodInt`/`PlusMethodDouble` refactored into one overloaded `PlusMethod`) — reconfirming that C#'s object-oriented mechanics inherited directly from C++ rather than diverging, unlike the parameter-passing extensions (named arguments) covered in the immediately preceding chapter. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Method overloading** — multiple methods sharing the SAME name but differing in number and/or type of parameters. [S1] +- **Compiler resolves by signature** — the compiler picks the correct overload based on the argument types/count supplied at the call site. [S1] +- **Motivation** — avoids needing distinctly-named methods (`PlusMethodInt`, `PlusMethodDouble`) for functionally identical operations across different types. [S1] + +## 📖 세부 내용 (Details) +- Before overloading (distinct names): `static int PlusMethodInt(int x, int y) { return x + y; } static double PlusMethodDouble(double x, double y) { return x + y; }`. [S1] +- After overloading (shared name): `static int PlusMethod(int x, int y) { return x + y; } static double PlusMethod(double x, double y) { return x + y; }` — called as `PlusMethod(8, 5)` (resolves to int version) and `PlusMethod(4.3, 6.26)` (resolves to double version). [S1] +- General signature examples cited: `int MyMethod(int x)`, `float MyMethod(float x)`, `double MyMethod(double x, double y)` — all valid overloads of `MyMethod`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C++의 함수 오버로딩과 개념·문법이 동일**: 매개변수 개수/타입만 다르면 같은 이름을 여러 메서드가 공유할 수 있다는 규칙과 예제 구성 방식이 Topic_CPP의 Function Overloading 챕터와 차이가 없다는 점이 확인됨 — 이전 챕터(Named Arguments)의 C/C++ 대비 확장과는 달리, 오버로딩은 C++에서 그대로 계승된 메커니즘. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +서로 다른 이름의 두 메서드(PlusMethodInt/PlusMethodDouble)를 하나의 오버로드된 PlusMethod로 리팩터링하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Overloading the same method name for different parameter types (C#): +```csharp +static int PlusMethod(int x, int y) +{ + return x + y; +} +static double PlusMethod(double x, double y) +{ + return x + y; +} + +static void Main(string[] args) +{ + int myNum1 = PlusMethod(8, 5); // resolves to int version + double myNum2 = PlusMethod(4.3, 6.26); // resolves to double version +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Method Parameters Named Args]], [[CSharp Method Parameters Return]], [[CPP Function Overloading]] +- **참조 맥락:** Methods 섹션의 마지막 챕터 — Return Values 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Method Overloading — https://www.w3schools.com/cs/cs_method_overloading.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Method Overloading" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Method_Parameters.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Method_Parameters.md new file mode 100644 index 00000000..2679af4a --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Method_Parameters.md @@ -0,0 +1,74 @@ +--- +id: csharp-method-parameters +title: "C# Method Parameters" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["parameters vs arguments C#", "C# 메서드 매개변수"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "methods", "parameters"] +raw_sources: ["https://www.w3schools.com/cs/cs_method_parameters.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Method Parameters]] + +## 🎯 한 줄 통찰 (One-line insight) +The parameter/argument distinction and the positional-matching rule ("the method call must have the same number of arguments as there are parameters, and the arguments must be passed in the same order") are unchanged from C/C++ — this chapter introduces no new C#-specific behavior, serving instead as the terminology foundation the next four chapters (Default Values, Named Arguments, Overloading, Return Values) will each independently break or extend. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Parameter** — a variable listed in the method's definition, inside the parentheses. [S1] +- **Argument** — the actual value passed to a parameter when the method is CALLED. [S1] +- **Multiple parameters** — separated by commas in both the definition and the call. [S1] +- **Positional matching (default rule)** — argument count and order must match the parameter list exactly, unless named arguments (a later chapter) are used instead. [S1] + +## 📖 세부 내용 (Details) +- Single parameter: `static void MyMethod(string fname) { Console.WriteLine(fname + " Refsnes"); } ... MyMethod("Liam"); MyMethod("Jenny"); MyMethod("Anja");` → `"Liam Refsnes"`, `"Jenny Refsnes"`, `"Anja Refsnes"`. [S1] +- Multiple parameters: `static void MyMethod(string fname, int age) { Console.WriteLine(fname + " is " + age); } ... MyMethod("Liam", 5);` → `"Liam is 5"`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **매개변수/인자 구분과 위치 일치 규칙이 C/C++와 동일**: 매개변수(parameter)와 인자(argument)의 구분, 그리고 호출 시 인자 개수·순서가 매개변수와 정확히 일치해야 한다는 규칙이 C/C++와 차이가 없다는 점이 확인됨 — 이후 챕터들(기본값, 이름 있는 인자, 오버로딩, 반환값)이 이 기본 규칙을 각각 다르게 확장/완화함. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +이름(fname) 하나만 받는 메서드와, 이름+나이(age) 두 개를 받는 메서드를 각각 여러 인자로 반복 호출하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Multiple parameters — count and order must match the call (C#): +```csharp +static void MyMethod(string fname, int age) +{ + Console.WriteLine(fname + " is " + age); +} + +static void Main(string[] args) +{ + MyMethod("Liam", 5); + MyMethod("Jenny", 8); +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Methods]], [[CSharp Method Parameters Default]], [[CPP Function Param]] +- **참조 맥락:** Methods 섹션 — Default Parameter Value 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Method Parameters — https://www.w3schools.com/cs/cs_method_parameters.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Method Parameters" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Method_Parameters_Default.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Method_Parameters_Default.md new file mode 100644 index 00000000..5df9dcb9 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Method_Parameters_Default.md @@ -0,0 +1,74 @@ +--- +id: csharp-method-parameters-default +title: "C# Default Parameter Value" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["optional parameter C#", "default value = C#", "C# 기본 매개변수 값"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "methods", "default-parameters"] +raw_sources: ["https://www.w3schools.com/cs/cs_method_parameters_default.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Default Parameter Value]] + +## 🎯 한 줄 통찰 (One-line insight) +The `=` default-value syntax (`string country = "Norway"`) is identical to C++'s default parameter syntax already covered in Topic_CPP — the strict positional-matching rule from the previous chapter ("same number of arguments as parameters") gets its FIRST exception here: calling `MyMethod()` with zero arguments is now valid specifically because the parameter itself supplies a fallback, making "optional parameter" and "default parameter value" two names for the exact same mechanism. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Default parameter value** — assigned with `=` in the method signature: `static void MyMethod(string country = "Norway")`. [S1] +- **"Optional parameter"** — the tutorial's alternate name for a parameter with a default value; calling the method WITHOUT that argument is now valid (breaking the prior chapter's strict count-matching rule). [S1] +- **Overriding the default** — passing an explicit argument still overrides the default value normally. [S1] + +## 📖 세부 내용 (Details) +- `static void MyMethod(string country = "Norway") { Console.WriteLine(country); } ... MyMethod("Sweden"); MyMethod("India"); MyMethod(); MyMethod("USA");` → outputs `Sweden`, `India`, `Norway` (default used when no argument given), `USA`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **인자 개수 일치 규칙의 첫 예외**: Method Parameters 챕터에서 확립된 "인자 개수가 매개변수 개수와 정확히 일치해야 한다"는 규칙이, 기본값이 있는 매개변수에 한해 예외적으로 완화된다는 점이 확인됨 — `MyMethod();`처럼 인자 없이 호출해도 유효함. [S1] +- **C++의 기본 매개변수 문법과 동일**: `=` 기호로 기본값을 지정하는 문법이 Topic_CPP의 Default Parameters 챕터와 차이가 없다는 점이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +country 매개변수에 기본값 "Norway"를 지정한 뒤, 인자를 주거나 주지 않고 네 번 호출하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Default parameter value — makes the argument optional (C#): +```csharp +static void MyMethod(string country = "Norway") +{ + Console.WriteLine(country); +} + +static void Main(string[] args) +{ + MyMethod("Sweden"); // Sweden + MyMethod(); // Norway (default used) + MyMethod("USA"); // USA +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Method Parameters]], [[CSharp Method Parameters Named Args]], [[CPP Function Default]] +- **참조 맥락:** Methods 섹션 — Named Arguments 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Default Parameter Value — https://www.w3schools.com/cs/cs_method_parameters_default.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Default Parameter Value" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Method_Parameters_Named_Args.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Method_Parameters_Named_Args.md new file mode 100644 index 00000000..142801c7 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Method_Parameters_Named_Args.md @@ -0,0 +1,72 @@ +--- +id: csharp-method-parameters-named-args +title: "C# Named Arguments" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["key: value arguments C#", "C# 이름 있는 인자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "methods", "named-arguments"] +raw_sources: ["https://www.w3schools.com/cs/cs_method_parameters_named_args.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Named Arguments]] + +## 🎯 한 줄 통찰 (One-line insight) +Named arguments (`MyMethod(child3: "John", child1: "Liam", child2: "Liam")`) break the SECOND half of Method Parameters' positional-matching rule entirely — order no longer matters as long as each argument is labeled with its parameter name via `key: value` syntax — and this is a genuinely NEW capability with no equivalent shown in this wiki's C or C++ chapters (C++ has no built-in named-argument syntax; arguments there are strictly positional, defaults aside), making this the clearest example so far of C# extending beyond, not just matching, the C-family function-call model. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Named argument syntax** — `parameterName: value`, passed in the method call regardless of the parameter's declared position. [S1] +- **Order independence** — since each argument is explicitly labeled, the CALLER's argument order no longer needs to match the method's DEFINITION order. [S1] +- **No equivalent in C/C++** — this wiki's C and C++ chapters never introduced a comparable mechanism; all their parameter-passing was strictly positional (with default values as the only relaxation). [S1] + +## 📖 세부 내용 (Details) +- Example: `static void MyMethod(string child1, string child2, string child3) { Console.WriteLine("The youngest child is: " + child3); } ... MyMethod(child3: "John", child1: "Liam", child2: "Liam");` → despite `child3` being named FIRST in the call (out of definition order), it correctly binds to the `child3` parameter, printing `"The youngest child is: John"`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C/C++에 존재하지 않는 완전히 새로운 기능**: Method Parameters 챕터에서 확립된 "인자는 매개변수와 같은 순서로 전달돼야 한다"는 규칙이 이름 있는 인자(named argument)를 쓰면 완전히 무력화된다는 점이 확인됨 — C/C++는 이런 key:value 인자 전달 문법 자체가 없어 항상 위치 기반으로만 인자를 전달해야 했음. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +세 자녀 이름을 매개변수 정의 순서와 다르게(child3 먼저) key:value 형태로 전달해도 올바르게 바인딩되는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Named arguments — call order can differ from definition order (C#): +```csharp +static void MyMethod(string child1, string child2, string child3) +{ + Console.WriteLine("The youngest child is: " + child3); +} + +static void Main(string[] args) +{ + MyMethod(child3: "John", child1: "Liam", child2: "Liam"); + // Outputs "The youngest child is: John" -- order doesn't matter +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Method Parameters Default]], [[CSharp Method Overloading]], [[CPP Function Overloading]] +- **참조 맥락:** Methods 섹션 — Method Overloading 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Named Arguments — https://www.w3schools.com/cs/cs_method_parameters_named_args.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Named Arguments" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Method_Parameters_Return.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Method_Parameters_Return.md new file mode 100644 index 00000000..30316231 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Method_Parameters_Return.md @@ -0,0 +1,77 @@ +--- +id: csharp-method-parameters-return +title: "C# Return Values" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["return keyword C#", "C# 반환값"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "methods", "return"] +raw_sources: ["https://www.w3schools.com/cs/cs_method_parameters_return.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Method Parameters Return]] + +## 🎯 한 줄 통찰 (One-line insight) +This chapter closes the loop on `void` — first mentioned back in the Methods chapter as "no return value, details later" — by showing that swapping `void` for a concrete type (`int`) plus adding a `return` statement is the entire mechanism, identical to C/C++'s return-value model; the tutorial also states an explicit style preference (store the result in a variable rather than nesting the call directly inside `Console.WriteLine()`) purely for readability/maintainability, not because of any functional difference between the two forms. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Return type replaces `void`** — using `int` (or another primitive type) instead of `void` in the method signature signals the method WILL return a value of that type. [S1] +- **`return` keyword** — ends the method and sends a value back to the caller. [S1] +- **Return value as a direct expression argument** — `Console.WriteLine(MyMethod(3));` calls and prints in one line. [S1] +- **Storing in a variable (recommended style)** — `int z = MyMethod(5, 3); Console.WriteLine(z);` — functionally identical, but preferred for readability and maintainability. [S1] + +## 📖 세부 내용 (Details) +- Single parameter with return: `static int MyMethod(int x) { return 5 + x; } ... Console.WriteLine(MyMethod(3));` → `8`. [S1] +- Two parameters with return: `static int MyMethod(int x, int y) { return x + y; } ... Console.WriteLine(MyMethod(5, 3));` → `8`. [S1] +- Stored-variable style: `int z = MyMethod(5, 3); Console.WriteLine(z);` → `8`, same result, explicitly called out as the recommended approach. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **void→구체 타입 전환이 C/C++의 반환값 모델과 동일**: `void`를 `int` 등으로 바꾸고 `return`을 추가하는 것만으로 반환값이 생긴다는 메커니즘이 C/C++와 차이가 없다는 점이 확인됨 — Methods 챕터에서 미뤄뒀던 void의 의미가 이번 챕터에서 완전히 설명됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +반환값을 바로 Console.WriteLine()에 중첩해 출력하는 방식과, 변수에 먼저 저장한 뒤 출력하는 방식 두 가지를 비교하며 후자를 권장하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Return value used directly vs. stored in a variable first (recommended) (C#): +```csharp +static int MyMethod(int x, int y) +{ + return x + y; +} + +static void Main(string[] args) +{ + Console.WriteLine(MyMethod(5, 3)); // direct -- works, but less readable + + int z = MyMethod(5, 3); // recommended -- easier to read/maintain + Console.WriteLine(z); +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Method Overloading]], [[CSharp Methods]], [[CSharp OOP]], [[CPP Function Return]] +- **참조 맥락:** Methods 섹션의 마지막 챕터 — OOP Basics 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Return Values — https://www.w3schools.com/cs/cs_method_parameters_return.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Return Values" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Methods.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Methods.md new file mode 100644 index 00000000..0e92e818 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Methods.md @@ -0,0 +1,79 @@ +--- +id: csharp-methods +title: "C# Methods" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["static void method C#", "PascalCase methods", "C# 메서드"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "methods"] +raw_sources: ["https://www.w3schools.com/cs/cs_methods.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Methods]] + +## 🎯 한 줄 통찰 (One-line insight) +C# calls these "methods" and only parenthetically notes "also known as functions" — a terminology choice with real teeth, since the Syntax chapter's rule that ALL code must live inside a class means C# genuinely has no free-standing functions the way C++ does; every "function" is necessarily a method of SOME class (even `Main()` itself lives inside `class Program`), and the naming-convention split flagged back in the Identifiers chapter (variables lowercase-first) is completed here: methods are explicitly recommended to start UPPERCASE (`MyMethod`), giving C# a hard camelCase-vs-PascalCase split by identifier KIND that neither C nor C++ enforces as a style convention. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Method** — a block of code that only runs when called; used to perform actions and enable code reuse (define once, use many times). [S1] +- **`static void MethodName() { ... }`** — the minimal method skeleton, defined inside a class. [S1] +- **`static`** — means the method belongs to the CLASS itself, not to an object/instance of the class (object-based method access deferred to a later chapter). [S1] +- **`void`** — means the method has no return value (deferred detail to the Return Values chapter). [S1] +- **PascalCase convention** — method names should start with an UPPERCASE letter for readability, in contrast to the lowercase-starting convention recommended for variable names. [S1] +- **Calling a method** — `MethodName();` — same method can be called any number of times, each call re-executing the body independently. [S1] + +## 📖 세부 내용 (Details) +- Method definition: `class Program { static void MyMethod() { // code to be executed } }`. [S1] +- Single call: `static void Main(string[] args) { MyMethod(); }` → outputs `"I just got executed!"`. [S1] +- Repeated calls: calling `MyMethod();` three times in `Main()` prints the same message three times. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C++와 달리 클래스 밖의 자유 함수가 존재하지 않음**: Syntax 챕터에서 확인된 "모든 코드는 class 안에" 원칙 때문에, C#은 C++처럼 클래스 밖에 독립적으로 존재하는 자유 함수를 가질 수 없고 모든 함수가 반드시 어떤 class의 메서드라는 점이 확인됨 — Main() 자체도 Program 클래스 안에 있음. [S1] +- **변수는 소문자, 메서드는 대문자로 시작하는 명명 규칙 분리가 완성됨**: Identifiers 챕터에서 예고했던 변수 lowercase 시작 관례에 이어, 이번 챕터는 메서드명을 uppercase로 시작하도록 명시적으로 권장한다는 점이 확인됨 — 식별자 종류(변수 vs 메서드)에 따라 대소문자 관례가 갈라지는 C#만의 스타일 규칙. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — "I just got executed!"를 출력하는 메서드를 정의하고 여러 번 호출하는 예제가 원문에서 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Minimal method definition and repeated calls (C#): +```csharp +static void MyMethod() +{ + Console.WriteLine("I just got executed!"); +} + +static void Main(string[] args) +{ + MyMethod(); + MyMethod(); + MyMethod(); +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Arrays Multi]], [[CSharp Method Parameters]], [[CSharp Variables Identifiers]], [[CPP Functions]] +- **참조 맥락:** Methods 섹션 — Method Parameters 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Methods — https://www.w3schools.com/cs/cs_methods.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Methods" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_OOP.md b/10_Wiki/Dev/Topic_CSharp/CSharp_OOP.md new file mode 100644 index 00000000..ccc7c448 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_OOP.md @@ -0,0 +1,63 @@ +--- +id: csharp-oop +title: "C# - What is OOP?" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["object-oriented programming C#", "DRY principle", "C# OOP 소개"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "oop"] +raw_sources: ["https://www.w3schools.com/cs/cs_oop.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp OOP]] + +## 🎯 한 줄 통찰 (One-line insight) +Unlike Topic_C, which never had an OOP chapter at all (procedural only), and Topic_CPP, where OOP was introduced as an OPTIONAL paradigm layered on top of C-style procedural code, this C# chapter frames OOP as the language's core identity from the very first sentence — reinforcing what the Syntax chapter already forced structurally (every line of code must be inside a class): in C#, object-oriented isn't an available style choice the way it was for C++, it's the only way the language works. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Procedural vs. object-oriented** — procedural programming writes procedures/methods that operate on data; OOP creates objects that bundle BOTH data and methods together. [S1] +- **Claimed OOP advantages** — faster/easier to execute, clearer program structure, supports the DRY principle (Don't Repeat Yourself), enables reusable applications with less code and shorter development time. [S1] +- **DRY principle** — extract code common to the application into a single place and reuse it, instead of repeating it. [S1] +- **Class** — a template/blueprint for creating objects. [S1] +- **Object** — an instance of a class; created objects inherit all variables and methods from their class. [S1] +- **Class-vs-object illustration** — `Fruit` (class) → `Apple`, `Banana`, `Mango` (objects); `Car` (class) → `Volvo`, `Audi`, `Toyota` (objects). [S1] + +## 📖 세부 내용 (Details) +- No code examples in this chapter — purely conceptual, deferring class/object syntax to the next chapter. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **OOP가 선택이 아니라 언어의 본질로 제시됨**: Topic_C에는 OOP 챕터 자체가 없었고(순수 절차적 언어), Topic_CPP는 OOP를 C 스타일 절차적 코드 위에 선택적으로 얹는 패러다임으로 소개했지만, C#은 Syntax 챕터에서 이미 확인된 "모든 코드는 class 안에" 구조적 강제를 그대로 반영해 OOP를 언어의 유일한 작동 방식으로 첫 문장부터 제시한다는 점이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — Fruit/Car를 class로, 그 인스턴스들을 object로 비유하는 개념 설명이 원문에서 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +없음 — 이 챕터는 코드 예제가 없는 개념 소개 챕터. + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Method Parameters Return]], [[CSharp Classes]], [[CPP OOP]] +- **참조 맥락:** OOP Basics 섹션 — Classes and Objects 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# - What is OOP? — https://www.w3schools.com/cs/cs_oop.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# - What is OOP?" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Operators.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Operators.md new file mode 100644 index 00000000..a7413319 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Operators.md @@ -0,0 +1,70 @@ +--- +id: csharp-operators +title: "C# Operators" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["arithmetic operators C#", "C# 연산자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "operators", "arithmetic"] +raw_sources: ["https://www.w3schools.com/cs/cs_operators.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Operators]] + +## 🎯 한 줄 통찰 (One-line insight) +The seven arithmetic operators (`+ - * / % ++ --`) and their exact symbols/semantics are unchanged across C, C++, and now C# — this chapter is the second (after Comments) where "how is C# different" has no answer at all, reinforcing that C#'s syntactic closeness to the C family is strongest at the expression-operator level and only diverges once whole-program structure (mandatory classes) or memory model (managed runtime) enters the picture. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`+`** — addition; also usable to chain sums across variables (`sum2 = sum1 + 250;`). [S1] +- **`-`** — subtraction. [S1] +- **`*`** — multiplication. [S1] +- **`/`** — division. [S1] +- **`%`** — modulus (division remainder). [S1] +- **`++`** — increment, increases a variable's value by 1. [S1] +- **`--`** — decrement, decreases a variable's value by 1. [S1] + +## 📖 세부 내용 (Details) +- Direct literal addition: `int x = 100 + 50;`. [S1] +- Chained variable addition: `int sum1 = 100 + 50; int sum2 = sum1 + 250; int sum3 = sum2 + sum2;` → 150, 400, 800. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C/C++와 완전히 동일한 산술 연산자 집합**: `+ - * / % ++ --` 7개 연산자의 기호와 의미가 C/C++와 전혀 차이가 없다는 점이 이번 챕터에서 확인됨 — Comments 챕터에 이은 두 번째 "완전 동일" 사례. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 여러 변수를 연쇄적으로 더해 누적 합을 만드는 예제가 원문에서 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Chained arithmetic across variables (C#): +```csharp +int sum1 = 100 + 50; // 150 +int sum2 = sum1 + 250; // 400 +int sum3 = sum2 + sum2; // 800 +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Operators Assignment]], [[CPP Operators Arithmetic]], [[C Operators]] +- **참조 맥락:** Operators 섹션 — Assignment Operators 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Operators — https://www.w3schools.com/cs/cs_operators.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Operators" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Operators_Assignment.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Operators_Assignment.md new file mode 100644 index 00000000..10754b33 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Operators_Assignment.md @@ -0,0 +1,68 @@ +--- +id: csharp-operators-assignment +title: "C# Assignment Operators" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["+= -= *= C#", "compound assignment C#", "C# 대입 연산자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "operators", "assignment"] +raw_sources: ["https://www.w3schools.com/cs/cs_operators_assignment.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Assignment Operators]] + +## 🎯 한 줄 통찰 (One-line insight) +All 11 compound assignment operators listed here — including the bitwise ones (`&= |= ^= >>= <<=`) — are identical in symbol and "same as" expansion to C/C++'s set, confirming that C#'s bitwise operator support (and its assignment-operator shorthand) was inherited wholesale rather than redesigned, despite C# otherwise being a managed, higher-level language than C/C++. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`=`** — basic assignment. [S1] +- **`+= -= *= /= %=`** — arithmetic compound assignment; each `x op= y` expands to `x = x op y`. [S1] +- **`&= |= ^=`** — bitwise AND/OR/XOR compound assignment. [S1] +- **`>>= <<=`** — bitwise right-shift/left-shift compound assignment. [S1] +- Every compound operator is pure shorthand — no operator introduces new semantics beyond "apply the operation, then reassign." [S1] + +## 📖 세부 내용 (Details) +- Basic assignment: `int x = 10;`. [S1] +- Addition assignment: `int x = 10; x += 5;` → `x` becomes 15. [S1] +- Full expansion table: `x = 5` → `x = 5`; `x += 3` → `x = x + 3`; `x -= 3` → `x = x - 3`; `x *= 3` → `x = x * 3`; `x /= 3` → `x = x / 3`; `x %= 3` → `x = x % 3`; `x &= 3` → `x = x & 3`; `x |= 3` → `x = x | 3`; `x ^= 3` → `x = x ^ 3`; `x >>= 3` → `x = x >> 3`; `x <<= 3` → `x = x << 3`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **비트 연산 대입 연산자까지 C/C++와 동일**: `&= |= ^= >>= <<=`를 포함한 11개 대입 연산자 전체가 C/C++의 집합과 기호·확장 규칙이 동일하다는 점이 확인됨 — C#이 매니지드 런타임 위에서 동작하는 상위 언어임에도 비트 연산 지원을 그대로 계승했음을 보여줌. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — `x += 5;` 하나의 덧셈 대입 예제가 원문에서 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Compound assignment shorthand — identical to C/C++ (C#): +```csharp +int x = 10; +x += 5; // same as x = x + 5; -> x is now 15 +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Operators]], [[CSharp Operators Comparison]], [[CPP Operators Assignment]] +- **참조 맥락:** Operators 섹션 — Comparison Operators 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Assignment Operators — https://www.w3schools.com/cs/cs_operators_assignment.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Assignment Operators" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Operators_Comparison.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Operators_Comparison.md new file mode 100644 index 00000000..a6d2ac41 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Operators_Comparison.md @@ -0,0 +1,68 @@ +--- +id: csharp-operators-comparison +title: "C# Comparison Operators" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["== != > < C#", "C# 비교 연산자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "operators", "comparison"] +raw_sources: ["https://www.w3schools.com/cs/cs_operators_comparison.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Comparison Operators]] + +## 🎯 한 줄 통찰 (One-line insight) +C#'s comparison operators return a genuine `bool` value (`True`/`False`), not C's convention of `1`/`0` integers standing in for truth — this is a direct, visible consequence of the Data Types chapter's earlier finding that `bool` is a real first-class type in C# (unlike classic C, where comparisons are just `int` expressions), so `Console.WriteLine(x > y);` prints the WORD "True", something a raw C comparison expression could never do without an explicit `? "true" : "false"` ternary. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`==`** — equal to. [S1] +- **`!=`** — not equal. [S1] +- **`>` / `<`** — greater than / less than. [S1] +- **`>=` / `<=`** — greater than or equal to / less than or equal to. [S1] +- **Return type is `bool`** — every comparison evaluates to a true `bool` value (`True` or `False`), not an integer. [S1] +- **Purpose** — enables decision-making in code; foundational for the upcoming Conditions (if/else) chapters. [S1] + +## 📖 세부 내용 (Details) +- Direct example: `int x = 5; int y = 3; Console.WriteLine(x > y); // returns True because 5 is greater than 3`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **비교 결과가 진짜 bool 값으로 출력됨**: C의 비교식은 사실 int(1 또는 0)를 반환하므로 `printf`로 직접 출력하면 1/0이 찍히지만, C#은 bool이 실질적인 타입이라 `Console.WriteLine(x > y);`가 "True"라는 단어 자체를 출력한다는 점이 확인됨 — Data Types 챕터에서 확인된 bool의 1급 타입 지위가 여기서 실제로 드러남. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — x > y 비교 결과를 직접 출력하는 예제가 원문에서 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Comparison operators return real bool values, printed as "True"/"False" (C#): +```csharp +int x = 5; +int y = 3; +Console.WriteLine(x > y); // "True" +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Operators Assignment]], [[CSharp Operators Logical]], [[CSharp Data Types]] +- **참조 맥락:** Operators 섹션의 마지막 챕터 — Math 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Comparison Operators — https://www.w3schools.com/cs/cs_operators_comparison.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Comparison Operators" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Operators_Logical.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Operators_Logical.md new file mode 100644 index 00000000..6892630a --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Operators_Logical.md @@ -0,0 +1,69 @@ +--- +id: csharp-operators-logical +title: "C# Logical Operators" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["&& || ! C#", "C# 논리 연산자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.82 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "operators", "logical"] +raw_sources: ["https://www.w3schools.com/cs/cs_operators_logical.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Logical Operators]] + +## 🎯 한 줄 통찰 (One-line insight) +The three logical operators (`&&`, `||`, `!`) use the exact same symbols and short-circuit-implying descriptions ("returns True if BOTH statements are true" / "if ONE of the statements is true") as C/C++ — the only genuinely new element in this short chapter is that the operators combine `bool`-typed comparison results (themselves real `True`/`False` values, per the previous chapter) rather than C's 1/0 integer stand-ins, making a chain like `x < 5 && x < 10` operate on two authentic boolean values instead of two truthy integers. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`&&` (logical AND)** — returns `True` only if BOTH operand statements are true. [S1] +- **`||` (logical OR)** — returns `True` if AT LEAST ONE operand statement is true. [S1] +- **`!` (logical NOT)** — reverses the result: returns `False` if the inner expression is true (and vice versa). [S1] +- **Combines with comparison operators** — logical operators are typically used to chain multiple comparison expressions together (e.g. `x < 5 && x < 10`). [S1] +- **Deferred depth** — the tutorial explicitly defers deeper coverage to the upcoming Booleans and If...Else chapters. [S1] + +## 📖 세부 내용 (Details) +- AND example: `x < 5 && x < 10`. [S1] +- OR example: `x < 5 || x < 4`. [S1] +- NOT example: `!(x < 5 && x < 10)`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **연산자 기호와 의미는 C/C++와 동일, 피연산자 타입만 실질적 bool로 확인됨**: `&& || !` 세 연산자의 기호와 논리는 C/C++와 차이가 없지만, Comparison Operators 챕터에서 확인된 것처럼 이 연산자들이 결합하는 대상이 진짜 bool 값이라는 점이 C의 정수 기반 논리 판정과의 실질적 차이로 재확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — AND/OR/NOT 각각의 최소 예제식이 원문에서 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Logical AND/OR/NOT combining bool comparison results (C#): +```csharp +bool r1 = (x < 5 && x < 10); // AND -- both must be true +bool r2 = (x < 5 || x < 4); // OR -- at least one must be true +bool r3 = !(x < 5 && x < 10); // NOT -- reverses the result +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.82 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Operators Comparison]], [[CSharp Booleans]], [[CSharp Conditions]] +- **참조 맥락:** Operators 섹션의 마지막 챕터 — Math 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Logical Operators — https://www.w3schools.com/cs/cs_operators_logical.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Logical Operators" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Output.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Output.md new file mode 100644 index 00000000..d2ab9f77 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Output.md @@ -0,0 +1,70 @@ +--- +id: csharp-output +title: "C# Output" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["Console.WriteLine", "Console.Write", "C# 출력"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "output"] +raw_sources: ["https://www.w3schools.com/cs/cs_output.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Output]] + +## 🎯 한 줄 통찰 (One-line insight) +C# splits what C's single `printf` handled into two separate methods differentiated ONLY by whether a trailing newline is added — `WriteLine()` (adds newline) vs. `Write()` (doesn't) — the same two-method split C++ never needed because `cout <<` never auto-newlines (you always add `"\n"` explicitly), meaning C# occupies a middle ground: less manual than C++'s explicit-newline-every-time model, but still requires picking the right method name up front rather than composing newlines as data. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`Console.WriteLine()`** — outputs text/values AND appends a new line after each call. [S1] +- **`Console.Write()`** — outputs text/values WITHOUT appending a new line; consecutive `Write()` calls print on the same line. [S1] +- **Numeric output & inline math** — `Console.WriteLine(3 + 3);` performs the calculation and prints the result directly, no string conversion needed. [S1] +- **Tutorial convention** — the W3Schools C# series uses `WriteLine()` exclusively going forward, specifically because it makes output easier to read chapter-to-chapter. [S1] +- **Manual spacing with `Write()`** — since `Write()` never inserts anything, an extra trailing space must be added manually inside the string when concatenating consecutive `Write()` outputs for readability. [S1] + +## 📖 세부 내용 (Details) +- Multiple `WriteLine()` calls each produce their own line: `Console.WriteLine("Hello World!"); Console.WriteLine("I am Learning C#"); Console.WriteLine("It is awesome!");`. [S1] +- `Write()` chaining on one line: `Console.Write("Hello World! "); Console.Write("I will print on the same line.");` — note the manual trailing space in the first string. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **줄바꿈 여부로 메서드 자체가 분리됨**: C++의 `cout <<`는 줄바꿈을 절대 자동으로 넣지 않고 항상 `"\n"`을 명시적으로 붙여야 했지만, C#은 아예 WriteLine()/Write() 두 개의 다른 메서드로 나눠 줄바꿈 자동 삽입 여부를 메서드 선택 시점에 결정한다는 점이 확인됨 — C의 printf 하나로 처리하던 것을 두 메서드로 분리한 것. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 여러 줄 출력과 같은 줄 출력을 비교하는 예제가 원문에서 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +WriteLine vs Write — the only difference is the trailing newline (C#): +```csharp +Console.WriteLine("Hello World!"); // newline added automatically +Console.WriteLine(3 + 3); // prints 6 + +Console.Write("Hello World! "); // no newline -- manual space added +Console.Write("I will print on the same line."); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Syntax]], [[CSharp Comments]], [[CPP Output]] +- **참조 맥락:** Basics 섹션 — Comments 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Output — https://www.w3schools.com/cs/cs_output.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Output" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Polymorphism.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Polymorphism.md new file mode 100644 index 00000000..aa2ae402 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Polymorphism.md @@ -0,0 +1,77 @@ +--- +id: csharp-polymorphism +title: "C# Polymorphism" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["virtual override C#", "method overriding C#", "C# 다형성"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "oop", "polymorphism"] +raw_sources: ["https://www.w3schools.com/cs/cs_polymorphism.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Polymorphism]] + +## 🎯 한 줄 통찰 (One-line insight) +C# requires the EXACT same two-keyword pairing already confirmed for modern C++ in Topic_CPP — `virtual` on the base class method, `override` on each derived class's replacement — and this chapter goes further than the CPP chapter did by explicitly demonstrating the FAILURE case first: without `virtual`/`override`, calling `animalSound()` through an `Animal`-typed reference to a `Pig`/`Dog` object prints the BASE class's message every time, because (per the tutorial's own explanation) same-named methods without these keywords simply aren't polymorphic at all — they're just separately-named methods that happen to share an identifier. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Polymorphism ("many forms")** — occurs among classes related by inheritance; lets a single action be performed in different ways depending on the actual object type. [S1] +- **Without `virtual`/`override`** — same-named methods in base and derived classes do NOT achieve polymorphism; calling the method through a base-typed reference always runs the BASE class's version, regardless of the actual object's derived type. [S1] +- **`virtual` keyword** — placed on the BASE class method to allow it to be overridden. [S1] +- **`override` keyword** — placed on each DERIVED class's replacement method, required alongside base `virtual` to achieve true polymorphic dispatch. [S1] +- **Base-typed reference, derived object** — `Animal myPig = new Pig();` — the variable's declared TYPE is the base class, but the actual OBJECT is the derived class; with `virtual`/`override`, the call resolves to the derived class's implementation at runtime. [S1] + +## 📖 세부 내용 (Details) +- Without virtual/override (the "not the output I was looking for" case): base and derived `Animal`/`Pig`/`Dog` each define their own `animalSound()`, but `Animal myPig = new Pig(); myPig.animalSound();` prints `"The animal makes a sound"` for ALL three objects, not the derived versions. [S1] +- With virtual/override: `public virtual void animalSound()` in `Animal`, `public override void animalSound()` in `Pig` and `Dog` → `myAnimal.animalSound()` prints `"The animal makes a sound"`, `myPig.animalSound()` prints `"The pig says: wee wee"`, `myDog.animalSound()` prints `"The dog says: bow wow"` — each resolves to its OWN class's implementation. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **virtual/override 페어링이 C++와 완전히 동일**: 기반 클래스에 virtual, 파생 클래스에 override를 붙여야 다형성이 작동한다는 규칙이 Topic_CPP의 Virtual Functions 챕터(C++11의 override 키워드 포함)와 차이가 없다는 점이 확인됨. [S1] +- **실패 사례를 먼저 보여줌으로써 virtual의 필요성을 명확히 함**: Topic_CPP의 Virtual Functions 챕터와 달리, 이번 챕터는 virtual/override 없이 먼저 실행해 "기대와 다른 출력"이 나오는 것을 보여준 뒤에야 virtual/override를 도입한다는 점이 교육적 구성의 차이로 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +Animal 기반 클래스와 Pig/Dog 파생 클래스가 각각 다른 animalSound()를 구현하고, virtual/override 없이는 모두 기반 클래스 메시지만 출력되다가 virtual/override를 추가하면 각 동물 고유의 소리가 출력되는 before/after 비교가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Without vs. with virtual/override — same call site, different resolved method (C#): +```csharp +// Without virtual/override -- always prints base class message +class Animal { public void animalSound() { Console.WriteLine("The animal makes a sound"); } } +class Pig : Animal { public void animalSound() { Console.WriteLine("The pig says: wee wee"); } } +Animal myPig1 = new Pig(); +myPig1.animalSound(); // "The animal makes a sound" -- NOT polymorphic + +// With virtual/override -- resolves to the actual object's type +class Animal2 { public virtual void animalSound() { Console.WriteLine("The animal makes a sound"); } } +class Pig2 : Animal2 { public override void animalSound() { Console.WriteLine("The pig says: wee wee"); } } +Animal2 myPig2 = new Pig2(); +myPig2.animalSound(); // "The pig says: wee wee" -- polymorphic +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Inheritance]], [[CSharp Abstract]], [[CPP Virtual Functions]], [[CPP Polymorphism]] +- **참조 맥락:** Polymorphism & Abstract 섹션 — Abstraction 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Polymorphism — https://www.w3schools.com/cs/cs_polymorphism.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Polymorphism" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Properties.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Properties.md new file mode 100644 index 00000000..56d7a714 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Properties.md @@ -0,0 +1,85 @@ +--- +id: csharp-properties +title: "C# Properties (Get and Set)" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["get set C#", "automatic properties C#", "encapsulation C#", "C# 프로퍼티"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "oop", "properties", "encapsulation"] +raw_sources: ["https://www.w3schools.com/cs/cs_properties.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Properties]] + +## 🎯 한 줄 통찰 (One-line insight) +This is the chapter where the `.Length`-is-a-property-not-a-method observation from way back in the Strings chapter finally gets explained: a C# property is a LANGUAGE-LEVEL construct combining a private field with `get`/`set` accessor blocks, and — unlike C++, which has no native property syntax and requires programmers to write plain `getName()`/`setName()` METHODS by convention — C# additionally offers "automatic properties" (`public string Name { get; set; }`) that need no backing field written at all, making encapsulation nearly free syntactically where C++ makes it entirely manual boilerplate. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Encapsulation** — hiding sensitive data by declaring fields `private`, then exposing controlled access through `public` get/set methods via properties. [S1] +- **Property** — a hybrid of a variable and a method, containing a `get` accessor and a `set` accessor. [S1] +- **`get` accessor** — returns the value of the associated private field. [S1] +- **`set` accessor** — assigns a value to the associated private field; the special `value` keyword represents whatever value is being assigned to the property. [S1] +- **Naming convention** — the property should share the field's name but start with an UPPERCASE letter (`name` field ↔ `Name` property). [S1] +- **Automatic (shorthand) properties** — `public string Name { get; set; }` — no backing field declared manually; the compiler generates one implicitly, producing identical behavior with less code. [S1] +- **Encapsulation benefits** — better control over class members, ability to make a field effectively read-only (get-only) or write-only (set-only), flexibility to change internals without breaking external code, and increased data security. [S1] + +## 📖 세부 내용 (Details) +- Full manual property: `class Person { private string name; public string Name { get { return name; } set { name = value; } } }`. [S1] +- Usage: `Person myObj = new Person(); myObj.Name = "Liam"; Console.WriteLine(myObj.Name);` → `"Liam"` — accessed via the SAME dot syntax as a plain field, even though a get/set pair runs underneath. [S1] +- Automatic property equivalent: `class Person { public string Name { get; set; } }` — same usage, same output, but no explicit `name` field or accessor bodies written. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **Strings 챕터의 .Length 프로퍼티 미스터리가 여기서 풀림**: Topic_CSharp의 Strings 챕터에서 `.Length`가 괄호 없는 프로퍼티라고 확인했었는데, 이번 챕터가 프로퍼티의 실제 정의(private 필드 + get/set)를 설명함으로써 그 문법적 정체가 명확해짐. [S1] +- **C++에는 없는 언어 차원의 프로퍼티 문법**: C++는 프로퍼티라는 언어 기능이 없어 getName()/setName() 같은 일반 메서드를 관례적으로 작성해야 했지만, C#은 get/set 접근자를 언어 문법으로 제공하며 심지어 자동 프로퍼티(`{ get; set; }`)로 백킹 필드조차 생략할 수 있다는 점이 확인됨 — 캡슐화 구현 비용이 C++보다 훨씬 낮음. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +Person 클래스의 private name 필드를 public Name 프로퍼티(get/set)로 감싸 외부에서 myObj.Name으로 안전하게 읽고 쓰는 예제, 그리고 이를 자동 프로퍼티로 축약한 동일 결과의 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Manual property vs. automatic (shorthand) property — same behavior (C#): +```csharp +// Manual +class Person +{ + private string name; + public string Name + { + get { return name; } + set { name = value; } + } +} + +// Automatic (shorthand) -- no backing field written +class PersonShort +{ + public string Name { get; set; } +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Access Modifiers]], [[CSharp Strings]], [[CSharp Inheritance]], [[CPP Encapsulation]] +- **참조 맥락:** Access Modifiers & Properties 섹션의 마지막 챕터 — Inheritance 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Properties (Get and Set) — https://www.w3schools.com/cs/cs_properties.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Properties (Get and Set)" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Strings.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Strings.md new file mode 100644 index 00000000..2de995ef --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Strings.md @@ -0,0 +1,68 @@ +--- +id: csharp-strings +title: "C# Strings" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: [".Length property", "ToUpper ToLower", "C# 문자열"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "strings"] +raw_sources: ["https://www.w3schools.com/cs/cs_strings.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Strings]] + +## 🎯 한 줄 통찰 (One-line insight) +C# exposes string length as a PROPERTY (`txt.Length`, no parentheses) rather than a METHOD call, which is a subtle but real divergence from both C++'s `std::string::length()` (a method call with parens) and Java's `.length()` (also a method call) — the tutorial's own example (`txt.Length`) reveals that C# treats a string "as an object" but distinguishes properties (state you read) from methods (behavior you invoke, like `.ToUpper()`), a distinction C++/Java collapse into "just call a method for everything." [S1] + +## 🧠 핵심 개념 (Core concepts) +- **String = object with properties and methods** — unlike C's raw char arrays, a C# string is genuinely an object. [S1] +- **`.Length` property** — no parentheses; accessed like a field, not called like a function (`txt.Length`, NOT `txt.Length()`). [S1] +- **`.ToUpper()` / `.ToLower()`** — methods (with parentheses) that return a NEW string converted to upper/lower case, leaving the original unchanged. [S1] + +## 📖 세부 내용 (Details) +- Basic declaration: `string greeting = "Hello";` / multi-word: `string greeting2 = "Nice to meet you!";`. [S1] +- Length: `string txt = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; Console.WriteLine("The length of the txt string is: " + txt.Length);` → 26. [S1] +- Case conversion: `string txt = "Hello World"; Console.WriteLine(txt.ToUpper()); Console.WriteLine(txt.ToLower());`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **Length가 메서드가 아니라 프로퍼티임**: C++의 `std::string::length()`와 Java의 `.length()`는 둘 다 괄호를 붙여 호출하는 메서드였지만, C#의 `.Length`는 괄호 없이 필드처럼 접근하는 프로퍼티라는 점이 확인됨 — C#은 "상태를 읽는 것(프로퍼티)"과 "동작을 호출하는 것(메서드, 예: `.ToUpper()`)"을 문법적으로 구분함. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 문자열 길이 출력과 대소문자 변환 예제가 원문에서 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Property access (no parens) vs. method call (with parens) on a string (C#): +```csharp +string txt = "Hello World"; +Console.WriteLine(txt.Length); // property -- no parentheses -> 11 +Console.WriteLine(txt.ToUpper()); // method -- parentheses -> "HELLO WORLD" +Console.WriteLine(txt.ToLower()); // method -- parentheses -> "hello world" +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Strings Concat]], [[CPP Strings]], [[Java Strings]] +- **참조 맥락:** Strings 섹션 — String Concatenation 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Strings — https://www.w3schools.com/cs/cs_strings.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Strings" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Strings_Access.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Strings_Access.md new file mode 100644 index 00000000..0e8b6f18 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Strings_Access.md @@ -0,0 +1,70 @@ +--- +id: csharp-strings-access +title: "C# Access Strings" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["IndexOf Substring", "string indexing C#", "C# 문자열 접근"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "strings", "indexing"] +raw_sources: ["https://www.w3schools.com/cs/cs_strings_access.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Access Strings]] + +## 🎯 한 줄 통찰 (One-line insight) +`myString[0]` reuses the identical square-bracket index syntax from C's raw char arrays and C++'s `std::string::operator[]`, 0-indexed exactly the same way — but C# then layers `IndexOf()` and `Substring()` on top as a matched PAIR designed to work together (`name.Substring(name.IndexOf("D"))` finds a position, then slices from it), a "search then slice" combo pattern this wiki hasn't seen expressed this explicitly in C/C++ (C++'s `std::string::find()` + `substr()` do the same job but the tutorial there never demonstrated them chained as a single idiom the way this C# chapter does). [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`[]` indexing** — access a single character by index, 0-based: `myString[0]` is the first character. [S1] +- **`.IndexOf(char)`** — returns the index position of the FIRST occurrence of a specified character/substring. [S1] +- **`.Substring(startIndex)`** — extracts and returns a NEW string starting from the given index to the end. [S1] +- **Combined idiom: search-then-slice** — `IndexOf()` locates a position, and that position is fed directly into `Substring()` to extract everything from that point onward (e.g. isolating a last name from a full name). [S1] + +## 📖 세부 내용 (Details) +- Basic indexing: `string myString = "Hello"; Console.WriteLine(myString[0]); // "H"` and `myString[1]; // "e"`. [S1] +- Search: `string myString = "Hello"; Console.WriteLine(myString.IndexOf("e")); // 1`. [S1] +- Combined search+slice: `string name = "John Doe"; int charPos = name.IndexOf("D"); string lastName = name.Substring(charPos); Console.WriteLine(lastName);` → `"Doe"`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **대괄호 인덱싱 문법은 C/C++와 동일**: `myString[0]`이 0부터 시작하는 인덱스로 문자에 접근하는 방식이 C 배열, C++의 `std::string::operator[]`와 차이가 없다는 점이 확인됨. [S1] +- **IndexOf+Substring 조합 관용구가 명시적으로 제시됨**: C++도 `find()`+`substr()`로 동일한 일을 할 수 있었지만, Topic_CPP의 문자열 챕터에서는 두 메서드를 체이닝하는 관용구가 이렇게 명시적으로 다뤄지지 않았다는 점이 이번 챕터에서 새롭게 확인됨 — "찾고 나서 자르기"라는 하나의 패턴으로 제시됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +"John Doe"라는 전체 이름에서 "D"의 위치를 찾아 그 위치부터 Substring()으로 성(lastName)만 추출하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Search-then-slice idiom combining IndexOf() and Substring() (C#): +```csharp +string name = "John Doe"; +int charPos = name.IndexOf("D"); // find position of "D" +string lastName = name.Substring(charPos); // slice from that position -> "Doe" +Console.WriteLine(lastName); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Strings Interpol]], [[CSharp Strings Chars]], [[CPP Strings Access]] +- **참조 맥락:** Strings 섹션 — Special Characters 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Access Strings — https://www.w3schools.com/cs/cs_strings_access.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Access Strings" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Strings_Chars.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Strings_Chars.md new file mode 100644 index 00000000..19be6470 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Strings_Chars.md @@ -0,0 +1,72 @@ +--- +id: csharp-strings-chars +title: "C# Special Characters" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["escape characters C#", "\\n \\t \\\" C#", "C# 특수 문자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "strings", "escape-characters"] +raw_sources: ["https://www.w3schools.com/cs/cs_strings_chars.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Special Characters]] + +## 🎯 한 줄 통찰 (One-line insight) +Every escape sequence in this chapter (`\'`, `\"`, `\\`, `\n`, `\t`, `\b`) is character-for-character identical to C and C++'s escape sequences, making this the third "zero divergence" chapter in the C# series so far (after Comments and Operators) — the pattern across all three is that C#'s LEXICAL-LEVEL syntax (tokens, literals, comments, escapes) stays fully compatible with the C family, while its STRUCTURAL rules (mandatory classes, `.Length` as property not method, `Convert.To*`) are where the real divergence happens. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Why escapes are needed** — a double quote inside a double-quoted string literal breaks parsing; C# needs a way to include one. [S1] +- **`\'`** — inserts a single quote. [S1] +- **`\"`** — inserts a double quote. [S1] +- **`\\`** — inserts a single backslash. [S1] +- **`\n`** — new line. [S1] +- **`\t`** — tab. [S1] +- **`\b`** — backspace. [S1] + +## 📖 세부 내용 (Details) +- Broken (unescaped) example shown deliberately as an error case: `string txt = "We are the so-called "Vikings" from the north.";` — the tutorial shows this fails, then fixes it with `\"`. [S1] +- Fixed: `string txt = "We are the so-called \"Vikings\" from the north.";`. [S1] +- Single quote escape: `string txt = "It\'s alright.";`. [S1] +- Backslash escape: `string txt = "The character \\ is called backslash.";`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **이스케이프 시퀀스가 C/C++와 완전히 동일**: `\' \" \\ \n \t \b` 전부 C/C++와 기호·의미가 동일하다는 점이 확인됨 — Comments, Operators에 이은 세 번째 "완전 동일" 챕터. 이는 C#의 어휘 수준 문법(토큰/리터럴/주석/이스케이프)이 C 계열과 완전히 호환되는 반면, 구조적 규칙(클래스 강제, .Length 프로퍼티, Convert.To* 등)에서만 실질적으로 갈라진다는 패턴을 보여줌. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 큰따옴표/작은따옴표/백슬래시를 이스케이프해 문자열에 포함시키는 예제가 원문에서 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Escape sequences — identical to C/C++ (C#): +```csharp +string txt1 = "We are the so-called \"Vikings\" from the north."; +string txt2 = "It\'s alright."; +string txt3 = "The character \\ is called backslash."; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Strings Access]], [[CSharp Booleans]], [[CPP Strings Esc]] +- **참조 맥락:** Strings 섹션의 마지막 챕터 — Booleans 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Special Characters — https://www.w3schools.com/cs/cs_strings_chars.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Special Characters" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Strings_Concat.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Strings_Concat.md new file mode 100644 index 00000000..9bd50409 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Strings_Concat.md @@ -0,0 +1,70 @@ +--- +id: csharp-strings-concat +title: "C# String Concatenation" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["string.Concat", "+ operator strings C#", "C# 문자열 연결"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "strings", "concatenation"] +raw_sources: ["https://www.w3schools.com/cs/cs_strings_concat.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp String Concatenation]] + +## 🎯 한 줄 통찰 (One-line insight) +This chapter's own explicit "WARNING!" — that `+` means addition for numbers but concatenation for strings — is the exact ambiguity already flagged conceptually in the Display Variables chapter, but now the tutorial adds a SECOND, unambiguous alternative (`string.Concat(firstName, lastName)`) that sidesteps the `+` overload entirely, giving C# two genuinely different concatenation mechanisms (operator overload vs. static method call) where C++ effectively only has the operator-overload route (`std::string::operator+`) and C has neither (manual `strcat`/buffer management). [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`+` for concatenation** — `firstName + lastName` combines two strings; manual spacing must be added inside the literal (`"John "` with a trailing space) since concatenation never auto-inserts spaces. [S1] +- **`string.Concat()`** — a static method alternative that concatenates two strings without relying on operator overloading: `string.Concat(firstName, lastName)`. [S1] +- **`+` ambiguity (explicit warning)** — numbers ADD, strings CONCATENATE, using the identical `+` symbol; the tutorial calls this out with a dedicated "WARNING!" callout box. [S1] +- **Same-symbol, different-type example** — `int z = x + y;` (numeric, x=10 int, y=20 int) → `30`; `string z = x + y;` (x="10" string, y="20" string) → `"1020"`. [S1] + +## 📖 세부 내용 (Details) +- Operator concatenation: `string firstName = "John "; string lastName = "Doe"; string name = firstName + lastName; Console.WriteLine(name);` → `"John Doe"`. [S1] +- Method concatenation: `string name = string.Concat(firstName, lastName);` — same result via a different mechanism. [S1] +- Numeric vs. string `+` side-by-side: `int x = 10; int y = 20; int z = x + y; // 30` versus `string x = "10"; string y = "20"; string z = x + y; // "1020"`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **연결 방식이 두 개로 이중화됨**: C++는 사실상 `std::string`의 `+` 연산자 오버로드 하나에 의존했고 C는 아예 연산자가 없어 `strcat` 등을 수동으로 써야 했지만, C#은 `+` 연산자 오버로드와 `string.Concat()` 정적 메서드라는 두 가지 독립된 문자열 연결 방식을 제공한다는 점이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +동일한 firstName/lastName 두 변수를 `+`와 `string.Concat()` 두 가지 방식으로 각각 연결하는 비교 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Two independent concatenation mechanisms — operator overload vs. static method (C#): +```csharp +string firstName = "John "; +string lastName = "Doe"; + +string name1 = firstName + lastName; // operator overload +string name2 = string.Concat(firstName, lastName); // static method -- same result +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Strings]], [[CSharp Strings Interpol]], [[CSharp Variables Display]] +- **참조 맥락:** Strings 섹션 — String Interpolation 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# String Concatenation — https://www.w3schools.com/cs/cs_strings_concat.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# String Concatenation" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Strings_Interpol.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Strings_Interpol.md new file mode 100644 index 00000000..6f7704f7 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Strings_Interpol.md @@ -0,0 +1,68 @@ +--- +id: csharp-strings-interpol +title: "C# String Interpolation" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["$ string C#", "interpolated strings", "C# 문자열 보간"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "strings", "interpolation"] +raw_sources: ["https://www.w3schools.com/cs/cs_strings_interpol.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp String Interpolation]] + +## 🎯 한 줄 통찰 (One-line insight) +C#'s `$"...{var}..."` interpolated strings (introduced in C# 6) solve the exact same "embed a variable directly in text without manual concatenation" problem that Python's f-strings (`f"...{var}..."`) already solved in this wiki series — same `{}` placeholder mechanism, just a `$` prefix instead of Python's `f` prefix — while C++ still has no first-class equivalent (requiring `std::format` in C++20+ or manual `<<` chaining), making C# the second language in this series (after Python) to bake variable-embedding directly into string literal syntax rather than relying purely on the `+` operator. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`$` prefix** — required to enable string interpolation; without it, `{firstName}` would just be literal text, not a placeholder. [S1] +- **`{variable}` placeholders** — variable names inside curly braces are substituted with their values directly in the string. [S1] +- **No manual spacing needed** — unlike `+` concatenation (which required manually adding a trailing space inside `"John "`), interpolation lets you place spaces naturally between placeholders in the template string. [S1] +- **Introduced in C# 6** — a relatively recent addition to the language, not present from C#'s first version. [S1] + +## 📖 세부 내용 (Details) +- Example: `string firstName = "John"; string lastName = "Doe"; string name = $"My full name is: {firstName} {lastName}"; Console.WriteLine(name);` → `"My full name is: John Doe"`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **Python의 f-string과 동일한 설계 철학**: `$"...{var}..."`의 `{}` 플레이스홀더 치환 방식이 이전에 위키화한 Topic_Python의 f-string(`f"...{var}..."`)과 접두사 문자만 다를 뿐 동일한 메커니즘이라는 점이 확인됨 — C++는 이 시리즈에서 아직 이런 1급 문자열 보간 문법을 갖추지 못했음(C++20의 std::format 이전까지는 없었음). [S1] +- **공백을 수동으로 넣을 필요가 없어짐**: String Concatenation 챕터의 `+` 방식은 `"John "`처럼 문자열 리터럴 안에 공백을 미리 넣어둬야 했지만, 보간 문자열은 템플릿 안에서 자연스럽게 공백을 배치할 수 있다는 점이 개선점으로 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +firstName과 lastName을 `$"My full name is: {firstName} {lastName}"` 형태로 한 줄에 합쳐 출력하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +String interpolation with the `$` prefix — no manual spacing needed (C#): +```csharp +string firstName = "John"; +string lastName = "Doe"; +string name = $"My full name is: {firstName} {lastName}"; +Console.WriteLine(name); // "My full name is: John Doe" +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Strings Concat]], [[CSharp Strings Access]], [[Python F Strings]] +- **참조 맥락:** Strings 섹션 — Access Strings 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# String Interpolation — https://www.w3schools.com/cs/cs_strings_interpol.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# String Interpolation" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Switch.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Switch.md new file mode 100644 index 00000000..e3cfc658 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Switch.md @@ -0,0 +1,78 @@ +--- +id: csharp-switch +title: "C# Switch" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["switch case break default C#", "C# 스위치문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.82 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "switch"] +raw_sources: ["https://www.w3schools.com/cs/cs_switch.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Switch]] + +## 🎯 한 줄 통찰 (One-line insight) +The `switch(expression) { case x: ... break; default: ... break; }` skeleton is structurally identical to C/C++'s switch statement — same `case`/`break`/`default` keywords, same "evaluate once, compare against each case" model — making Switch the fourth chapter in the C# series (after Comments, Operators, Special Characters) where the answer to "what's different from C++" is essentially nothing at the syntax level shown here. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`switch(expression)`** — evaluated exactly ONCE, then compared against each `case` value in order. [S1] +- **`case x:`** — if the switch expression matches `x`, that block's code runs. [S1] +- **`break`** — exits the switch block immediately once a match's code has run, preventing execution from continuing into subsequent cases; described as saving execution time by skipping the rest of the block. [S1] +- **`default:`** — optional; runs when NO case matches the expression. [S1] + +## 📖 세부 내용 (Details) +- Weekday-name example: `switch (day) { case 1: Console.WriteLine("Monday"); break; ... case 7: Console.WriteLine("Sunday"); break; }` with `day = 4` → outputs `"Thursday"`. [S1] +- Default fallback example: `switch (day) { case 6: ...Saturday...; break; case 7: ...Sunday...; break; default: Console.WriteLine("Looking forward to the Weekend."); break; }` with `day = 4` (no matching case) → outputs `"Looking forward to the Weekend."` via `default`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **switch 구조가 C/C++와 동일**: `switch`/`case`/`break`/`default` 키워드와 전체 구조가 C/C++의 switch문과 차이가 없다는 점이 확인됨 — Comments, Operators, Special Characters에 이은 네 번째 "구조 동일" 챕터. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +요일 번호(day)를 받아 요일 이름을 출력하는 switch문과, 매치되는 case가 없을 때 default로 넘어가는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Switch with break and default (C#): +```csharp +int day = 4; +switch (day) +{ + case 1: + Console.WriteLine("Monday"); + break; + case 4: + Console.WriteLine("Thursday"); + break; + default: + Console.WriteLine("Looking forward to the Weekend."); + break; +} +// Outputs "Thursday" +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.82 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Conditions Shorthand]], [[CSharp While Loop]], [[CPP Switch]] +- **참조 맥락:** Switch 섹션의 유일 챕터 — Loops 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Switch — https://www.w3schools.com/cs/cs_switch.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Switch" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Syntax.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Syntax.md new file mode 100644 index 00000000..c95d4edd --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Syntax.md @@ -0,0 +1,80 @@ +--- +id: csharp-syntax +title: "C# Syntax" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["using System", "namespace class Main", "C# 문법"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.86 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "syntax"] +raw_sources: ["https://www.w3schools.com/cs/cs_syntax.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Syntax]] + +## 🎯 한 줄 통찰 (One-line insight) +C# mandates that EVERY line of executable code live inside a `class` — there is no C-style bare top-level `int main()`, no C++-style free function outside any class — which means C#'s minimal program has a mandatory extra nesting layer (`namespace` → `class` → `Main` method) that neither C nor C++ required, and the tutorial explicitly flags one specific Java-vs-C# difference unprompted: unlike Java, the C# filename does NOT have to match the class name (even though convention usually makes them match anyway). [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`using System;`** — imports the System namespace, enabling unqualified use of its classes (e.g. `Console` instead of `System.Console`). [S1] +- **`namespace`** — a container for classes and other namespaces, used to organize code. [S1] +- **`class`** — a container for data and methods; ALL executable C# code must be inside a class, with no exception (unlike C's free-standing `main()` or C++'s optional free functions). [S1] +- **Curly braces `{}`** — mark the beginning/end of every code block (namespace body, class body, method body). [S1] +- **`Main` method** — the entry point; code inside its braces is what actually executes when the program runs. [S1] +- **`Console.WriteLine()`** — a method of the `Console` class (part of the `System` namespace) used to print text; omitting `using System;` requires the fully-qualified `System.Console.WriteLine()` instead. [S1] +- **Semicolons mandatory** — every C# statement ends with `;`. [S1] +- **Case-sensitivity** — `MyClass` and `myclass` are distinct identifiers. [S1] +- **Filename vs. class name** — unlike Java (where the public class name MUST match the filename), C# does not enforce this; matching them is convention only, and the saved file must end in `.cs`. [S1] + +## 📖 세부 내용 (Details) +- Full annotated example, line by line: `using System;` (namespace import) → blank line (ignored whitespace, used for readability) → `namespace HelloWorld` (organizational container) → `{` (block start) → `class Program` (mandatory class wrapper) → `static void Main(string[] args)` (entry point, keywords deferred to later chapters) → `Console.WriteLine("Hello World!");` (the actual output statement). [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **모든 실행 코드가 반드시 class 안에 있어야 함**: C는 최상위 함수(`int main()`)를, C++는 클래스 밖의 자유 함수(free function)도 허용했지만, C#은 실행되는 모든 코드 줄이 반드시 class 내부에 있어야 한다는 제약이 명시적으로 확인됨 — namespace→class→Main이라는 필수 3중 중첩 구조. [S1] +- **파일명과 클래스명 일치가 Java와 달리 강제되지 않음**: 원문이 직접 "Unlike Java, the name of the C# file does not have to match the class name"이라고 명시 — Java는 public 클래스명과 파일명이 반드시 일치해야 하는 반면, C#은 관례일 뿐 강제 규칙이 아님이 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +이전 챕터(Get Started)에서 등장한 동일한 Hello World 보일러플레이트를 한 줄씩 분해 설명하는 것이 이번 챕터의 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Minimal C# program structure — namespace/class/Main nesting is mandatory (C#): +```csharp +using System; +namespace HelloWorld +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Hello World!"); + } + } +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.86 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Get Started]], [[CSharp Output]], [[Java Intro]], [[CPP Namespaces]] +- **참조 맥락:** Basics 섹션 — Output 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Syntax — https://www.w3schools.com/cs/cs_syntax.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Syntax" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Type_Casting.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Type_Casting.md new file mode 100644 index 00000000..f56adab6 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Type_Casting.md @@ -0,0 +1,75 @@ +--- +id: csharp-type-casting +title: "C# Type Casting" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["implicit explicit casting C#", "Convert.ToInt32", "C# 형변환"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "type-casting"] +raw_sources: ["https://www.w3schools.com/cs/cs_type_casting.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Type Casting]] + +## 🎯 한 줄 통찰 (One-line insight) +C#'s explicit-cast syntax `(int) myDouble` is character-for-character identical to C and C++'s C-style cast, but C# adds an entire SECOND casting mechanism the C family never had — the `Convert.ToXxx()` static method family (`Convert.ToInt32`, `Convert.ToString`, `Convert.ToBoolean`, `Convert.ToDouble`) — meaning C# programmers have two genuinely different ways to convert types (parenthesis-cast for numeric truncation, `Convert.To*` for cross-type conversions including bool/string) where C/C++ programmers had to rely on parenthesis-casts plus manual `sprintf`/`atoi`-style functions for anything beyond numeric types. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Implicit casting (automatic)** — converting a SMALLER type to a LARGER type happens automatically, no syntax needed: `char → int → long → float → double`. [S1] +- **Explicit casting (manual)** — converting a LARGER type to a SMALLER type requires an explicit cast written as `(type) value` in front of the value: `double → float → long → int → char`. [S1] +- **Explicit casting truncates, doesn't round** — casting `9.78` (double) to `int` produces `9`, not `10` — the decimal part is simply dropped. [S1] +- **`Convert.ToXxx()` methods** — a separate, non-parenthesis-cast conversion mechanism: `Convert.ToBoolean`, `Convert.ToDouble`, `Convert.ToString`, `Convert.ToInt32` (int), `Convert.ToInt64` (long) — notably covers conversions parenthesis-casts can't do directly, like bool↔string. [S1] +- **Motivating use case (deferred)** — the tutorial explicitly points to the NEXT chapter (User Input) as the place where type conversion becomes genuinely necessary, since console input always arrives as a string. [S1] + +## 📖 세부 내용 (Details) +- Implicit example: `int myInt = 9; double myDouble = myInt; // Automatic casting: int to double` — both `myInt` (9) and `myDouble` (9) print identically. [S1] +- Explicit example: `double myDouble = 9.78; int myInt = (int) myDouble; // Manual casting: double to int` — `myDouble` stays `9.78`, `myInt` becomes `9` (truncated, not rounded). [S1] +- Convert methods example: `Console.WriteLine(Convert.ToString(myInt)); Console.WriteLine(Convert.ToDouble(myInt)); Console.WriteLine(Convert.ToInt32(myDouble)); Console.WriteLine(Convert.ToString(myBool));`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C-style 괄호 캐스팅과 완전히 동일한 구문이 유지됨**: `(int) myDouble`이라는 명시적 캐스팅 문법이 C/C++의 괄호 캐스팅과 글자 하나 다르지 않게 동일하다는 점이 확인됨. [S1] +- **Convert.ToXxx()라는 C/C++에 없던 완전히 별도의 변환 체계가 추가됨**: C/C++는 괄호 캐스팅 외에 bool↔string 같은 이종 타입 변환을 위해 각자 다른 라이브러리 함수(sprintf, atoi 등)를 조합해야 했지만, C#은 Convert 클래스의 정적 메서드 하나로 통일된 변환 인터페이스를 제공한다는 점이 새로운 차이로 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +int/double/bool 값을 Convert.ToString/ToDouble/ToInt32로 상호 변환하는 예제가 원문에서 직접 실전 활용 사례로 제시되며, "왜 변환이 필요한가"에 대해 다음 챕터(User Input)를 명시적으로 예고함. [S1] + +## 💻 코드 패턴 (Code patterns) +Explicit cast (truncates) vs. Convert.ToXxx() methods (C#): +```csharp +double myDouble = 9.78; +int myInt = (int) myDouble; // explicit cast -> 9 (truncated, not rounded) + +int a = 10; +Console.WriteLine(Convert.ToString(a)); // int to string +Console.WriteLine(Convert.ToDouble(a)); // int to double +bool b = true; +Console.WriteLine(Convert.ToString(b)); // bool to string +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Data Types]], [[CSharp User Input]], [[CPP Type Casting]] +- **참조 맥락:** Data Types & Type Casting 섹션의 마지막 챕터 — Operators 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Type Casting — https://www.w3schools.com/cs/cs_type_casting.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Type Casting" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_User_Input.md b/10_Wiki/Dev/Topic_CSharp/CSharp_User_Input.md new file mode 100644 index 00000000..42157942 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_User_Input.md @@ -0,0 +1,71 @@ +--- +id: csharp-user-input +title: "C# User Input" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["Console.ReadLine", "C# 사용자 입력"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "user-input"] +raw_sources: ["https://www.w3schools.com/cs/cs_user_input.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp User Input]] + +## 🎯 한 줄 통찰 (One-line insight) +This chapter is the exact payoff the Type Casting chapter promised — "take a look at the next chapter, when working with user input, to see an example of this [conversion]" — and it delivers precisely that: `Console.ReadLine()` ALWAYS returns a `string`, full stop, unlike C++'s `cin >>` or C's `scanf()` which can read directly into a typed variable (`int`, `double`, etc.); trying `int age = Console.ReadLine();` is a compile error ("Cannot implicitly convert type 'string' to 'int'"), forcing every numeric input in C# through an explicit `Convert.ToInt32()` (or similar) call, with a runtime `System.FormatException` risk if the user types non-numeric text — a failure mode C's `scanf()` doesn't raise as an exception (it silently fails to parse) and C++'s `cin >>` handles via the stream-error-state mechanism already documented in `[[CPP Input Validation]]`. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`Console.ReadLine()`** — reads a line of keyboard input and returns it as a `string`; the counterpart to `Console.WriteLine()`. [S1] +- **Always returns `string`** — there is no direct "read an int" or "read a double" variant; every input arrives as text first. [S1] +- **Implicit conversion is illegal** — `int age = Console.ReadLine();` fails at compile time with "Cannot implicitly convert type 'string' to 'int'". [S1] +- **`Convert.ToInt32()` (and siblings)** — the explicit conversion method required to turn the string input into a usable numeric type, directly reusing the `Convert.To*` family from the Type Casting chapter. [S1] +- **Runtime parse failure** — if the user enters non-numeric text where a number is expected, `Convert.ToInt32()` throws a `System.FormatException` ("Input string was not in a correct format.") — a RUNTIME exception, not a compile error; full handling deferred to a later Exceptions chapter. [S1] + +## 📖 세부 내용 (Details) +- Basic string input: `Console.WriteLine("Enter username:"); string userName = Console.ReadLine(); Console.WriteLine("Username is: " + userName);`. [S1] +- Failing numeric input attempt: `Console.WriteLine("Enter your age:"); int age = Console.ReadLine(); Console.WriteLine("Your age is: " + age);` → compile error. [S1] +- Fixed with explicit conversion: `Console.WriteLine("Enter your age:"); int age = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Your age is: " + age);`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **Type Casting 챕터의 예고가 이 챕터에서 실현됨**: Type Casting 챕터가 "다음 챕터(사용자 입력)에서 왜 변환이 필요한지 확인하라"고 예고했는데, 이번 챕터가 정확히 그 이유(ReadLine()이 항상 string만 반환)와 해결책(Convert.ToInt32())을 보여준다는 점이 확인됨. [S1] +- **C/C++의 typed 입력과 달리 항상 string으로만 들어옴**: C의 scanf()나 C++의 cin >>는 변수 타입에 맞춰 직접 파싱해 읽을 수 있었지만, C#의 Console.ReadLine()은 항상 string만 반환하므로 숫자가 필요하면 반드시 Convert.ToInt32() 같은 명시적 변환을 거쳐야 한다는 점이 확인됨 — 컴파일 타임 에러(암묵적 변환 금지)로 이를 강제함. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +사용자로부터 나이를 입력받아 Convert.ToInt32(Console.ReadLine())으로 정수로 변환한 뒤 출력하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Console.ReadLine() always returns string — explicit conversion required for numbers (C#): +```csharp +Console.WriteLine("Enter your age:"); +int age = Convert.ToInt32(Console.ReadLine()); // explicit conversion required +Console.WriteLine("Your age is: " + age); +// Non-numeric input throws System.FormatException at runtime +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Type Casting]], [[CSharp Enums]], [[CSharp Exceptions]], [[CPP Input Validation]] +- **참조 맥락:** User Input 섹션의 유일 챕터 — Exceptions 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# User Input — https://www.w3schools.com/cs/cs_user_input.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# User Input" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Variables.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Variables.md new file mode 100644 index 00000000..34c1cb7c --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Variables.md @@ -0,0 +1,75 @@ +--- +id: csharp-variables +title: "C# Variables" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["int double char string bool", "C# 변수"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.85 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "variables"] +raw_sources: ["https://www.w3schools.com/cs/cs_variables.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Variables]] + +## 🎯 한 줄 통찰 (One-line insight) +C#'s five introductory types (int/double/char/string/bool) match Java's primitive-plus-String lineup almost exactly, but `string` in C# is a genuine built-in keyword-level type from the very first variable chapter — no separate library import, no `` header, no `std::string` namespace qualifier — collapsing what took C an entire "no native strings" caveat and C++ a dedicated Strings section (`` header, `std::string` vs C-style char arrays) into a single bullet point alongside int/double/char/bool. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`int`** — whole numbers without decimals (e.g. `123`, `-123`). [S1] +- **`double`** — floating-point numbers with decimals (e.g. `19.99`, `-19.99`). [S1] +- **`char`** — a single character, surrounded by SINGLE quotes (`'a'`). [S1] +- **`string`** — text, surrounded by DOUBLE quotes (`"Hello World"`) — a first-class type from the start, not a library add-on. [S1] +- **`bool`** — two states only: `true` or `false`. [S1] +- **Declaration syntax** — `type variableName = value;`; can also declare without initializing, then assign later (`int myNum; myNum = 15;`). [S1] +- **Reassignment overwrites** — assigning a new value to an existing variable replaces the old one silently (no warning). [S1] + +## 📖 세부 내용 (Details) +- String declaration + print: `string name = "John"; Console.WriteLine(name);`. [S1] +- Int declaration + print: `int myNum = 15; Console.WriteLine(myNum);`. [S1] +- Declare-then-assign: `int myNum; myNum = 15; Console.WriteLine(myNum);`. [S1] +- Overwrite: `int myNum = 15; myNum = 20; // myNum is now 20`. [S1] +- All five types declared together: `int myNum = 5; double myDoubleNum = 5.99D; char myLetter = 'D'; bool myBool = true; string myText = "Hello";` — note the `D` suffix on the double literal. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **string이 처음부터 내장 타입으로 취급됨**: C는 문자열이라는 내장 타입 자체가 없어 char 배열로 흉내내야 했고, C++는 `` 헤더와 `std::string`을 별도로 배워야 했지만, C#은 첫 변수 챕터부터 int/double/char/bool과 동일한 급으로 string을 나열한다는 점이 확인됨 — 별도 import나 네임스페이스 한정자 없이 바로 사용 가능. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — name(string)과 myNum(int) 변수를 선언하고 출력하는 기본 예제가 원문에서 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Declaring all five basic C# types (C#): +```csharp +int myNum = 5; +double myDoubleNum = 5.99D; +char myLetter = 'D'; +bool myBool = true; +string myText = "Hello"; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.85 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Variables Identifiers]], [[CSharp Data Types]], [[CPP Strings]], [[C Strings]] +- **참조 맥락:** Variables 섹션 — Identifiers 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Variables — https://www.w3schools.com/cs/cs_variables.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Variables" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Variables_Constants.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Variables_Constants.md new file mode 100644 index 00000000..bc1f077c --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Variables_Constants.md @@ -0,0 +1,65 @@ +--- +id: csharp-variables-constants +title: "C# Constants" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["const keyword C#", "C# 상수"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "constants"] +raw_sources: ["https://www.w3schools.com/cs/cs_variables_constants.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Constants]] + +## 🎯 한 줄 통찰 (One-line insight) +C#'s `const` keyword is placed BEFORE the type (`const int myNum = 15;`), exactly mirroring C's `const int` and C++'s identical placement — but C# adds a strictness neither predecessor enforces at the same chapter level: a `const` MUST be initialized at declaration, with no separate "declare now, assign later" escape hatch, producing a hard compiler error ("A const field requires a value to be provided") rather than the vaguer undefined/uninitialized-value risk C's const-without-init could silently create. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`const` keyword** — placed before the variable type, makes the variable unchangeable and read-only after its initial assignment. [S1] +- **Mandatory initialization** — a `const` MUST be assigned a value at the point of declaration; declaring one without a value is a compile error. [S1] +- **Use case** — values that should never change, like PI (3.14159...), protecting code from accidental overwrites by the same or other developers. [S1] + +## 📖 세부 내용 (Details) +- Declaration + illegal reassignment: `const int myNum = 15; myNum = 20; // error`. [S1] +- Explicit error message quoted from the compiler: "A const field requires a value to be provided" when a const is declared without a value. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **초기화 없는 const 선언이 하드 에러로 즉시 차단됨**: C의 `const int x;`는 선언 자체는 허용되고 이후 대입이 불가능해 초기화되지 않은 값이 남는 위험이 있었지만, C#은 초기화 없는 const 선언 자체를 컴파일 에러로 명시적으로 차단한다는 점이 이번 챕터에서 확인됨. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — PI처럼 절대 변하지 않아야 하는 값의 예시로 const 사용이 원문에서 언급됨. [S1] + +## 💻 코드 패턴 (Code patterns) +const requires initialization at declaration — no exceptions (C#): +```csharp +const int myNum = 15; +myNum = 20; // error - cannot assign to a const variable +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Variables Identifiers]], [[CSharp Variables Display]], [[C Constants]] +- **참조 맥락:** Variables 섹션 — Display Variables 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Constants — https://www.w3schools.com/cs/cs_variables_constants.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Constants" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Variables_Display.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Variables_Display.md new file mode 100644 index 00000000..5885d04d --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Variables_Display.md @@ -0,0 +1,71 @@ +--- +id: csharp-variables-display +title: "C# Display Variables" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["string concatenation C#", "+ operator overload C#", "C# 변수 출력"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.84 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "variables", "concatenation"] +raw_sources: ["https://www.w3schools.com/cs/cs_variables_display.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Display Variables]] + +## 🎯 한 줄 통찰 (One-line insight) +C# overloads the SAME `+` operator to mean two entirely different operations depending on operand type — string concatenation (`"Hello " + name`) versus numeric addition (`x + y`) — with no separate concatenation operator like C++ chose to avoid (C++ ALSO overloads `<<` for output but keeps `+` mostly numeric for its native strings, relying on `std::string`'s own `+` overload); C# instead makes this dual-meaning `+` a first-class, chapter-one-visible feature, closer to Java's identical `+`-for-both-jobs design than to C++'s more type-segregated approach. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`+` for string + text combination** — `"Hello " + name` concatenates a string literal and a string variable. [S1] +- **`+` for string + string combination** — `firstName + lastName` concatenates two string variables into a new string. [S1] +- **`+` for numeric addition** — when both operands are numeric (e.g. `int`), `+` performs mathematical addition instead of concatenation. [S1] +- **Type determines behavior** — the SAME operator symbol resolves to concatenation or addition purely based on the operand types involved. [S1] + +## 📖 세부 내용 (Details) +- String + variable: `string name = "John"; Console.WriteLine("Hello " + name);`. [S1] +- Variable + variable (string): `string firstName = "John "; string lastName = "Doe"; string fullName = firstName + lastName; Console.WriteLine(fullName);`. [S1] +- Numeric addition: `int x = 5; int y = 6; Console.WriteLine(x + y); // Print the value of x + y` → outputs `11`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **동일 연산자가 타입에 따라 완전히 다른 동작을 함**: `+`가 문자열이면 연결(concatenation), 숫자면 산술 덧셈이라는 이중 역할을 한다는 점이 이번 챕터에서 확인됨 — Java와 동일한 설계이며, C++가 `std::string`의 `+` 연산자 오버로드를 통해 유사하게 동작하지만 C#은 이를 변수 출력 챕터 초반부터 명시적으로 강조한다는 차이가 있음. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 이름 문자열을 인사말과 연결하고, 숫자 두 개를 더해 출력하는 두 예제가 원문에서 나란히 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +The `+` operator's dual meaning — concatenation vs. addition (C#): +```csharp +string name = "John"; +Console.WriteLine("Hello " + name); // concatenation -> "Hello John" + +int x = 5; +int y = 6; +Console.WriteLine(x + y); // addition -> 11 +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.84 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Variables Constants]], [[CSharp Variables Multiple]], [[CSharp Strings Concat]] +- **참조 맥락:** Variables 섹션 — Multiple Variables 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Display Variables — https://www.w3schools.com/cs/cs_variables_display.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Display Variables" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Variables_Identifiers.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Variables_Identifiers.md new file mode 100644 index 00000000..4d129f92 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Variables_Identifiers.md @@ -0,0 +1,69 @@ +--- +id: csharp-variables-identifiers +title: "C# Identifiers" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["variable naming rules C#", "C# 식별자"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "identifiers", "naming"] +raw_sources: ["https://www.w3schools.com/cs/cs_variables_identifiers.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Identifiers]] + +## 🎯 한 줄 통찰 (One-line insight) +C#'s identifier rules (letters/digits/underscore, must start with letter/underscore, case-sensitive, no reserved words) are the same rule-set every C-family language in this series has used verbatim — the interesting detail isn't the rule itself but the STYLE convention layered on top: C# explicitly recommends lowercase-starting names (camelCase, e.g. `minutesPerHour`), which will matter later when C#'s method/class names are shown starting with an UPPERCASE letter (PascalCase) — a naming-convention split by identifier kind that C and C++ never enforced this explicitly. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Identifier** — the unique name given to a variable. [S1] +- **Character rules** — letters, digits, and underscore (`_`) allowed; must begin with a letter or underscore (never a digit). [S1] +- **Case sensitivity** — `myVar` and `myvar` are distinct variables. [S1] +- **No whitespace** — names cannot contain spaces. [S1] +- **No reserved words** — C# keywords like `int` or `double` cannot be used as identifier names. [S1] +- **Style convention (recommended, not enforced)** — start with a lowercase letter; prefer descriptive names (`minutesPerHour`) over terse ones (`m`) for readability and maintainability. [S1] + +## 📖 세부 내용 (Details) +- Good vs. acceptable naming contrast: `int minutesPerHour = 60; // Good` vs `int m = 60; // OK, but not so easy to understand`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **명명 규칙 자체는 C/C++/Java와 동일**: 문자/숫자/언더스코어, 숫자로 시작 불가, 대소문자 구분, 예약어 사용 불가라는 규칙이 이전 언어들과 동일함이 확인됨 — 차이는 규칙이 아니라 스타일 권장(lowercase 시작, 서술적 이름 선호)에 있음. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — minutesPerHour vs m 이름 비교가 원문에서 스타일 예제로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Descriptive vs. terse identifier naming (C#): +```csharp +// Good +int minutesPerHour = 60; +// OK, but not so easy to understand what m actually is +int m = 60; +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Variables]], [[CSharp Variables Constants]] +- **참조 맥락:** Variables 섹션 — Constants 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Identifiers — https://www.w3schools.com/cs/cs_variables_identifiers.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Identifiers" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_Variables_Multiple.md b/10_Wiki/Dev/Topic_CSharp/CSharp_Variables_Multiple.md new file mode 100644 index 00000000..9f3db92d --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_Variables_Multiple.md @@ -0,0 +1,69 @@ +--- +id: csharp-variables-multiple +title: "C# Multiple Variables" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["comma-separated declaration C#", "chained assignment C#", "C# 다중 변수 선언"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "variables"] +raw_sources: ["https://www.w3schools.com/cs/cs_variables_multiple.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp Multiple Variables]] + +## 🎯 한 줄 통찰 (One-line insight) +Both declaration patterns shown here — comma-separated same-type declaration (`int x = 5, y = 6, z = 50;`) and chained assignment (`x = y = z = 50;`) — are syntactically identical to C's and C++'s equivalent patterns, confirming that at the "declaring several variables at once" level, C# hasn't diverged from its C-family ancestors at all; the only C#-specific detail is that the chained-assignment form requires the variables to already be declared (`int x, y, z;` first), since C# doesn't allow declaring types mid-chain the way a single `int x = y = z = 50;` might ambiguously suggest. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Comma-separated declaration** — `int x = 5, y = 6, z = 50;` declares three variables of the SAME type in one statement, each with its own initial value. [S1] +- **Chained assignment** — `int x, y, z; x = y = z = 50;` declares three variables first, then assigns the SAME value to all three in one statement (evaluated right-to-left). [S1] +- Both patterns are restricted to variables of the same declared type — no mixing types in either the comma list or the assignment chain. [S1] + +## 📖 세부 내용 (Details) +- Comma-separated with individual values: `int x = 5, y = 6, z = 50; Console.WriteLine(x + y + z);` → outputs `61`. [S1] +- Chained same-value assignment: `int x, y, z; x = y = z = 50; Console.WriteLine(x + y + z);` → outputs `150`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **C/C++와 동일한 두 패턴이 그대로 유지됨**: 콤마로 구분한 동시 선언과 연쇄 대입 두 패턴 모두 C/C++에서 이미 확인된 문법과 차이가 없다는 점이 이번 챕터에서 확인됨 — C#이 변수 선언 수준에서는 C 계열 문법을 그대로 계승하고 있음을 보여주는 사례. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — x+y+z를 출력하는 두 가지 선언 방식(개별 값 vs 동일 값)이 원문에서 나란히 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Comma-separated declaration vs. chained assignment (C#): +```csharp +int x = 5, y = 6, z = 50; +Console.WriteLine(x + y + z); // 61 + +int a, b, c; +a = b = c = 50; +Console.WriteLine(a + b + c); // 150 +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Variables Display]], [[CSharp Data Types]], [[C Variables Multiple]] +- **참조 맥락:** Variables 섹션의 마지막 챕터 — Data Types & Type Casting 섹션으로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# Multiple Variables — https://www.w3schools.com/cs/cs_variables_multiple.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# Multiple Variables" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_CSharp/CSharp_While_Loop.md b/10_Wiki/Dev/Topic_CSharp/CSharp_While_Loop.md new file mode 100644 index 00000000..5d88a358 --- /dev/null +++ b/10_Wiki/Dev/Topic_CSharp/CSharp_While_Loop.md @@ -0,0 +1,78 @@ +--- +id: csharp-while-loop +title: "C# While Loop" +category: "Programming_Language" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["do while loop C#", "C# while 반복문"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["csharp", "programming-language", "w3schools", "loops", "while"] +raw_sources: ["https://www.w3schools.com/cs/cs_while_loop.php"] +applied_in: [] +github_commit: "" +--- + +# [[CSharp While Loop]] + +## 🎯 한 줄 통찰 (One-line insight) +Both loop syntaxes on this page (`while (condition) {...}` and `do {...} while (condition);`) are identical to C/C++, and the source combines them into ONE chapter rather than splitting them across two — a structural choice that differs from Topic_CPP, where While Loop and Do While Loop were separate documents — meaning this single C# doc intentionally covers both variants together, matching the source page's own organization instead of forcing a 1:1 split that the source doesn't have. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`while (condition) { ... }`** — repeats the block as long as `condition` stays `True`; the condition is checked BEFORE each iteration, so the body may run zero times. [S1] +- **`do { ... } while (condition);`** — the do/while variant; the block runs ONCE FIRST, then the condition is checked — meaning the body always executes at least once, even if the condition is false from the start. [S1] +- **Manual increment required** — both loops require the loop variable to be manually advanced inside the body (`i++`); forgetting this creates an infinite loop, a warning the tutorial repeats for both variants. [S1] + +## 📖 세부 내용 (Details) +- While example: `int i = 0; while (i < 5) { Console.WriteLine(i); i++; }` → prints 0,1,2,3,4. [S1] +- Do/while example: `int i = 0; do { Console.WriteLine(i); i++; } while (i < 5);` → identical output to the while version in this case, but the guarantee differs (body always runs at least once). [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **while/do-while이 C/C++와 완전히 동일한 문법·의미**: 조건 선검사(while) vs 후검사(do-while) 구조와 문법이 C/C++와 차이가 없다는 점이 확인됨. [S1] +- **원문 구조상 while과 do-while이 한 챕터로 묶여 있음**: Topic_CPP에서는 While Loop와 Do While Loop가 별도 문서였지만, C# 사이드바는 이 둘을 cs_while_loop.php 하나의 페이지로 묶어 제공한다는 점이 확인됨 — 소스 사이트의 실제 챕터 구성을 그대로 따라 이 문서도 두 변형을 함께 다룸(1:1 매핑 원칙을 소스의 실제 챕터 단위에 맞춤). [S1] + +## 🛠️ 적용 사례 (Applied in summary) +0부터 4까지 출력하는 동일한 로직을 while과 do/while 두 가지 방식으로 각각 구현하는 예제가 원문에서 나란히 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +while (pre-check) vs. do/while (post-check, runs at least once) (C#): +```csharp +int i = 0; +while (i < 5) +{ + Console.WriteLine(i); + i++; +} + +int j = 0; +do +{ + Console.WriteLine(j); + j++; +} +while (j < 5); +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[C# Tutorial]] +- **관련 개념:** [[CSharp Switch]], [[CSharp For Loop]], [[CPP While Loop]], [[CPP Do While Loop]] +- **참조 맥락:** Loops 섹션 — For Loop 챕터로 이어짐. + +## 📚 출처 (Sources) +- [S1] W3Schools — C# While Loop — https://www.w3schools.com/cs/cs_while_loop.php + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "C# While Loop" page (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_HOWTO/00_INDEX.md b/10_Wiki/Dev/Topic_HOWTO/00_INDEX.md new file mode 100644 index 00000000..e8378ac1 --- /dev/null +++ b/10_Wiki/Dev/Topic_HOWTO/00_INDEX.md @@ -0,0 +1,408 @@ +--- +id: howto-tutorial-index +title: "W3Schools HOW TO" +category: "Web_Recipes" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["HOW TO", "Topic_HOWTO index", "HOW TO 목차"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.88 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["howto", "css", "javascript", "html", "w3schools", "moc", "index", "ui-recipes"] +raw_sources: ["https://www.w3schools.com/howto/default.asp"] +applied_in: [] +github_commit: "" +--- + +# [[W3Schools HOW TO]] + +## 🎯 한 줄 통찰 (One-line insight) +Map of Content (MOC) for the W3Schools "HOW TO" cookbook — unlike every prior category in this series (which taught a PROGRAMMING LANGUAGE chapter by chapter), this category is a flat collection of ~326 independent UI/code RECIPES (a button style, a layout trick, a JS widget), each self-contained and not building on the previous page — so this index groups them by PATTERN FAMILY (Layout, Buttons, Navigation, Forms, Images/Effects, Cards/Components, Misc Widgets, HTML tricks, Google integrations, Website guides, JS DOM, JS UI Components, JS Effects/Scroll, JS Utility/Logic) rather than by pedagogical sequence, since there is no natural "next chapter" ordering to preserve. [S1] + +## 🧠 핵심 개념 (Core concepts) +- This folder (`Topic_HOWTO`) wikifies the W3Schools HOW TO cookbook, one knowledge page per recipe, in P-Reinforce v3.1 format — same convention as every other `Topic_*` folder in this series. [S1] +- **Scope decision** (user-confirmed 2026-07-04): full P-Reinforce docs for ALL ~326 recipe pages, at the same depth as language-tutorial chapters, despite recipes being far more repetitive/lower-insight-density than concept lessons. [S1] +- **Excluded**: `howto_blog_*` (3 pages — career-advice blog posts, not code recipes: become_frontenddev, developer_job, hire_developers). Everything else from the sidebar is included (CSS/JS/HTML recipes, Google integrations, "website guide" pages, and utility/logic snippets). [S1] +- **File prefix**: `HOWTO_` for all files, folder `Topic_HOWTO`. Source slugs use `howto_` prefix, `.asp` extension (verified). [S1] +- **Progress:** **46 of 326 planned docs complete** (CSS Layout & Positioning, CSS Buttons sections done). Next: CSS Navigation & Menus section. +- Every page roots its Knowledge Graph back to this `[[W3Schools HOW TO]]` node. + +## 📖 세부 내용 (Details) + +### CSS Layout & Positioning (26) +- [[HOWTO CSS About Page]] ✅ +- [[HOWTO CSS Aspect Ratio]] ✅ +- [[HOWTO CSS Browser Window]] ✅ (partial — code not extractable) +- [[HOWTO CSS Center List]] ✅ +- [[HOWTO CSS Center Vertical]] ✅ +- [[HOWTO CSS Center Button]] ✅ +- [[HOWTO CSS Center Website]] ✅ +- [[HOWTO CSS Clearfix]] ✅ +- [[HOWTO CSS Div Full Height]] ✅ +- [[HOWTO CSS Equal Height]] ✅ +- [[HOWTO CSS Fixed Footer]] ✅ +- [[HOWTO CSS Fixed Menu]] ✅ +- [[HOWTO CSS Fixed Sidebar]] ✅ +- [[HOWTO CSS Four Columns]] ✅ +- [[HOWTO CSS Full Page]] ✅ +- [[HOWTO CSS Mixed Columns]] ✅ +- [[HOWTO CSS Responsive Floats]] ✅ +- [[HOWTO CSS Split Screen]] ✅ +- [[HOWTO CSS Sticky Element]] ✅ +- [[HOWTO CSS Three Columns]] ✅ +- [[HOWTO CSS Two Columns]] ✅ +- [[HOWTO CSS Vertical Line]] ✅ +- [[HOWTO CSS Zig Zag Layout]] ✅ +- [[HOWTO CSS Table Center]] ✅ +- [[HOWTO CSS Table Full Width]] ✅ +- [[HOWTO CSS Images Side By Side]] ✅ + +### CSS Buttons (20) +- [[HOWTO CSS Alert Buttons]] ✅ +- [[HOWTO CSS Animate Buttons]] ✅ (partial — code not extractable) +- [[HOWTO CSS Block Buttons]] ✅ +- [[HOWTO CSS Button Group]] ✅ +- [[HOWTO CSS Button Group Vertical]] ✅ +- [[HOWTO CSS Button On Image]] ✅ +- [[HOWTO CSS Button Split]] ✅ +- [[HOWTO CSS Download Button]] ✅ +- [[HOWTO CSS Fading Buttons]] ✅ (partial — code not extractable) +- [[HOWTO CSS Icon Buttons]] ✅ +- [[HOWTO CSS Loading Buttons]] ✅ +- [[HOWTO CSS More Button]] ✅ +- [[HOWTO CSS Notification Button]] ✅ +- [[HOWTO CSS Outline Buttons]] ✅ +- [[HOWTO CSS Pill Button]] ✅ +- [[HOWTO CSS Round Buttons]] ✅ +- [[HOWTO CSS Search Button]] ✅ +- [[HOWTO CSS Sidenav Buttons]] ✅ +- [[HOWTO CSS Social Media Buttons]] ✅ +- [[HOWTO CSS Text Buttons]] ✅ + +### CSS Navigation & Menus (25) +- [[HOWTO CSS Bottom Nav]] +- [[HOWTO CSS Breadcrumbs]] +- [[HOWTO CSS Dropdown]] +- [[HOWTO CSS Dropdown Navbar]] +- [[HOWTO CSS Dropup]] +- [[HOWTO CSS Icon Bar]] +- [[HOWTO CSS Input Navbar]] +- [[HOWTO CSS Mega Menu]] +- [[HOWTO CSS Menu Horizontal Scroll]] +- [[HOWTO CSS Menu Icon]] +- [[HOWTO CSS Navbar Border]] +- [[HOWTO CSS Navbar Icon]] +- [[HOWTO CSS Navbar Image]] +- [[HOWTO CSS Next Prev]] +- [[HOWTO CSS Pagination]] +- [[HOWTO CSS Pill Nav]] +- [[HOWTO CSS Sidebar Icons]] +- [[HOWTO CSS Sidebar Responsive]] +- [[HOWTO CSS Subnav]] +- [[HOWTO CSS Topnav Centered]] +- [[HOWTO CSS Topnav Equal Width]] +- [[HOWTO CSS Topnav Right]] +- [[HOWTO CSS Topnav Split]] +- [[HOWTO CSS Vertical Menu]] +- [[HOWTO CSS Login Form Navbar]] + +### CSS Forms & Inputs (18) +- [[HOWTO CSS Checkout Form]] +- [[HOWTO CSS Contact Form]] +- [[HOWTO CSS Custom Checkbox]] +- [[HOWTO CSS Form Icon]] +- [[HOWTO CSS Form On Image]] +- [[HOWTO CSS Inline Form]] +- [[HOWTO CSS Labels]] +- [[HOWTO CSS Login Form]] +- [[HOWTO CSS Placeholder]] +- [[HOWTO CSS Register Form]] +- [[HOWTO CSS Responsive Form]] +- [[HOWTO CSS Signup Form]] +- [[HOWTO CSS Stacked Form]] +- [[HOWTO CSS Switch]] +- [[HOWTO CSS Contenteditable Border]] +- [[HOWTO CSS Disable Resize Textarea]] +- [[HOWTO CSS Disable Text Selection]] +- [[HOWTO CSS Hide Arrow Number]] + +### CSS Images & Visual Effects (33) +- [[HOWTO CSS Bg Change Scroll]] +- [[HOWTO CSS Bg Gradient Scroll]] +- [[HOWTO CSS Blurred Background]] +- [[HOWTO CSS Border Image]] +- [[HOWTO CSS Circles]] +- [[HOWTO CSS Cutout Text]] +- [[HOWTO CSS Flip Box]] +- [[HOWTO CSS Flip Card]] +- [[HOWTO CSS Flip Image]] +- [[HOWTO CSS Glowing Text]] +- [[HOWTO CSS Hero Image]] +- [[HOWTO CSS Image Avatar]] +- [[HOWTO CSS Image Bw]] +- [[HOWTO CSS Image Center]] +- [[HOWTO CSS Image Effects]] +- [[HOWTO CSS Image Gallery]] +- [[HOWTO CSS Image Gallery Scroll]] +- [[HOWTO CSS Image Grid Responsive]] +- [[HOWTO CSS Image Overlay]] +- [[HOWTO CSS Image Overlay Icon]] +- [[HOWTO CSS Image Overlay Slide]] +- [[HOWTO CSS Image Overlay Title]] +- [[HOWTO CSS Image Overlay Zoom]] +- [[HOWTO CSS Image Responsive]] +- [[HOWTO CSS Image Sticky]] +- [[HOWTO CSS Image Text]] +- [[HOWTO CSS Image Text Blocks]] +- [[HOWTO CSS Image Transparent]] +- [[HOWTO CSS Rounded Images]] +- [[HOWTO CSS Shake Image]] +- [[HOWTO CSS Thumbnail]] +- [[HOWTO CSS Transition Hover]] +- [[HOWTO CSS Zoom Hover]] + +### CSS Cards & UI Components (21) +- [[HOWTO CSS Badge]] +- [[HOWTO CSS Cards]] +- [[HOWTO CSS Column Cards]] +- [[HOWTO CSS Comparison Table]] +- [[HOWTO CSS Coupon]] +- [[HOWTO CSS Delete Modal]] +- [[HOWTO CSS List Group]] +- [[HOWTO CSS List Group Badges]] +- [[HOWTO CSS List Without Bullets]] +- [[HOWTO CSS Modal Images]] +- [[HOWTO CSS Modals]] +- [[HOWTO CSS Pricing Table]] +- [[HOWTO CSS Product Card]] +- [[HOWTO CSS Profile Card]] +- [[HOWTO CSS Ribbon]] +- [[HOWTO CSS Star Rating]] +- [[HOWTO CSS Tag Cloud]] +- [[HOWTO CSS Testimonials]] +- [[HOWTO CSS Timeline]] +- [[HOWTO CSS Tooltip]] +- [[HOWTO CSS User Rating]] + +### CSS Misc Widgets & Layout Tricks (34) +- [[HOWTO CSS Animated Search]] +- [[HOWTO CSS Arrows]] +- [[HOWTO CSS Blog Layout]] +- [[HOWTO CSS Bullet Color]] +- [[HOWTO CSS Calendar]] +- [[HOWTO CSS Chat]] +- [[HOWTO CSS Coming Soon]] +- [[HOWTO CSS Contact Chips]] +- [[HOWTO CSS Contact Section]] +- [[HOWTO CSS Devices]] +- [[HOWTO CSS Display Element Hover]] +- [[HOWTO CSS Dividers]] +- [[HOWTO CSS Example Website]] +- [[HOWTO CSS Force Scrollbars]] +- [[HOWTO CSS Fullscreen Search]] +- [[HOWTO CSS Fullscreen Video]] +- [[HOWTO CSS Hide Scrollbars]] +- [[HOWTO CSS Loader]] +- [[HOWTO CSS Media Query Breakpoints]] +- [[HOWTO CSS Newsletter]] +- [[HOWTO CSS Notes]] +- [[HOWTO CSS Overlay]] +- [[HOWTO CSS Parallax]] +- [[HOWTO CSS Portfolio Gallery]] +- [[HOWTO CSS Responsive Header]] +- [[HOWTO CSS Responsive Iframes]] +- [[HOWTO CSS Responsive Text]] +- [[HOWTO CSS Searchbar]] +- [[HOWTO CSS Section Counter]] +- [[HOWTO CSS Shapes]] +- [[HOWTO CSS Skill Bar]] +- [[HOWTO CSS Smooth Scroll]] +- [[HOWTO CSS Social Login]] +- [[HOWTO CSS Sticky Social Bar]] +- [[HOWTO CSS Style Header]] +- [[HOWTO CSS Style Hr]] +- [[HOWTO CSS Table Responsive]] +- [[HOWTO CSS Table Side By Side]] +- [[HOWTO CSS Table Zebra]] +- [[HOWTO CSS Team]] +- [[HOWTO CSS Text Divider]] +- [[HOWTO CSS Text Selection]] + +### HTML Tricks (10) +- [[HOWTO HTML Autocomplete Off]] +- [[HOWTO HTML Clear Input]] +- [[HOWTO HTML Colorpicker]] +- [[HOWTO HTML Download Link]] +- [[HOWTO HTML Email Field]] +- [[HOWTO HTML Favicon]] +- [[HOWTO HTML File Upload Button]] +- [[HOWTO HTML Include]] +- [[HOWTO HTML Spellcheck Disable]] +- [[HOWTO HTML Table Nested]] + +### Google Integrations (6) +- [[HOWTO Google Analytics]] +- [[HOWTO Google Charts]] +- [[HOWTO Google Fonts]] +- [[HOWTO Google Fonts Pairings]] +- [[HOWTO Google Maps]] +- [[HOWTO Google Maps Bw]] + +### Website Guides (12) +- [[HOWTO Create And View]] +- [[HOWTO Custom Select]] +- [[HOWTO Make A Webbook]] +- [[HOWTO Make A Website]] +- [[HOWTO Syntax Highlight]] +- [[HOWTO Website]] +- [[HOWTO Website Bootstrap]] +- [[HOWTO Website Bootstrap4]] +- [[HOWTO Website Bootstrap5]] +- [[HOWTO Website Business]] +- [[HOWTO Website Create Linktree]] +- [[HOWTO Website Create Portfolio]] +- [[HOWTO Website Create Resume]] +- [[HOWTO Website Create Website]] +- [[HOWTO Website Host Staticwebsite]] +- [[HOWTO Website Restaurant]] +- [[HOWTO Website Static]] + +### JS DOM Manipulation (8) +- [[HOWTO JS Active Element]] +- [[HOWTO JS Add Class]] +- [[HOWTO JS Change Class]] +- [[HOWTO JS Check Hidden]] +- [[HOWTO JS Remove Class]] +- [[HOWTO JS Remove Property Object]] +- [[HOWTO JS Toggle Class]] +- [[HOWTO JS Toggle Hide Show]] + +### JS UI Components (48) +- [[HOWTO JS Accordion]] +- [[HOWTO JS Callout]] +- [[HOWTO JS Cascading Dropdown]] +- [[HOWTO JS Close List Items]] +- [[HOWTO JS Collapse Sidebar]] +- [[HOWTO JS Collapse Sidepanel]] +- [[HOWTO JS Collapsible]] +- [[HOWTO JS Curtain Menu]] +- [[HOWTO JS Dropdown]] +- [[HOWTO JS Dropdown Sidenav]] +- [[HOWTO JS Expanding Grid]] +- [[HOWTO JS Filter Dropdown]] +- [[HOWTO JS Filter Elements]] +- [[HOWTO JS Filter Lists]] +- [[HOWTO JS Filter Table]] +- [[HOWTO JS Form Steps]] +- [[HOWTO JS Full Page Tabs]] +- [[HOWTO JS Hover Tabs]] +- [[HOWTO JS List Grid View]] +- [[HOWTO JS Mobile Navbar]] +- [[HOWTO JS Off Canvas]] +- [[HOWTO JS Popup]] +- [[HOWTO JS Popup Chat]] +- [[HOWTO JS Popup Form]] +- [[HOWTO JS Portfolio Filter]] +- [[HOWTO JS Progressbar]] +- [[HOWTO JS Quotes Slideshow]] +- [[HOWTO JS Rangeslider]] +- [[HOWTO JS Read More]] +- [[HOWTO JS Responsive Navbar Dropdown]] +- [[HOWTO JS Search Menu]] +- [[HOWTO JS Sidenav]] +- [[HOWTO JS Slideshow]] +- [[HOWTO JS Slideshow Gallery]] +- [[HOWTO JS Snackbar]] +- [[HOWTO JS Sort List]] +- [[HOWTO JS Sort Table]] +- [[HOWTO JS Tab Header]] +- [[HOWTO JS Tab Img Gallery]] +- [[HOWTO JS Tabs]] +- [[HOWTO JS Todolist]] +- [[HOWTO JS Toggle Dark Mode]] +- [[HOWTO JS Toggle Like]] +- [[HOWTO JS Toggle Password]] +- [[HOWTO JS Toggle Text]] +- [[HOWTO JS Topnav]] +- [[HOWTO JS Topnav Responsive]] +- [[HOWTO JS Treeview]] +- [[HOWTO JS Trigger Button Enter]] +- [[HOWTO JS Typewriter]] +- [[HOWTO JS Vertical Tabs]] +- [[HOWTO JS Bottom Nav Responsive]] +- [[HOWTO JS Image Comparison]] +- [[HOWTO JS Image Grid]] +- [[HOWTO JS Image Magnifier Glass]] +- [[HOWTO JS Image Zoom]] +- [[HOWTO JS Lightbox]] + +### JS Effects & Scroll (15) +- [[HOWTO JS Animate]] +- [[HOWTO JS Animate Icons]] +- [[HOWTO JS Draggable]] +- [[HOWTO JS Fullscreen]] +- [[HOWTO JS Fullscreen Overlay]] +- [[HOWTO JS Get Current Window]] +- [[HOWTO JS Navbar Hide Scroll]] +- [[HOWTO JS Navbar Shrink Scroll]] +- [[HOWTO JS Navbar Slide]] +- [[HOWTO JS Navbar Sticky]] +- [[HOWTO JS Scroll Indicator]] +- [[HOWTO JS Scroll Into View]] +- [[HOWTO JS Scroll To Top]] +- [[HOWTO JS Scrolldrawing]] +- [[HOWTO JS Shrink Header Scroll]] +- [[HOWTO JS Sticky Header]] + +### JS Utility & Logic Snippets (25) +- [[HOWTO JS Alert]] +- [[HOWTO JS Autocomplete]] +- [[HOWTO JS Copy Clipboard]] +- [[HOWTO JS Countdown]] +- [[HOWTO JS Default Parameters]] +- [[HOWTO JS Detect Capslock]] +- [[HOWTO JS Display Checkbox Text]] +- [[HOWTO JS Element Iframe]] +- [[HOWTO JS Exponentiation]] +- [[HOWTO JS Format Number Dec]] +- [[HOWTO JS Get Date]] +- [[HOWTO JS Get Url]] +- [[HOWTO JS Length Converter]] +- [[HOWTO JS Offline Detection]] +- [[HOWTO JS Password Validation]] +- [[HOWTO JS Random Number Two Nums]] +- [[HOWTO JS Redirect Webpage]] +- [[HOWTO JS Remove Decimals]] +- [[HOWTO JS Sort Numeric Array]] +- [[HOWTO JS Speed Converter]] +- [[HOWTO JS Spread Operator]] +- [[HOWTO JS String Length]] +- [[HOWTO JS Temperature Converter]] +- [[HOWTO JS Validation Empty Input]] +- [[HOWTO JS Weight Converter]] + +## 🛠️ 적용 사례 (Applied in summary) +0 knowledge documents generated so far in this batch run. + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference) +- **신뢰 점수:** 0.88 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[10_Wiki]] +- **관련 개념:** [[HTML Tutorial]], [[CSS Tutorial]], [[JavaScript Tutorial]] +- **참조 맥락:** C#에 이어 W3Schools 지식화 시리즈의 다음 카테고리 — 언어 튜토리얼이 아닌 UI/코드 레시피 모음집. + +## 📚 출처 (Sources) +- [S1] W3Schools — HOW TO — https://www.w3schools.com/howto/default.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Created HOW TO MOC with scope decisions and full planned page list, organized by pattern family rather than chapter sequence (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_About_Page.md b/10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_About_Page.md new file mode 100644 index 00000000..9b08a41a --- /dev/null +++ b/10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_About_Page.md @@ -0,0 +1,70 @@ +--- +id: howto-css-about-page +title: "How To - CSS About Page" +category: "Web_Recipes" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["about us page CSS", "team card layout"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.8 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["howto", "css", "w3schools", "layout", "cards"] +raw_sources: ["https://www.w3schools.com/howto/howto_css_about_page.asp"] +applied_in: [] +github_commit: "" +--- + +# [[HOWTO CSS About Page]] + +## 🎯 한 줄 통찰 (One-line insight) +The team-card grid uses the OLDER `float: left` + `width: 33.3%` technique (not Flexbox/Grid) combined with the classic `::after { content: ""; clear: both; display: table; }` clearfix on the row container — a reminder that this recipe predates (or intentionally avoids) the Grid & Flexbox recipes covered elsewhere in this cookbook, and that float-based column layouts still require the clearfix hack to prevent the container from collapsing to zero height. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **`float: left` columns** — `.column { float: left; width: 33.3%; }` creates a 3-column grid without Flexbox/Grid. [S1] +- **Clearfix on the row** — `.container::after, .row::after { content: ""; clear: both; display: table; }` prevents the floated columns from collapsing their parent's height. [S1] +- **`box-sizing: border-box` reset** — applied globally via `html { box-sizing: border-box; } *, *:before, *:after { box-sizing: inherit; }`, so padding doesn't add to declared widths. [S1] +- **Responsive breakpoint** — `@media screen and (max-width: 650px) { .column { width: 100%; display: block; } }` stacks the columns on narrow screens. [S1] + +## 📖 세부 내용 (Details) +- Structure: an `.about-section` intro block, followed by a `.row` of three `.column > .card` team-member blocks (image, name, title, bio, email, contact button). [S1] +- Card styling: `.card { box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2); margin: 8px; }` gives each team member a subtle elevation effect. [S1] +- Button hover: `.button:hover { background-color: #555; }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +없음 — 신규 레시피, 기존 문서와 모순되는 내용 없음. + +## 🛠️ 적용 사례 (Applied in summary) +3명의 팀원 카드를 나열하는 "About Us" 페이지 레이아웃 전체가 원문에서 직접 실전 예제로 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Float-based 3-column layout with clearfix and a responsive breakpoint (CSS): +```css +.column { float: left; width: 33.3%; padding: 0 8px; } +.row::after { content: ""; clear: both; display: table; } +@media screen and (max-width: 650px) { + .column { width: 100%; display: block; } +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference) +- **신뢰 점수:** 0.80 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[W3Schools HOW TO]] +- **관련 개념:** [[HOWTO CSS Cards]], [[HOWTO CSS Team]], [[HOWTO CSS Three Columns]] +- **참조 맥락:** CSS Layout & Positioning 섹션. + +## 📚 출처 (Sources) +- [S1] W3Schools — How To - About Page — https://www.w3schools.com/howto/howto_css_about_page.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "How To - About Page" recipe (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Alert_Buttons.md b/10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Alert_Buttons.md new file mode 100644 index 00000000..ab602d78 --- /dev/null +++ b/10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Alert_Buttons.md @@ -0,0 +1,73 @@ +--- +id: howto-css-alert-buttons +title: "How To - Alert Buttons" +category: "Web_Recipes" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["success info warning danger buttons"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["howto", "css", "w3schools", "buttons"] +raw_sources: ["https://www.w3schools.com/howto/howto_css_alert_buttons.asp"] +applied_in: [] +github_commit: "" +--- + +# [[HOWTO CSS Alert Buttons]] + +## 🎯 한 줄 통찰 (One-line insight) +A shared `.btn` base class handles all the STRUCTURAL styling (border removal, padding, cursor) once, while five separate semantic modifier classes (`.success`, `.info`, `.warning`, `.danger`, `.default`) each carry ONLY a background-color pair (normal + `:hover`) — this base+modifier split means adding a sixth alert color later requires just one new 2-line modifier class, not a full button redefinition. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Shared base class `.btn`** — `border: none; color: white; padding: 14px 28px; cursor: pointer;` applied once to every alert button. [S1] +- **Color-coded semantic modifiers** — `.success` (green), `.info` (blue), `.warning` (orange), `.danger` (red), `.default` (gray, with black text instead of white). [S1] +- **Each modifier defines its own `:hover`** — a slightly darker shade of the same hue, applied consistently across all five variants. [S1] + +## 📖 세부 내용 (Details) +- HTML: `` (and similarly for info/warning/danger/default). [S1] +- CSS colors: success `#04AA6D`→hover `#46a049`; info `#2196F3`→hover `#0b7dda`; warning `#ff9800`→hover `#e68a00`; danger `#f44336`→hover `#da190b`; default `#e7e7e7` (black text)→hover `#ddd`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +없음 — 신규 레시피, 기존 문서와 모순되는 내용 없음. + +## 🛠️ 적용 사례 (Applied in summary) +Success/Info/Warning/Danger/Default 5가지 색상의 알림 버튼을 하나의 공통 .btn 클래스와 색상별 수식 클래스로 구현하는 예제가 원문에서 직접 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Base class + semantic color modifiers (CSS): +```css +.btn { + border: none; + color: white; + padding: 14px 28px; + cursor: pointer; +} +.success { background-color: #04AA6D; } +.success:hover { background-color: #46a049; } +.danger { background-color: #f44336; } +.danger:hover { background-color: #da190b; } +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[W3Schools HOW TO]] +- **관련 개념:** [[HOWTO CSS Block Buttons]], [[HOWTO CSS Outline Buttons]], [[HOWTO CSS Text Buttons]] +- **참조 맥락:** CSS Buttons 섹션. + +## 📚 출처 (Sources) +- [S1] W3Schools — How To - Alert Buttons — https://www.w3schools.com/howto/howto_css_alert_buttons.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "How To - Alert Buttons" recipe (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Animate_Buttons.md b/10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Animate_Buttons.md new file mode 100644 index 00000000..beb39b19 --- /dev/null +++ b/10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Animate_Buttons.md @@ -0,0 +1,59 @@ +--- +id: howto-css-animate-buttons +title: "How To - Animate Buttons" +category: "Web_Recipes" +status: "draft" +verification_status: "unverified" +canonical_id: "" +aliases: ["pressed effect button", "ripple button CSS"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.5 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "Source page's three interactive demos (press effect, hover arrow, ripple effect) render their CSS in live iframes not captured by the text extractor — only labels ('Click', 'Hover') were retrieved." +merge_history: [] +tags: ["howto", "css", "w3schools", "buttons", "animation"] +raw_sources: ["https://www.w3schools.com/howto/howto_css_animate_buttons.asp"] +applied_in: [] +github_commit: "" +--- + +# [[HOWTO CSS Animate Buttons]] + +## 🎯 한 줄 통찰 (One-line insight) +This page's actual animation CSS (transitions/transforms/keyframes for the "pressed," "hover arrow," and "ripple" effects) was not retrievable through text extraction — only the three effect NAMES and their trigger labels ("Click", "Hover") were captured, so this entry records the page's scope without fabricating the underlying CSS that couldn't be verified from source. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Three named button animation effects**: a "pressed" effect on click, an arrow that appears on hover, and a "ripple" effect on click. [S1] +- Specific implementation (transition timing, transform values, keyframe definitions) could not be confirmed from the extracted text and is NOT included here to avoid fabrication. [S1] + +## 📖 세부 내용 (Details) +- Only the effect labels and "Try it Yourself »" markers were extracted; the live CSS lives in embedded iframe examples the extractor does not capture. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +없음 — 검증 불가로 인해 비교할 세부 내용이 부족함. + +## 🛠️ 적용 사례 (Applied in summary) +현재 발견된 실제 적용 사례가 없습니다 — 코드 예제가 텍스트로 추출되지 않았습니다. [S1] + +## 💻 코드 패턴 (Code patterns) +추출되지 않음 — 원문의 라이브 코드 예제가 iframe에 있어 텍스트로 캡처되지 않았습니다. 재방문 시 브라우저 스크린샷 또는 별도 렌더링 도구로 재확인 필요. + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** unverified +- **출처 신뢰도:** B (W3Schools — widely used educational reference) +- **신뢰 점수:** 0.50 +- **중복 검사 결과:** 신규 생성 (New discovery) — 콘텐츠 불완전, 재검증 필요. + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[W3Schools HOW TO]] +- **관련 개념:** [[HOWTO CSS Fading Buttons]], [[HOWTO CSS Transition Hover]], [[HOWTO CSS Zoom Hover]] +- **참조 맥락:** CSS Buttons 섹션. + +## 📚 출처 (Sources) +- [S1] W3Schools — How To - Animate Buttons — https://www.w3schools.com/howto/howto_css_animate_buttons.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from partial extraction of the W3Schools "How To - Animate Buttons" page — code examples not captured, flagged for re-verification (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Aspect_Ratio.md b/10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Aspect_Ratio.md new file mode 100644 index 00000000..1a60d8ea --- /dev/null +++ b/10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Aspect_Ratio.md @@ -0,0 +1,76 @@ +--- +id: howto-css-aspect-ratio +title: "How To - CSS Aspect Ratio" +category: "Web_Recipes" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["padding-top aspect ratio hack", "aspect-ratio property"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.83 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["howto", "css", "w3schools", "layout", "responsive"] +raw_sources: ["https://www.w3schools.com/howto/howto_css_aspect_ratio.asp"] +applied_in: [] +github_commit: "" +--- + +# [[HOWTO CSS Aspect Ratio]] + +## 🎯 한 줄 통찰 (One-line insight) +The classic aspect-ratio hack exploits a CSS quirk that trips up many developers the first time they see it: percentage `padding-top` on a block element is calculated relative to the PARENT'S WIDTH, not its own height — which is precisely why `padding-top: 56.25%` (9÷16) produces a perfect 16:9 box regardless of how wide the container actually is, before the modern `aspect-ratio` property existed to make the intent explicit and readable. [S1] + +## 🧠 핵심 개념 (Core concepts) +- **Percentage `padding-top` hack** — `padding-top: X%` on a full-width block is computed against the element's OWN WIDTH (since padding percentages always resolve against the containing block's width), so setting it to a ratio-derived percentage locks the height to a fixed proportion of the width. [S1] +- **Ratio-to-percentage formulas**: 1:1 → 100%; 16:9 → 56.25% (9÷16); 4:3 → 75% (3÷4); 3:2 → 66.66% (2÷3); 8:5 → 62.5% (5÷8). [S1] +- **`position: relative` + absolutely-positioned child** — needed if text/content must sit inside the ratio-locked box, since the box itself has no "real" height from content. [S1] +- **Modern `aspect-ratio` property** — `aspect-ratio: 3 / 2;` directly expresses the same intent in newer browsers (support from roughly Chrome 88 / Firefox 89 / Safari 15 / Edge 88), no padding math required. [S1] + +## 📖 세부 내용 (Details) +- 1:1 box: `.container { width: 100%; padding-top: 100%; position: relative; }`. [S1] +- Text inside a ratio-locked box: `.text { position: absolute; top: 0; left: 0; bottom: 0; right: 0; }`. [S1] +- Modern equivalent: `.container { aspect-ratio: 3 / 2; }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +없음 — 신규 레시피, 기존 문서와 모순되는 내용 없음. + +## 🛠️ 적용 사례 (Applied in summary) +16:9, 4:3, 3:2, 8:5 등 여러 비율을 padding-top 백분율로 구현하는 예제들이 원문에서 직접 나란히 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Legacy padding-top hack vs. modern aspect-ratio property (CSS): +```css +/* Legacy hack -- 16:9 */ +.container-legacy { + width: 100%; + padding-top: 56.25%; /* 9 / 16 */ + position: relative; +} + +/* Modern equivalent */ +.container-modern { + aspect-ratio: 16 / 9; +} +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference) +- **신뢰 점수:** 0.83 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[W3Schools HOW TO]] +- **관련 개념:** [[HOWTO CSS Fullscreen Video]], [[HOWTO CSS Image Responsive]] +- **참조 맥락:** CSS Layout & Positioning 섹션. + +## 📚 출처 (Sources) +- [S1] W3Schools — How To - Aspect Ratio — https://www.w3schools.com/howto/howto_css_aspect_ratio.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "How To - Aspect Ratio" recipe (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Block_Buttons.md b/10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Block_Buttons.md new file mode 100644 index 00000000..158ff3e9 --- /dev/null +++ b/10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Block_Buttons.md @@ -0,0 +1,67 @@ +--- +id: howto-css-block-buttons +title: "How To - Full Width (Block) Buttons" +category: "Web_Recipes" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["full width button CSS"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.78 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["howto", "css", "w3schools", "buttons"] +raw_sources: ["https://www.w3schools.com/howto/howto_css_block_buttons.asp"] +applied_in: [] +github_commit: "" +--- + +# [[HOWTO CSS Block Buttons]] + +## 🎯 한 줄 통찰 (One-line insight) +A ` `. [S1] +- CSS reveal: `.dropdown:hover .dropdown-content { display: block; }`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +없음 — 신규 레시피, 기존 문서와 모순되는 내용 없음. + +## 🛠️ 적용 사례 (Applied in summary) +"Button" 옆에 캐럿 아이콘 버튼을 붙여 마우스를 올리면 Link 1/2/3 드롭다운이 나타나는 예제가 원문에서 직접 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Pure-CSS hover dropdown attached to a caret button (CSS): +```css +.dropdown { position: absolute; display: inline-block; } +.dropdown-content { display: none; position: absolute; } +.dropdown:hover .dropdown-content { display: block; } +``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference) +- **신뢰 점수:** 0.82 +- **중복 검사 결과:** 신규 생성 (New discovery) + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[W3Schools HOW TO]] +- **관련 개념:** [[HOWTO CSS Dropdown]], [[HOWTO CSS Dropdown Navbar]], [[HOWTO CSS Button Group]] +- **참조 맥락:** CSS Buttons 섹션. + +## 📚 출처 (Sources) +- [S1] W3Schools — How To - Split Buttons — https://www.w3schools.com/howto/howto_css_button_split.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "How To - Split Buttons" recipe (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Center_Button.md b/10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Center_Button.md new file mode 100644 index 00000000..3ab08b24 --- /dev/null +++ b/10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Center_Button.md @@ -0,0 +1,74 @@ +--- +id: howto-css-center-button +title: "How To - Center a Button in DIV" +category: "Web_Recipes" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["center button CSS"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.8 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["howto", "css", "w3schools", "layout", "centering", "buttons"] +raw_sources: ["https://www.w3schools.com/howto/howto_css_center_button.asp"] +applied_in: [] +github_commit: "" +--- + +# [[HOWTO CSS Center Button]] + +## 🎯 한 줄 통찰 (One-line insight) +This recipe is the EXACT SAME three techniques as `[[HOWTO CSS Center Vertical]]` (absolute+translateY, absolute+translate both axes, flexbox), just applied to a `` as the child instead of a `

`. [S1] + +## ⚖️ 모순 및 업데이트 (Contradictions & updates) +- **일반 중앙 정렬 레시피와 완전히 동일한 기법**: `[[HOWTO CSS Center Vertical]]`에서 사용된 세 가지 기법(absolute+translateY, absolute+translate 양축, flexbox)이 대상 요소만 텍스트에서 버튼으로 바뀐 채 그대로 재사용된다는 점이 확인됨 — 중앙 정렬 기법이 자식 요소의 종류와 무관하게 동작함을 보여줌. [S1] + +## 🛠️ 적용 사례 (Applied in summary) +"Centered Button"이라는 버튼을 컨테이너 안에서 세로만, 또는 세로+가로 모두 중앙 정렬하는 예제가 원문에서 제시됨. [S1] + +## 💻 코드 패턴 (Code patterns) +Centering a button — identical technique to centering any element (CSS): +```css +.container { height: 200px; position: relative; } +.center { + position: absolute; + top: 50%; left: 50%; + transform: translate(-50%, -50%); +} +``` +```html +

+
+
+``` + +## ✅ 검증 상태 및 신뢰도 +- **상태:** draft +- **검증 단계:** conceptual +- **출처 신뢰도:** B (W3Schools — widely used educational reference) +- **신뢰 점수:** 0.80 +- **중복 검사 결과:** [[HOWTO CSS Center Vertical]]과 기법 중복 확인 — 별도 문서로 유지(대상 요소가 다른 별개 레시피 페이지). + +## 🔗 지식 그래프 (Knowledge Graph) +- **상위/루트:** [[W3Schools HOW TO]] +- **관련 개념:** [[HOWTO CSS Center Vertical]], [[HOWTO CSS Center Website]] +- **참조 맥락:** CSS Layout & Positioning 섹션. + +## 📚 출처 (Sources) +- [S1] W3Schools — How To - Center a Button in DIV — https://www.w3schools.com/howto/howto_css_center_button.asp + +## 📝 변경 이력 (Change history) +- 2026-07-04: Initial draft synthesized from the W3Schools "How To - Center a Button in DIV" recipe (Astra wiki-curation, P-Reinforce v3.1 format). diff --git a/10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Center_List.md b/10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Center_List.md new file mode 100644 index 00000000..a2e378aa --- /dev/null +++ b/10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Center_List.md @@ -0,0 +1,70 @@ +--- +id: howto-css-center-list +title: "How To - Center a List" +category: "Web_Recipes" +status: "draft" +verification_status: "conceptual" +canonical_id: "" +aliases: ["center ul li CSS"] +duplicate_of: "" +source_trust_level: "B" +confidence_score: 0.82 +created_at: 2026-07-04 +updated_at: 2026-07-04 +review_reason: "" +merge_history: [] +tags: ["howto", "css", "w3schools", "layout", "lists"] +raw_sources: ["https://www.w3schools.com/howto/howto_css_center-list.asp"] +applied_in: [] +github_commit: "" +--- + +# [[HOWTO CSS Center List]] + +## 🎯 한 줄 통찰 (One-line insight) +Centering a `