C++
|
|
C 프로그래밍 언어는 1969년 ~ 1973년 사이에 켄 톰슨과 데니스 리치가 벨 연구소에서 일할 당시 새로 개발된 유닉스 운영 체제에서 사용하기 위해 만든 프로그래밍 언어이다. 켄 톰슨은 BCPL언어를 필요에 맞추어 개조해서 "B"언어(언어를 개발한 벨 연구소의 B를 따서)라 명명했고, 이 B언어에서 C언어가 탄생했다. 유닉스 시스템의 바탕 프로그램은 모두 C로 쓰여졌고, 많은 운영 체제의 커널도 또한 C로 만들어졌다. 오늘날 많이 쓰이는 C++는 C에서 객체 지향형 언어로 발전된 것이다. 또 다른 다양한 최신 언어들도 그 뿌리를 C에 두고 있다.
C++는 AT&T 벨 연구소의 비야네 스트롭스트룹이 1983년 발표하여 발전한 프로그래밍 언어이다. C 언어의 문법을 대부분 사용할 수 있으며, 객체지향성이 더해진 C 언어의 확장형이라고 생각할 수도 있다.
About C/C++
C++의 경우 코드에서 버전을 확인하는 방법은 __cplusplus
매크로를 확인하면 된다. 또는 Boost:Config를 사용해도 된다.
ANSI/ISO Standard C
1983년, 미국 규격 협회(American National Standards Institute, ANSI)는 C 언어의 표준을 제정하기 위해 X3J11이라는 위원회를 열었습니다. 매우 긴 기간동안 토론한 끝에 이 위원회의 보고서는 1989년 12월 14일 ANSX3.159-1989라는 이름으로 비준받아서, 1990년에 출판되었습니다. 대부분의 내용은 기존의 C 언어에서 가져온 것이며, 몇몇은 C++에서 (대부분 함수 prototype에 대한 것) 가져온 것입니다. 그리고 (논쟁의 여지가 있던 3중 음자(trigraph) 문자 시퀀스를 포함한) 다국적 문자 세트를 지원하는 기능도 포함시켰습니다. ANSI C 표준은 C run-time 라이브러리도 표준화시켰습니다. 그 후에 국제 표준 기구인 ISO는 미국 표준인 X3.159를 ISO/IEC 9899:1990으로 대체하여 국제 표준으로 만들었습니다. 이 표준에서는 ANSI의 표준을 정정하고 보충한 것이 대부분이었기 때문에 흔히 'ANSI/ISO 9899-1990' [1992] 라고 부릅니다.
1994년 'Technical Corrigendum 1(TC1)'은 표준에서 약 40 가지를 수정하였습니다. 대부분 수정은 부분적으로 명확한 설명이 필요한 것에 보충 설명을 단 것입니다. 그리고 'Normative Addendum 1(NA1)'은 약 50 페이지 분량의 새로운 개념을 추가했으며, 거의 대부분이 국제화(internationalization)에 관한 함수 설명입니다. 1995년 TC2는 몇가지 정정 사항을 추가했습니다.
이 글을 쓸 때, 표준의 완전한 개정판은 이제 막바지 작업에 들어 갔습니다. 새로운 표준은 현재 "C9X"라고 이름이 붙었고, 1999년 말에 완성될 거라는 뜻을 나타냅니다. (이 글의 많은 부분도 새로운 C9X를 반영하려고 수정되었습니다.)
오리지널 ANSI 표준은 많은 부분에서 결정한 부분에 대한 설명과, 작은 문제들에 대한 논의를 포함한 "Rationale (이론적 해석)"을 포함하고 있습니다. 몇 가지는 이 글에 이미 포함되었습니다. (Rationale 자체는 ANSI 표준 X3.159-1989에 포함된 부분이 아니지만 정보 제공 목적으로만 제공되는 것이며, ISO 표준에 포함되는 내용도 아닙니다. C9X 용으로 새 판이 준비되고 있는 상황입니다.)
A언어부터 C언어까지
C언어의 C는 약간의 의미를 가지고 있다. 이는 프로그래밍 언어의 역사와도 관련이 되어 있다. 통상 A언어부터 B언어, C언어, D언어 순으로 발전해 왔다고 일컬어진다.
- A언어
- 과거에는 ALGOL을 의미했다 (ALGOL은 Algorithm Language의 약자로, 알고리즘 연구개발을 위해 만들어졌다).
- 현재는 특정 프로그래밍 언어를 지칭한다기 보다, 구조화된 프로그래밍 언어를 지칭하는 용어로 이용한다.
- B언어
- 켄 톰슨(Ken Thompson)이 DEC사의 PDP-7으로 어셈블리어로 유닉스라는 운영 체제를 만들게 되었는데, 이후 이 운영 체제를 고급언어로 다시 만들기 위해 마틴 리차드(Matin Richards)의 BCPL(Basic CPL, CPL = COmbined Programming Language)을 바탕으로 B라는 언어를 만들게 되었다.
- 이 언어는 자료형이 없었는데, 이는 C언어를 만드는 계기가 되었다.
- C언어
- 켄 톰슨이 만든 B언어를 보고, 그의 동료였던 데니스 리치가 1972년에 B언어에 데이터 유형 개념을 추가하여 만든 언어이다.
- 이후 유닉스의 구현언어로 B언어를 제치고 C언어가 채택되면서 이듬해인 1973년에 C언어로 구현된 유닉스가 만들어지게 되었다.
C++11
C++ 11(C++0x라고도 알려짐)은 ISO가 2011년 8월 12일에 승인한 C++ 프로그래밍 언어의 최신판이다. 2000년대의 한 시점에 공개될 것으로 예상해 C++0x으로 불려 왔으나, 2011년에야 국제표준으로 확정되면서 최종적으로 C++11로 이름이 확정되었다.
C++11은 핵심 언어에 여러가지를 추가하고 C++ 표준 라이브러리를 확장하고, C++ 기술 보고서 1(TR1)의 라이브러리의 수학적 특수 함수의 라이브러리 예외를 통합했다. C++11은 ISO/IEC 14882:2011라고 출판되었다.
참고로 버전을 확인할 수 있는 코드는 아래와 같다. 1
#if defined(_MSC_VER) && (_MSC_VER < 1800)
# error "This project needs atleast Visual Studio 2013"
#elif (__cplusplus <= 199711L)
# error "This project can only be compiled with a compiler that supports C++11"
#endif
C++14
C++14 is the informal name for the most recent revision of the C++ ISO/IEC standard, formally "International Standard ISO/IEC 14882:2014(E) Programming Language C++".
- Working Draft, Standard for Programming Language C++
-
N3797.pdf - http://open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3797.pdf
C++17
- Wikipedia (en) C++17
- [추천] Stackoverflow: What are the new features in C++17? 2
- Slideshare - C++17 Key Features Summary - Ver 2
C++17 (also called C++1z) is the informal name for the future revision of the C++ ISO/IEC standard. The specification for the C++17 revision is speculated to be finished in 2017.
C++20
- All C++20 core language features with examples | Oleksandr Koval’s blog - C++20의 주요 기능들 - 예제와 함께 정리
- Concepts
- Modules
- Coroutines
- Three-way comparison
- Lambda expressions
- Constant expressions
- Aggregates
- Non-type template parameters
- Structured bindings
- Range-based for loop
- Attributes : [[likely]] , [[unlikely]] , [[no_unique_address]] , [[nodiscard]]
- Character encoding : char8_t
- Sugar
- constinit
- Signed integers are two’s complement
- VA_OPT for variadic macros
- Explicitly defaulted functions with different exception specifications
- Destroying operator delete
- Conditionally explicit constructors
- Feature-test macros
- Known-to-unknown bound array conversions
- Implicit move for more local objects and rvalue references
- Conversion from T* to bool is narrowing
- Deprecate some uses of volatile
- Deprecate comma operator in subscripts
Table of C Programming Language
Compilers | Borland Turbo C, Clang, GCC, LCC, Pelles C, PCC, TCC, Visual C++ (C++/CLI, C++/CX), Watcom C/C++ compiler |
Libraries | C standard library, glibc, dietlibc, uClibc, Newlib, EGLIBC, Bionic |
Features | String, Syntax, Preprocessor, Variable types and declarations, Functions |
Select descendants |
C/C++ Curriculum
개인적인 C/C++ 교육과정은 프로그래밍 패러다임 (Programming Paradigms)에 맞춰 진행하는 것이 좋을 듯 하다. (또는 프로그래밍 언어 (Programming language)를 참조)
# | Keyword | 패러다임 | 대표언어 | 설명 |
1 | compiler | - | 컴파일 순서. | |
2 | #define | - | - | 전처리(지연 평가 ;Lazy evaluation)적용. |
3 | int, float | - | - | 정적타입언어. |
4 | if, while | Pascal | GOTO문 제거 및 순차, 선택, 반복문 | |
5 | array | Ada, BASIC, MATLAB | 배열의 필요성 | |
6 | function | - | - | 함수 작성 방법 |
7 | pointer | - | - | 포인터 사용 방법 |
8 | C언어 | C | ||
9 | class | 클래스 사용방법 | ||
10 | template | C++ | 템플릿 사용방법 | |
11 | try | 예외처리 | ||
12 | lambda | 람다 표현식 | ||
13 | - | 추가 패러다임 |
Other
참조할만한 프로그래밍 패러다임:
Category
- Compilation process: 컴파일 순서.
- Inline assembler (Assembly)
- C data types - C 자료형 및 Standard Data Type Limits
- C++:new
- C++:const
- C++:cout
- C++:loop
- C++:pointer: Function pointer, Member pointer, etc...
- C++:friend
- C++:struct
- C++:static
- C++:switch
- C++:template
- C++:typedef
- C++:inline (Assembly result 출력후 비교)
- C++:namespace
- C++:volatile
- C++:literal
- C++:explicit
- C++:virtual
- C++:Exception & C++:throw
- C++:Type: C++ Type에 대한 설명. References Type 포함.
- C++:VariadicArguments: 가변인자에 대한 설명.
- C++:Encoding: 문자열 인코딩에 대한 설명.
- C++:Memory: 메모리에 대한 설명.
- Access modifiers: 접근 제어자 or 접근 한정자 (e.g. private)
- C++:Casting
- C++:DiggraphSequence: 이중자에 대한 설명.
- C++:TrigraphSequence: 삼중자에 대한 설명.
- C++:SecureProgramming: 보안 프로그래밍
- C++:Preprocessor: C++:define C++:Macros
- C++:RealNumber: 실수형 (float, double)
- C++:Operator
- C++:OperatorPprecedence: 연산자 우선순위
- C++:RTTI
- C++:BitwiseOperators: 비트연산자.
- C++:BitHacks: 비트 연산 팁&트릭
stdcall
, cdecl
등)에 대한 설명. C++0x & C++11
- C++:alignas & C++:alignof & align_malloc
- C++:typeid & C++:typeof
- C++:Lambda
- C++:Container 3
- C++:Tip & C++:Optimization
- C++:Thread
- C++:Constexpr
- C++:Decltype
- C++:UniformInitialization
- C++:Array
- C++:MemberFunctions
- C++:AttributeSpecifierSequence:
[[noreturn]]
과 같은 속성 지정. - C++:CallingConvension
- C++:RangeBasedFor
- C++:Auto
- C++:static_assert
- C++:MoveSemantics
- C++:Rvalue
- C++:ParameterPack
- C++:PerfectForwarding
- C++:Functor
- C++:Enumeration
- C++:Range-basedForLoops
- C++:Override
- C++:Delete
- C++:Using
- C++:Nullptr
- C++:Inheritance
- C++:Mutable
- C++:ReferenceDeclaration
- C++:noexcept
- C++:Ref-qualifiers or 레퍼런스 한정자 (Reference qualifier).
- 타입 추론 or 형식 연혁 (Type Deduction)
Programming Tip & Guide
- C++:Console:
C++:Interrupt내용을 병합. - C++:Troubleshooting
- CodingGuidelines:C++: C++ 코딩 가이드 라인.
- POSIX C Library
- 엔디언 (Endianness)
- EASTL
- Socket programming (Network socket)
- Segmentation fault and Stacktrace
- FileCopy
- Design pattern
- Temp
- Secure Coding (Key store 항목에 OS별 보안키 저장소를 확인할 수 있다)
Examples
- C++:Example:DigitsCount: 10진수 정수형 숫자의 자릿수 찾는 방법.
- C++:Example:NumberSquare: 숫자 사각형
- C++:Example:StarTower: 별탑 쌓기
- C++:Example:BreakPoint: C 코드에서 브레이크 포인트 찍기.
Build tools
- cmake
- ninja
- autotools
- Cosmopolitan libc - C코드를 어디서든 실행가능하게 만들어주는 라이브러리.
- meson
Package Management
- Conan - software package manager for C and C++ developers
- vcpkg (Microsoft; C++ Library Manager for Windows, Linux, and MacOS)
Build speed
- [추천] Faster C++ builds 4
- Unity builds
- FASTBuild
- icecream
- gold (linker)
Profile tools
- valgrind
- cppcheck
- sanitizers
C/C++ Example
- 구구단 (Multiplication table)
- 골뱅이 숫자 배열 (Tornado Array)
- 선택 정렬 (Selection Sort)
- 스택 (Stack)
- 큐 (Queue)
- C++:UpgradeSelf: 실행된 Exe파일을 업데이트 하는 방법.
Libraries
- Windows Api (Win32)
- OpenCV
- Boost
- Folly (Facebook)
- Win32
- HPX
- openFrameworks
- Cinder
- libvlc
- FFmpeg
- libcxx
- stb
- LibSourcey: LibSourcey is a collection of cross platform C++11 modules and classes that provide developers with an arsenal for rapidly developing high performance network based p2p and media streaming applications.
- GNU C Library
- LEMON (graph library)
- MFC
Logging
- Quill Logging Library
- glog
- spdlog
- PlatformLab NanoLog
- MS BinLog
- Reckless
- Iyengar NanoLog
- g3log
- Boost.Log
TUI
GUI
Single file
- Github - single_file_libs Single-file public-domain/open source libraries with minimal dependencies
- Github - clibs/clib (Packages)
- List of all CCAN modules
Animation
- Ozz-animation: open source c++ 3d skeletal animation library and toolset.
- Choreograph: A simple, modern C++ animation and timing library.
Network/http
- Poco
- cpp-netlib
- Casablanca (RESTful)
- nanomsg
- zeromq
- cpp-httplib - A C++11 single-file header-only cross platform HTTP/HTTPS library.
lockfree
- Awesome Lock-Free
- The Top 32 Lock Free Open Source Projects
- Mintomic - A Small, Portable Lock-Free API
- LMAX Disruptor - High Performance Inter-Thread Messaging Library
- Boost.Lockfree - Boost lock-free data structures.
- ConcurrencyKit - Concurrency primitives.
- Folly - Facebook Open-source Library (has good implementation of MPMC queue).
- Junction - Concurrent data structures in C++.
- MPMCQueue - A bounded multi-producer multi-consumer lock-free queue written in C++11.
- SPSCQueue - A bounded single-producer single-consumer wait-free and lock-free queue written in C++11.
- Seqlock - Implementation of Seqlock in C++.
- Userspace RCU - liburcu is a userspace RCU (read-copy-update) library.
- libcds - A C++ library of Concurrent Data Structures.
- Lockless - Lockless Performance
- liblfds - portable, license-free, lock-free data structure library written in C.
- DKit - C++ Library of Atomic and Lockless Data Structures
- Microsoft L4 HashTable - L4 (Lock-Free on Read) Hashtable is a C++ library that implements hash table with arbitray byte stream keys/values.
- xenium - A C++ library providing various concurrent data structures and reclamation schemes.
Memory Allocator
- mtrace (glibc debugging)
- Thread-Caching Malloc (TCMalloc; Google Performance Tools)
- jemalloc
- nedmalloc
Mathematical
- C++ Mathematical Expression Library
- muparserx
- Eigen: Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.
- xtensor
- FLENS: Flexible Library for Efficient Numerical Solutions
- OpenBLAS
- NumCpp: C++ implementation of the Python Numpy library
Debugging
- Visual Leak Detector
- Github - tracy: A thread-safe stack trace and error propagation utility for C
Database
- Github - sqlpp11 - A type safe SQL template library for C++
- Github - lmdb++ - C++11 wrapper for the LMDB embedded B+ tree database library.
- LiteSQL - C++ Object-Relational Persistence Framework
- LiteSQL - C++14 ORM framework - C++ Object-Relational Persistence Framework (위의 LiteSQL와는 다르다)
- Github - SOCI - The C++ Database Access Library. This is official repository the SOCI project.
- ODB: C++ Object-Relational Mapping (ORM) (License 주의)
- DQuest - The C++ ORM (Object-relational mapping) for Qt framework.
Entity System
Graphic
- SDL
- SFML
- TGUI
- Github - tinygizmo - An immediate mode 3D gimzo (translation, rotation, scale for scene editing) in ~1200 LoC
- Github - SimpleRenderEngine - Small C++14 render engine
- Github - bgfx - Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.
- Github - DiligentEngine - A modern cross-platform low-level graphics library and rendering framework
- Github - magnum - Lightweight and modular C++11/C++14 graphics middleware for games and data visualization
- Github - Visionaray - A C++ based, cross platform ray tracing library
- Github - OpenSceneGraph
Modeling
GIS
- CGAL
- Github - iTowns - A Three.js-based framework written in Javascript/WebGL for visualizing 3D geospatial data
- Github - vts-browser-js - JavaScript WebGL 3D maps rendering engine
- GeoIP - 국가별 IP 주소 확인.
Vector graphic
Audio
- RtAudio - A set of C++ classes that provide a common API for realtime audio input/output across Linux (native ALSA, JACK, PulseAudio and OSS), Macintosh OS X (CoreAudio and JACK), and Windows (DirectSound, ASIO, and WASAPI) operating systems.
- PortAudio - PortAudio is a free, cross-platform, open-source, audio I/O library. It lets you write simple audio programs in 'C' or C++ that will compile and run on many platforms including Windows, Macintosh OS X, and Unix (OSS/ALSA). It is intended to promote the exchange of audio software between developers on different platforms. Many applications use PortAudio for Audio I/O.
- Libnyquist - Cross platform C++11 library for decoding audio (mp3, wav, ogg, opus, flac, etc)
- libsoundio - C library for cross-platform real-time audio input and output
- mini_al - Single file audio playback and capture library
- SoLoud - SoLoud is an easy to use, free, portable c/c++ audio engine for games.
Parallel computing
Coroutine
Asynchronous programming
- Userver - C++용 비동기 프레임워크
Process manager
Software metric
Sequence alignment
Compiler
Software Updater
Performance
Bundling
Terminal game programming
- Youtube - C++ console game
- Youtube - C++ "Dash" ASCII Game with Source Code
- ncurses
- BearLibTerminal
- Termbox
- libmabuff
- libtcod
- TinyCurses
String
Typing
- msinttypes - MS 의 INT Type 집합 모음.
Embedding language
Optimization
- Arithmetic logic unit: CPU 산술 연산에 대한 설명.
- Program optimization
- GCC:Optimization
- Small String Optimization (SSO)
- Memory pool
- CPU cache
- 동시성 제어 (Concurrency control)
- Data structure alignment
- Strength Reduction
- Duffs device
오버플로우 없이 2개 unsigned int의 평균 구하기
더해서 2로 나누는 것은 오버플로우가 발생: (a + b) / 2
- 둘중에 큰 수를 알면 두 값의 차이를 작은 수에 더해서 2로 나누는 것도 가능
-
low + (high - low) / 2
- 어떤게 큰 수인지 몰라도 가능한 알고리듬은 2016년에 특허가 만료됨
-
(a / 2) + (b / 2) + (a & b & 1)
- SWAR - SIMD within a register
-
(a & b) + (a ^ b) / 2
- 컴파일러가 64비트를 지원한다면 캐스팅
-
((unsigned long long)a + b) / 2
Samples
재사용 가능 소스코드
- cpp-sample-arg_parser.110921.zip
- Win32, Blackhole
- main 함수로 넘어오는 Command line 문자열을 분석하는 클래스
- cpp-sample-BBitmap.zip
- Win32, Roadie
- Bitmap 파일을 읽을 수 있는 클래스 구현
- cpp-sample-console-rectangle.130313.zip
- Win32
- Win32 Console에서 사각형 그림을 그릴 수 있는 방법에 대한 샘플
- cpp-sample-DrawText.zip
- Win32, WinCE, Roadie
- WinCE에서 사용가능한 멀티라인(Multiline) 문자열 출력 메서드 구현
- cpp-sample-hddkey.zip
- Win32, KTX2
- Win32 API Socket Programming UDP/IP를 참조할 수 있는 클래스
- cpp-sample-Locker.zip
- Win32, KTX2
- Win32 API CRITICAL_SECTION의 클래스버전
- cpp-sample-MdbReader-v2.zip
- MFC, Roadie DAO
- DAO를 사용한
MS Access
*.MDB 파일 접근 클래스 구현. (version.2) 레코드 개수와 관련된 관련 버그 수정
- cpp-sample-SerialCommunication.zip
- Win32, KTX2
- 직렬포트 통신을 위한 클래스 구현
- cpp-sample-SimplexList.zip
- Win32, Roadie
- B+tree를 구현하기에 앞서, STL을 사용하지 않은 간단한 리스트(List) 클래스 구현
- cpp-sample-String.zip
- Win32, KTX2
- 의존성 없는 String Template 클래스
- cpp-sample-thread-win.121101.zip
- Win32, Roadie
- Win32용 Thread 클래스
- cpp-sample-Timer.zip
- Win32, WinCE, Roadie
- 시간을 위한 클래스 구현
Terms
- 전방 선언 (Forward declaration)
- 전방 선언은 헤더 포함 의존성을 최소화하기 위해 사용한다.
- Function template vs Template function
- Function template은 함수를 위한 템플릿, Template function은 템플릿에 의해 만들어진 함수. Class template 와 Template class도 동일하게 적용된다.
- Argument vs Parameter
- 매개변수(parameter)와 전달인자(argument)
- Wikipedia (ko) 매개변수 (컴퓨터 프로그래밍)
- Parameter(매개변수)는 함수를 선언할 때 사용되는 변수의 이름, Argument(전달인자)는 함수를 호출하면서 전달하는 값을 의미한다.
- 종종 매개변수(parameter)와 전달인자(argument)는 적당히 섞어서 쓰이기도 하는데, 이 경우 문맥에 따라 의미를 달리해서 해석되기도 한다. 하지만 엄밀히 말해서 매개변수는 함수의 정의부분에 나열되어 있는 변수들을 의미하며, 전달인자는 함수를 호출할때 전달되는 실제 값을 의미한다. 이같은 의미를 명확히 하기 위해 매개변수는 변수(variable)로, 전달인자는 값(value)으로 보는 것이 일반적이다.
- 매개변수는 함수의 정의 부분에서 볼 수 있으며, 전달인자는 함수를 호출하는 부분에서 볼 수 있다. f(x) = x*x와 같은 함수 정의 부분에서 변수 'x'가 매개변수가 되며, f(2)와 같은 함수 호출 부분에서 값 '2' 가 함수의 전달인자가 된다.
- 각각의 매개변수는 함수의 정의 부분에 포함되어 있는 고유한 특성이다. 예를 들어, (대다수의 언어에서는) 입력으로 들어온 2개의 정수를 더해서 합을 계산해 주는 함수의 경우 정수 형태의 매개변수 2개가 필요하다. 일반적으로 함수는 몇개의 매개변수를 가지든 상관없으며, 매개변수가 하나도 없을 수도 있다. 만약 함수가 매개변수를 가질 경우, 각각의 매개변수에 대한 정의를 나열해 놓은 것을 매개변수 목록(parameter list) 이라고 한다.
- 반면 전달인자는 함수가 호출될때 제공되는 값들을 말하며, 함수 정의의 한 부분으로 바뀌지 않는 매개변수와는 달리 호출 할 때마다 값이 바뀔 수 있다. 함수를 호출하는 부분에서 전달인자를 나열해 놓을 것을 전달인자 목록(argument list) 이라고 한다.
- Parameter pack
- Variadic Template에서 "
...
"을 가리킨다.
- Variadic arguments
- 가변인자.
- Race condition (Data race)
- 공유 자원에 대해 여러 개의 프로세스가 동시에 접근을 시도하는 상태.
- Structured Exception Handling (SEH)
- Windows OS에서 사용하는 구조적 예외 처리 기법.
Conference
- CppCon
- C++ and Beyond
- Meeting C++
- The ACCU Conference
- C++Now
Documentation
C/C++과 관련된 참고문서 등을 정리한다.
- ISO/IEC 14882:2011 Programming Language C++ - draft
- http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf (N3242.pdf)
- http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/n4606.pdf
- http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/n4618.pdf
- ISO/IEC 144882 C/C++ Standard (1998)
-
Cpp_standards_by_the_international_standards_organization.pdf - 1998년에 제정된 ISO/IEC 144882 C/C++ 표준 스팩 문서. 최근 컴파일러들은 모두 이 스팩 문서를 바탕으로 하여 C/C++ 문법을 컴파일한다. C/C++을 공부하는 사람이라면 누구나 한번쯤은 꼭 읽어 보아야 할 문서이다.
- ISO/IEC 9899 C Standard (1999)
-
Iso-c-fdis_(1999-04).pdf - 1999년에 제정된 ISO/IEC 9899 C언어 표준 스팩 문서. ANSI 이후에 C++ 문법이 정리되면서 동시에 C 문법도 같이 정리되었다. 예를 들어 ANSI C에서는 주석으로
/* */
밖에 쓸 수 없었으나 9899에서는//
도 주석으로 쓸 수 있다.
- C/C++ Pointer
-
C,Cpp_Pointer.pdf - C++와 포인터의 문법에 대해 정리한 128페이지짜리 문서. 포인터의 기본 개념에서부터 시작하여 포인터와 배열과의 관계, 함수 호출 방법, 포인터를 인수로 취하는 함수들의 내부적인 동작까지 상세하게 설명하고 있다.
- The C Programming Language 2nd edition (Ritchie, Kernighan)
-
The_C_Programming_Language_(Ritchie,_Kernighan).pdf - 커니건, 리치의 유명한 책 C Programming Language 제2판. ANSI C에 가장 충실한 교과서이며 C언어를 연구하는 사람이라면 누구나 한번쯤은 읽어봐야 할 책이다. 이 책의 첫번째 예제 hello world는 아주 유명한 프로그램이다.
- The C++ Programming Language 3rd edition (Stroustrap)
-
The_C++Programming_Language_3rd_edition(Stroustrap).zip - C++ 언어의 창시자인 스트로스트룹이 직접 쓴 C++ 언어 문법 설명서.
- C++ Primer Plus, 6th edition (2011)
-
Prata_S.-_Cpp_Primer_Plus,_6th_Edition(2011).pdf - 표준안에 매우 충실하며, 사소한것까지 꽤 자세하게 설명한다. 기본적으로 간단한 문법 소개서나 그 활용만 대충 알려주는 형태의 책이 아니라 사전에 가까운 형태의 책이기 때문에 처음 입문하는 사람에겐 어려울수도 있다.
- The GNU C Library Reference Manual
-
Database.sarang.net.7z
- Numerical Recipes in C - The Art of Scientific Computing - 2nd edition
-
Numerical_Recipes_in_C_-The_Art_of_Scientific_Computing-_Second_Edition.pdf - 수치연산과 관련된 함수의 C-언어 코드 모음.
- C++ Concurrency in Action: Practical Multithreading
-
CplusplusConcurrencyInAction.pdf - Boost:Thread 라이브러리 개발자들이 집필한 C++ 동시정 제어에 관련된 서적.
- CppConcurrencyInAction - 한글 번역
-
CppConcurrencyInAction-wiki-880ec15.tar.gz
-
- C Programming FAQs
- 번역 및 수정 - 신성국 (Seong-Kook Shin) - May 28, 2018
- http://cinsk.github.io/cfaqs/html/cfaqs-ko.html
-
Cinsk.github.io-cfaqs.tar.gz - Legacy:
C Programming FAQs (2014/02/13) 한국어판 - Legacy:
comp.lang.c Frequently Asked Questions - Legacy:
C-faq_com.zip, Cfaqs-ko.pdf
- Legacy:
- C++ Core Guidelines
- https://github.com/isocpp/CppCoreGuidelines
-
CppCoreGuidelines-63316bc.zip
- jwvg0425/ModernCppStudy - WIKI - Modern C++ Study
- https://github.com/jwvg0425/ModernCppStudy/wiki
-
Jwvg0425-ModernCppStudy.wiki.zip
- More C++ Idioms
- https://en.wikibooks.org/wiki/More_C%2B%2B_Idioms
- https://upload.wikimedia.org/wikipedia/commons/5/55/MoreCppIdioms.pdf
- Wikibooks.org_-_MoreCppIdioms.pdf (2017-01-25)
- C++ 코딩에 대한 42가지 답 (The Ultimate Question of Programming, Refactoring, and Everything)
- The Ultimate Question of Programming, Refactoring, and Everything
-
The_Ultimate_Question_of_Programming,Refactoring,_and_Everything-_Intel_Software.pdf
- C++ 주해서 버전 10.9.0
- https://c-annotationskr.sourceforge.io/
-
C-annotationskr.sourceforge.io-190921.zip
- Working Draft, Standard for Programming Language C++ (21 August 2010; revises N3092)
- http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3126.pdf
-
N3126.pdf
- C Programming FAQ (Korean)
- http://www.cinsk.org/cfaqs/
-
Cfaqs_ko.pdf
- ISO/IEC 14882:2011 C++11
- http://blog.naver.com/lykaonesis/130148401235
-
ISO-IEC-14882-2011.pdf
- 열혈강의 최호성의 C 프로그래밍 - 메모리와 디버깅은 배신하지 않는다
- https://cafe.naver.com/windev/7880
-
ISBN_9788965400172.pdf
See also
Favorite site
- [추천] Open-std: The C++ Standards Committee
- Wikipedia (en) C++11에 대한 설명
- Wikipedia (en) C data types (format specifier)
- IT문화원 강좌: C언어 이야기 (C언어 기초)
- Incompatibilities Between ISO C and ISO C++
Guide
- IBM 윈도우에서 유닉스로 이식하기, Part 1: C/C++ 이식 (한글)
- KLDP 포인터가 4바이트인 이유는? (포인터 및 자료형과 관련된 토론 스레드)
- KLDP 운영체제마다 다른 wchar_t? (wchar_t에 대한 토론 스레드)
- C 소스의 전체 컴파일 과정
- Clear the screen
- GetACodeer: Need a C++ / C Programmer?
Online Tools
- [추천] Compiler Explorer (godbolt) - 각 코드와 어셈블리를 라인별로 구분 해주고 연동됩니다. 여러 언어 지원.
- Quick C++ Benchmark - C++ 의 벤치마크를 온라인에서 즉석 비교
- C++ Insights - C++ 이 어떻게 컴파일 되는지 확인할 수 있다.
- [추천] LeetGPU - Only platform to write and run CUDA code. Without a GPU. For Free. (온라인에서 무료로 CUDA 코드 돌리는 사이트)
Awesome
- [추천] Awesome C++ 10 (C/C++ 관련 라이브러리 추천 등)
C++11
C/C++ Parser
- How Clang handles the type / variable name ambiguity of C/C++
- OpenC++ is C++ frontend library (lexer+parser+DOM/MOP) and source-to-source translator
- Clang AST parsing for automated code generation
- GCC-XML (There is one open-source C++ parser, the C++ front-end to GCC, which is currently able to deal with the language in its entirety)
Programming guide/tutorial
- C++11: 스레드 라이브러리 둘러보기
- MSDN: C++의 진화(최신 C++)
- ZDNet: C언어의 진화: 최신 C 표준 C99
- [추천] Joinc: C 프로그래밍 언어
- C++ Template Note
- [추천] 강좌: C 언어 코딩 도장
- [추천] C코드 최적화 15
Other issue
- Wikipedia (en) Comparison of Java and C++
- Performance comparison C++, C# and Java
- C++ Programming ~HOW-TO (C++ 메모리 관련 TIP 등) 16
- [추천] 오픈 소스 c++라이브러리 목록 1718
- [추천] 프로그래밍 성능 향상을 위한 C/C++ 튜닝 19
- Modern C++ 프로그래머를 위한 안내서: Return value optimization
- C++ - C++의 dangling 검출, 제안 문서 버전 1.0 공개
References
-
What_are_the_new_features_in_Cpp17_-_Stack_Overflow.pdf ↩
-
Rename STL:Container document. ↩
-
Faster_Cpp_builds_–_Bits_n_Bites.pdf ↩
-
Incompatibilties_Between_ISO_C_and_ISO_C++_(ko).pdf ↩
-
Old ver: Cplusplus_com-old.zip ↩
-
Cplusplus_com.zip ↩
-
Soenlab_com.7z ↩
-
HANB_Cpp_STL_Programming.pdf ↩
-
Fffaraz-awesome-cpp-README.md-6f80a64.zip ↩
-
C++11_FAQ_ko.pdf ↩
-
Cplusplus11_faq-Bjarne_Stroustup.pdf ↩
-
Stdcxx.apache.org.zip ↩
-
Writing_Efficient_C_and_C_Code_Optimization.pdf ↩
-
Milkywaygalaxy.freeservers.com-cpp_programming_howto.zip ↩
-
A_list_of_open_source_Cpp_libraries_-_cppreference.pdf ↩
-
Cpp_programming_tuned_to_improve_performance.pdf ↩