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
odanado
May 10, 2017
220
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
Transcript
17 slides
ୈ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
More Decks by odanado
See All by odanado
Vitest Browser Mode への期待 / Vitest Browser Mode
odanado
3
5.8k
@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
440
ブロックチェーンアプリのトランザクションに対するデータ分析 / PyCon-JP-2019
odanado
0
470
スマートコントラクトに対する既知の攻撃とその対策 / bc.tokyo-21
odanado
0
300
最近のweb3.js事情 / bc.tokyo-19
odanado
2
590
YAPC::Tokyo 2019に スタッフ参加してみて / kichijojipm-18
odanado
1
2.4k
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
460
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
450
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Rails Girls Zürich Keynote
gr2m
96
14k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
121
130k
Paper Plane
katiecoart
PRO
6
55k
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
Fireside Chat
paigeccino
43
4.1k