{"id":18839272,"url":"https://github.com/solareenlo/42cpp-module-01","last_synced_at":"2025-09-03T12:35:06.887Z","repository":{"id":93865653,"uuid":"370134365","full_name":"solareenlo/42cpp-module-01","owner":"solareenlo","description":"C++ practice 01 (stack, heap, pointer, reference, delete[], overload, stream)","archived":false,"fork":false,"pushed_at":"2021-06-13T06:50:59.000Z","size":3677,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-30T09:16:15.794Z","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-23T18:57:20.000Z","updated_at":"2021-06-13T06:51:01.000Z","dependencies_parsed_at":"2023-03-08T12:45:36.400Z","dependency_job_id":null,"html_url":"https://github.com/solareenlo/42cpp-module-01","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solareenlo%2F42cpp-module-01","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solareenlo%2F42cpp-module-01/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solareenlo%2F42cpp-module-01/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solareenlo%2F42cpp-module-01/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solareenlo","download_url":"https://codeload.github.com/solareenlo/42cpp-module-01/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239774333,"owners_count":19694700,"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:37.231Z","updated_at":"2025-02-20T04:18:54.752Z","avatar_url":"https://github.com/solareenlo.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 42cpp-module-01\n- [What is the meaning of having void in the constructor definition?](https://stackoverflow.com/questions/693652/what-is-the-meaning-of-having-void-in-the-constructor-definition)\n\n### ex00\n- オブジェクトをスタック保存かヒープ保存か\n- [引数1個のコンストラクタの暗黙呼び出しとexplicit](http://exlight.net/devel/cpp/explicit.html)\n\n### ex01\n- ヒープ保存の消し忘れによるメモリーリーク\n- delete\n\n### ex02\n- オブジェクトのスタックとヒープの練習\n- [静的キャスト](https://docs.oracle.com/cd/E19957-01/805-7887/6j7dsdhg4/index.html)\n- [動的キャスト](https://docs.oracle.com/cd/E19957-01/805-7887/6j7dsdhg5/index.html)\n\n### ex03\n- コンストラクタのオーバーロード（多重定義）\n- オブジェクト配列の delete の仕方\n- [deleteとdelete[ ]の違い](https://superactionshootinggame4.hatenablog.com/entry/2018/01/26/135038)\n\n### ex04\n- ポインタと参照\n  - ポインタとは，他の変数のメモリアドレスを保持する変数のことです．ポインタが指すメモリ位置にアクセスするためには，`*` 演算子を用いてポインタを参照解除する必要があります．\n  - 参照変数とは，エイリアス，つまりすでに存在する変数の別の名前のことです．参照は，ポインタと同様に，オブジェクトのアドレスを格納することでも実装されます．参照は，自動インダイレクト機能を持つ定数ポインタ（定数値へのポインタと混同してはいけません！）と考えることができます．つまり，コンパイラが `*` 演算子を適用してくれるということです． \n- [Pointers vs References in C++](https://www.geeksforgeeks.org/pointers-vs-references-cpp/)\n\n### ex05\n- アドレスを文字列に変換する\n- [Convert “this” pointer to string](https://stackoverflow.com/questions/7850125/convert-this-pointer-to-string)\n\n### ex06\n- コンストラクタにおける参照型の初期化方法\n- [Initialising reference in constructor C++](https://stackoverflow.com/questions/6576109/initialising-reference-in-constructor-c)\n- 参照とポインタの違い\n  - 初期化時のみ参照先を指定でき，その後変更することができない．\n  - なので，参照には明示的に const を付ける．\n  - 参照自身のアドレスを獲得できない．\n  - [第16回目 参照、それはポインタと同じ？違う？](https://theolizer.com/cpp-school1/cpp-school1-16/)\n- なので，オブジェクト内で NULL の状態があり得るオブジェクトはポインタで確保しておく\n\n### ex07\n- [[C++] ifstreamでファイルを読む際のファイル存在チェック](https://qiita.com/yohm/items/91c5180d9c6d427b22d0)\n- ifstream: ファイルに対する入力ストリーム\n- ofstream: ファイルに対する出力ストリーム\n- [std::basic_string::append](https://cpprefjp.github.io/reference/string/basic_string/append.html)\n- [std::basic_string::find](https://cpprefjp.github.io/reference/string/basic_string/find.html)\n- [std::basic_string::replace](https://cpprefjp.github.io/reference/string/basic_string/replace.htmlf)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolareenlo%2F42cpp-module-01","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolareenlo%2F42cpp-module-01","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolareenlo%2F42cpp-module-01/lists"}