Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
第1回C++講習会 / intro-to-cpp-01
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
odanado
May 10, 2017
210
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
第1回C++講習会 / intro-to-cpp-01
odanado
May 10, 2017
More Decks by odanado
See All by odanado
Vitest Browser Mode への期待 / Vitest Browser Mode
odanado
3
5.7k
@nestjs/bull の活用について
odanado
0
1.6k
クラウド KMS の活用 / TOKYO BLOCKCHAIN TECH MEETUP 2022
odanado
0
1.4k
Vue.observable で状態管理 / vue-observable-state-management
odanado
4
2.2k
nuxtjs-axios-error-handling
odanado
0
420
ブロックチェーンアプリのトランザクションに対するデータ分析 / PyCon-JP-2019
odanado
0
460
スマートコントラクトに対する既知の攻撃とその対策 / bc.tokyo-21
odanado
0
300
最近のweb3.js事情 / bc.tokyo-19
odanado
2
580
YAPC::Tokyo 2019に スタッフ参加してみて / kichijojipm-18
odanado
1
2.4k
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
330
41k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
300
Balancing Empowerment & Direction
lara
6
1.3k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
42k
Chasing Engaging Ingredients in Design
codingconduct
0
340
Into the Great Unknown - MozCon
thekraken
41
2.8k
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
Everyday Curiosity
cassininazir
0
340
Transcript
ୈ1ճ ڝٕϓϩάϥϛϯάνʔϜ C++ߨशձ
C++ߨशձͷఔ ༰ උߟ 04/26 հ&ೖग़ྗ 05/03 ٳΈ ݑ๏ه೦ 05/10
ೖग़ྗͷ෮श ม,ԋࢉࢠ 05/17 ifͱfor PROGςετղઆ 05/24 ٳΈ(༧ఆ) PROGςετղઆ 05/31 ifͱforͷ෮श vector 06/07 set,map ୈ5ԋशࣨ 06/14 STLͷؔ 06/21 ෮शίϯςετ 06/28 ະఆ 07/05 ະఆ 07/12 ະఆ 07/19 ະఆ 1
C++ߨशձͷ༰ • جຊతʹਫ༵3ݶதʹऴΘΒͤΔ • 10෮श • 40࠲ֶ • 30ϛχίϯςετ •
εϥΠυࢿྉωοτʹެ։͍ͯ͠·͢ • https://goo.gl/F0tgM5 • ཁ େֶΞΧϯτ • Θ͔Βͳ͍͜ͱ͕͋ͬͨΒ ͲΜͲΜ࣭ͯ͠Ͷ 2
લճͷ෮श • AtCoderͱ͍͏αΠτʹొΛͨ͠ • https://atcoder.jp • ιʔείʔυͷఏग़ํ๏ͷ࿅शΛͨ͠ 3 ਖ਼ղ ෆਖ਼ղ
લճͷ෮श • λʔϛφϧͷ͍ํ 4 $ mkdir kyopro $ cd kyopro
$ mkdir lec01 $ cd lec01 $ code . ίϚϯυ໊ ҙຯ mkdir make directory σΟϨΫτϦ(ϑΥϧμ)Λ ৽ن࡞͢Δ cd change directory ݱࡏ͍ΔσΟϨΫτϦΛ มߋ͢Δ code Visual Studio Code Λ ىಈ͢Δ
લճͷ෮श • Visual Studio Codeͷ͍ํ • දࣔ(V) → ૯߹λʔϛφϧΛબ͢Δ •
ίϯύΠϧ&ϓϩάϥϜͷ࣮ߦํ๏ 5 $ g++ -std=c++14 test.cpp $./a.out test.cpp దٓࢦఆ͢Δ ϑΝΠϧΛม͑Δ
ࠓճͷ༰ • ϓϩάϥϜͷجຊ • ೖग़ྗ • cout • cin •
มͷ֓೦ • ԋࢉࢠ 6
ϓϩάϥϜͷجຊ 7 ͜ͷ2ߦ ͍ͭॻ͘
ೖग़ྗ • ը໘ʹจࣈΛग़ྗ͢Δ • cout Λ͏ 8
มͷ֓೦ • มͱ • ΛهԱ͢ΔೖΕ • هԱ͢Δ͚ͩͰͳ͘͠ࢉͱ͔ͷԋࢉ͕ग़དྷΔ 9 // a
ͱ͍͏໊લͷೖΕʹ 10ͱ͍͏σʔλΛهԱ͢Δ int a = 10; // ࣮ࡍʹग़ྗ͢Δ cout << a << endl;
มͷ֓೦ • มͱ • ΛهԱ͢ΔೖΕ • هԱ͢Δ͚ͩͰͳ͘͠ࢉͱ͔ͷԋࢉ͕ग़དྷΔ 10 // a
ʹ 10, b ʹ 20ΛهԱ͢Δ int a = 10; int b = 20; // c ʹ a ͱ b Λͨ݁͠ՌΛهԱ͢Δ int c = a + b; // 30 ͱग़ྗ͞ΕΔ cout << c << endl;
มͷ֓೦ • มͷܕ • ܕʹΑͬͯهԱग़དྷΔσʔλͷछྨ͕ҟͳΔ 11 ܕ໊ int ܕ 1,
10, 20 string จࣈྻܕ ”hello world” double ࣮ܕ 3.14 bool ཧܕ true, false // ܕ໊ ม໊ = ; ͱॻ͘ int a = 10;
ೖྗ 12 int a = 10; cout << a <<
endl; 10 Ҏ֎ͷΛग़ྗ͢Δʹϓϩάϥ ϜΛॻ͖͑Δඞཁ͕͋Δ ΩʔϘʔυ͔Βೖྗ int a; cin >> a; cout << a << endl;
ԋࢉࢠ • ͠ࢉҎ֎ʹԋࢉࢠ͕༻ҙ͞Ε͍ͯΔ • ͦͷҰ෦ • Ұཡ http://www.c-lang.org/operator.html 13 ༏ઌ
ه߸ ҙຯ 5 * ࢉ 5 / আࢉ 5 % ༨ࢉ 6 + Մࢉ 6 - ݮࢉ
ྫ • AtCoderͷABC004Λղ͍ͯΈ·͠ΐ͏ • http://abc004.contest.atcoder.jp/tasks/abc00 4_1 14
ϛχίϯςετ • AtCoder Virtual Contest ͱ͍͏αΠτ • https://not-522.appspot.com • ͜ͷαΠτʹొ͢Δඞཁ͕͋Γ
• https://not- 522.appspot.com/contest/565237302008 2176 15
·ͱΊ • ը໘ͷग़ྗʹcout Λ͏ • มͱΛهԱ͢ΔೖΕ • มʹରͯ͠͠ࢉͳͲ͕ग़དྷΔ • ΩʔϘʔυ͔ΒͷೖྗʹcinΛ͏
• ͠ࢉҎ֎ʹ৭Μͳԋࢉࢠ͕͋Δ 16