{"id":18839258,"url":"https://github.com/solareenlo/42cpp-module-02","last_synced_at":"2025-07-15T10:02:40.420Z","repository":{"id":93865662,"uuid":"370994213","full_name":"solareenlo/42cpp-module-02","owner":"solareenlo","description":"C++ practice 02 (Copy constructor, Operator overloading Fixed point number)","archived":false,"fork":false,"pushed_at":"2021-09-29T03:06:28.000Z","size":45,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-29T20:18:53.963Z","etag":null,"topics":["42","42born2code","42cursus","42projects","cpp"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solareenlo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-26T10:28:38.000Z","updated_at":"2022-06-02T01:22:24.000Z","dependencies_parsed_at":"2023-03-08T12:45:37.340Z","dependency_job_id":null,"html_url":"https://github.com/solareenlo/42cpp-module-02","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/solareenlo/42cpp-module-02","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solareenlo%2F42cpp-module-02","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solareenlo%2F42cpp-module-02/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solareenlo%2F42cpp-module-02/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solareenlo%2F42cpp-module-02/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solareenlo","download_url":"https://codeload.github.com/solareenlo/42cpp-module-02/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solareenlo%2F42cpp-module-02/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265426798,"owners_count":23763159,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["42","42born2code","42cursus","42projects","cpp"],"created_at":"2024-11-08T02:42:33.798Z","updated_at":"2025-07-15T10:02:40.363Z","avatar_url":"https://github.com/solareenlo.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 42cpp-module-02\n\n### ex03\n- [点と三角形の当たり判定( 内外判定 )](http://www.sousakuba.com/Programming/gs_hittest_point_triangle.html)\n- [How to determine if a point is in a 2D triangle? [closed]](https://stackoverflow.com/questions/2049582/how-to-determine-if-a-point-is-in-a-2d-triangle)\n- [const_cast conversion](https://en.cppreference.com/w/cpp/language/const_cast)\n\n### ex02\n- 静的メンバ関数\n- [C++で前置・後置インクリメント/デクリメント演算子をオーバーロードする](https://mickey24.hatenablog.com/entry/20081021/1224590753)\n- [演算子オーバーロード | Programming Place Plus　C++編【言語解説】　第１９章](https://programming-place.net/ppp/contents/cpp/language/019.html#conversion_op)\n\n### ex01\n- Fixed Point Number\n  - [Introduction to Fixed Point Number Representation](https://inst.eecs.berkeley.edu//~cs61c/sp06/handout/fixedpt.html)\n- ostream 演算子のオーバーロード（`\u003c\u003c`）\n  - [Stream extraction and insertion](https://en.cppreference.com/w/cpp/language/operators)\n  - [C++演算子オーバーロード大全 Shift](https://qiita.com/rinse_/items/9d87d5cb0dc1e89d005e#shift)\n```c++\nfloat fl = 3.25;\nstd::cout \u003c\u003c std::bitset\u003csizeof(float)*CHAR_BIT\u003e(*reinterpret_cast\u003cunsigned int*\u003e(\u0026fl)) \u003c\u003c std::endl;\n```\n\n### ex00\n- [コピーコンストラクタ](https://programming.pc-note.net/cpp/constructor2.html)\n  - A `copy constructor` is used to initialize a previously uninitialized object from some other object's data.\n  - 「デフォルトコピーコンストラクタ」と「自分で定義するコピーコンストラク」がある．\n  - デフォルトコピーコンストラクタは，自分と同じクラスのインスタンスを引数とするコンストラクタで，メンバ変数をすべてコピーしたものが新しく作られる．\n  - 自分で定義するコピーコンストラクタは，自分自身のインスタンスの参照を引数に受け取るコンストラクタのこと．\n  - コピーコンストラクの禁止を行うこともできる．\n- 代入演算子(`=`)\n  - An `assignment operator` is used to replace the data of a previously initialized object with some other object's data.\n- 演算子のオーバーロード（`=`）\n  - [基本クラスを指すポインタは、その派生クラスも指すことができる](http://www.ced.is.utsunomiya-u.ac.jp/lecture/2012/prog/p3/kadai3/virtualfunc2.php)\n\n## References\n### Coplien form\n- [Coplien form example C++](https://stackoverflow.com/questions/21219590/coplien-form-example-c)\n\n### Understanding Floating Point Numbers\nby Jeff Bezanson\n- Every programmer should understand enough about floating point numbers to avoid the pitfalls of assuming perfect precision.\n  - [Background: Accuracy vs. Precision](https://www.cprogramming.com/tutorial/floating_point/understanding_floating_point.html)\n  - [Floating Point Representation](https://www.cprogramming.com/tutorial/floating_point/understanding_floating_point_representation.html)\n  - [Bonus: Printing Floating Point Numbers Cleanly](https://www.cprogramming.com/tutorial/floating_point/understanding_floating_point_printing.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolareenlo%2F42cpp-module-02","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolareenlo%2F42cpp-module-02","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolareenlo%2F42cpp-module-02/lists"}