Learn C++ With Me #9 - Arrays

  Рет қаралды 71,276

Tech With Tim

Tech With Tim

Күн бұрын

Welcome back to the C++ for beginners tutorial series! This video will cover arrays! An array is a way to store multiple elements in the same variable, and they are extremely important to know how to use when coding. We'll create arrays, see the different types of arrays, distinguish between an array and a list, and more.
💻 AlgoExpert is the coding interview prep platform that I used to ace my Microsoft and Shopify interviews. Check it out and get a discount on the platform using the code "techwithtim" algoexpert.io/techwithtim
🔍 Playlist: • Learn C++ With Me
⭐️ Timestamps ⭐️
00:00 | Introduction
00:29 | Array vs. List
01:15 | What is an Array?
03:20 | Creating Arrays
09:03 | Indices and Accessing Array Elements
11:32 | Changing Array Elements
12:04 | Default Array Initialization
13:26 | Array Errors
16:06 | Different Types of Arrays
16:55 | Size of Arrays
◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️
💰 Courses & Merch 💰
💻 The Fundamentals of Programming w/ Python: tech-with-tim.teachable.com/p...
👕 Merchandise: teespring.com/stores/tech-wit...
🔗 Social Medias 🔗
📸 Instagram: / tech_with_tim
📱 Twitter: / techwithtimm
⭐ Discord: / discord
📝 LinkedIn: / tim-ruscica-82631b179
🌎 Website: techwithtim.net
📂 GitHub: github.com/techwithtim
🔊 Podcast: anchor.fm/tech-with-tim
🎬 My KZbin Gear 🎬
🎥 Main Camera (EOS Canon 90D): amzn.to/3cY23y9
🎥 Secondary Camera (Panasonic Lumix G7): amzn.to/3fl2iEV
📹 Main Lens (EFS 24mm f/2.8): amzn.to/2Yuol5r
🕹 Tripod: amzn.to/3hpSprv
🎤 Main Microphone (Rode NT1): amzn.to/2HrZxXc
🎤 Secondary Microphone (Synco Wireless Lapel System): amzn.to/3e07Swl
🎤 Third Microphone (Rode NTG4+): amzn.to/3oi0v8Z
☀️ Lights: amzn.to/2ApeiXr
⌨ Keyboard (Daskeyboard 4Q): amzn.to/2YpN5vm
🖱 Mouse (Logitech MX Master): amzn.to/2HsmRDN
📸 Webcam (Logitech 1080p Pro): amzn.to/2B2IXcQ
📢 Speaker (Beats Pill): amzn.to/2XYc5ef
🎧 Headphones (Bose Quiet Comfort 35): amzn.to/2MWbl3e
🌞 Lamp (BenQ E-reading Lamp): amzn.to/3e0UCr8
🌞 Secondary Lamp (BenQ Screenbar Plus): amzn.to/30Dtafi
💻 Monitor (BenQ EX2780Q): amzn.to/2HsmUPZ
💻 Monitor (LG Ultrawide 34WN750): amzn.to/3dSD7tS
🎙 Mic Boom Arm (Rode PSA 1): amzn.to/30EZw9m
🎚 Audio Interface (Focusrite Scarlet 4i4): amzn.to/2TjXsih
💸 Donations 💸
💵 One-Time Donations: www.paypal.com/donate?hosted_...
💰 Patreon: / techwithtim
◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️
⭐️ Tags ⭐️
- C++
- C++ Tutorial
- Tech With Tim
- Coding Tutorial
- Arrays
- C++ lists
⭐️ Hashtags ⭐️
#CodingTutorial #C++

Пікірлер: 83
@andreaspatounis5674
@andreaspatounis5674 3 жыл бұрын
Dude you are the only person that I don't skip the adds so that I support you.
@typeterson8376
@typeterson8376 3 жыл бұрын
I feel the need to say it each video, but I do appreciate these videos. You are a good man
@DatNguyen-vj1ro
@DatNguyen-vj1ro 3 жыл бұрын
Your content is really good for beginners who want to learn C++. I know C++ but could not teach it as well as you do
@lowpolygons8562
@lowpolygons8562 3 жыл бұрын
You have no idea how much i needed this thank you so much
@YarosMallorca
@YarosMallorca 3 жыл бұрын
I always thought that C++ is hard! But with your tutorials and prior C and Python experience it's not that hard as I thought! Thanks for making these tutorials!
@antonyanchev7112
@antonyanchev7112 3 жыл бұрын
Make a long one for pointers and references please
@ArshdeepSingh42108
@ArshdeepSingh42108 7 ай бұрын
This was really an awesome and detailed lecture 🙌
@funkuwest5967
@funkuwest5967 Жыл бұрын
Thank you... these videos are really helpful !!
@neontuts5637
@neontuts5637 3 жыл бұрын
Nice video Tim. Small tip - you can execute the c++ code inside the sublime text by creating a build system for it. Which will automatically compile and run the code.
@alexander_0749
@alexander_0749 3 жыл бұрын
hey can u plz tell me the build code? mine's not accepting any input
@michaelsilvers1260
@michaelsilvers1260 27 күн бұрын
@@alexander_0749 Yeah the build code is system.run(visual studio.exe). Lmao joking. I know ur comment is 3 years old, but thought I'd have some fun. No need to compile these days, eh?
@finnqni8563
@finnqni8563 3 жыл бұрын
I love your videos!
@coopernielsen1206
@coopernielsen1206 3 жыл бұрын
Your vids are amazing
@hectorflorespauner3404
@hectorflorespauner3404 3 жыл бұрын
great video as always, but what if want to do an array of arrays to define a matrix or so??
@vishvalorant
@vishvalorant Жыл бұрын
this channel is so underrated
@apoorvashukla3344
@apoorvashukla3344 3 жыл бұрын
Your the best!!!
@kamoliddinkadirov5720
@kamoliddinkadirov5720 Жыл бұрын
Amazing video.
@plsdosnatk
@plsdosnatk 3 жыл бұрын
Thanks!
@mdtousifakmal2801
@mdtousifakmal2801 3 жыл бұрын
Hey Tim, Pls make a video on Mastering Java Everything You need to know
@dkmi677
@dkmi677 22 күн бұрын
Thank u Tim
@codedecode1498
@codedecode1498 3 жыл бұрын
OMG FIRST HI TIM I LOVE YOUR CONTENT
@dallasdominguez2224
@dallasdominguez2224 3 жыл бұрын
tim is the GOAT
@yourdadsbestfriend7101
@yourdadsbestfriend7101 3 жыл бұрын
thanks tim
@Samcpfc
@Samcpfc 4 ай бұрын
I'm really curious as to why when you assign the size of your array to 'x' that it doesn't throw you an error about the array needing to be a constant value.
@sanduchicu7545
@sanduchicu7545 3 жыл бұрын
Heyy. Can you please make a video about json reading and writing & parsing tutorial.
@tcgvsocg1458
@tcgvsocg1458 3 жыл бұрын
Can you create a video recorder in python but from scratch without module
@shakhlokh
@shakhlokh 3 ай бұрын
Thank you very for your lesson🫶🏻
@subee128
@subee128 Жыл бұрын
Thanks
@shawnbeans7389
@shawnbeans7389 3 жыл бұрын
you looking good on subs brother
@sooryasantosh
@sooryasantosh 3 жыл бұрын
Hey tech with Tim! I love your videos
@omanavarghess6847
@omanavarghess6847 3 жыл бұрын
Who's tech with Tom?
@kimeg7294
@kimeg7294 3 жыл бұрын
Hi, is it possible to assign an integer value, greater than 2^32-1, as element of an array of integer type?
@damnstupidoldidiot8776
@damnstupidoldidiot8776 3 ай бұрын
Use longs or long longs.
@agneaybnair9519
@agneaybnair9519 3 жыл бұрын
Hey Sir, can you create a tutorial on PyCairo
@abrarmasumabir3809
@abrarmasumabir3809 3 жыл бұрын
plz make a video on Vim and it' s plugins
@gravesucheoma2416
@gravesucheoma2416 Жыл бұрын
I think the word that you are looking for is implicate, or Implicitly define the size. Although, I guess you could say that "we can defer the size of the array to the complier" or something like that, which would mean the same thing technically. Sorry, haha!
@aaravgp1332
@aaravgp1332 3 жыл бұрын
are you going to cover vectors and stl?
@yourdadsbestfriend7101
@yourdadsbestfriend7101 3 жыл бұрын
patience young one
@naomiwynne4696
@naomiwynne4696 3 жыл бұрын
Hi tim is just idea but can you do a intermediate tutorials of Javascript maybe? its just idea
@LittleRapGuy
@LittleRapGuy 3 жыл бұрын
chillin
@Sultan4Mc
@Sultan4Mc 3 жыл бұрын
Is this text editor sublimeText
@softwhere07
@softwhere07 3 жыл бұрын
interesting. But I can't wait until you do something with "while statements" and "for loops". that is if you do. I mean those are pretty important aren't they? I hope you do.
@blackpeppercinnamon3244
@blackpeppercinnamon3244 3 жыл бұрын
Hello Tim thanks for this series. Can you do a video on the iomanip class. That would be really helpful
@blackpeppercinnamon3244
@blackpeppercinnamon3244 3 жыл бұрын
@Peterolen that's what I meant. Been studying classes so I have them in my head. Thanks for the clarification
@saritachaurasia5326
@saritachaurasia5326 3 жыл бұрын
How do you edit your thumbnails??
@segsfault
@segsfault 3 жыл бұрын
using his computer, his hands eyes and brain
@saritachaurasia5326
@saritachaurasia5326 3 жыл бұрын
I meant to ask about the software he uses..
@addisumengistu4784
@addisumengistu4784 3 жыл бұрын
Hey Tim can u pls make a video on socket in detail i have seen ur video on socket they are not clear. can u pls make anothet
@ikbenmathijs9424
@ikbenmathijs9424 3 жыл бұрын
Why doens't the size it takes in byte it gives from sizeof() change between a string that's only 2 characters and a string that's 10 million characters that makes the entire file more than 16 megabytes in size???
@user-sy3ny1sz2w
@user-sy3ny1sz2w 3 жыл бұрын
String is stored in memory aka RAM not in the actual file LOL
@ikbenmathijs9424
@ikbenmathijs9424 3 жыл бұрын
@Peterolen Thanks, that makes sense
@thanhtupham4726
@thanhtupham4726 3 жыл бұрын
I will follow your series till pointer part :V
@soggycarrot3319
@soggycarrot3319 3 ай бұрын
I have a question What if I want to create an array of 1 - 200 but dont want to manually type the number?
@storytimewithgreg
@storytimewithgreg 3 ай бұрын
You could use loops to append to the array.
@soggycarrot3319
@soggycarrot3319 3 ай бұрын
lol I already figured it out list[200]; for ( i = 1; i
@siamahmed8287
@siamahmed8287 3 жыл бұрын
Hey tim. Please make a series on python algorithms
@joaomelo6011
@joaomelo6011 3 жыл бұрын
Are you going to do a serie for developing backend with c++ ?
@andreaspatounis5674
@andreaspatounis5674 3 жыл бұрын
13:07 are this numbers always the same?
@segsfault
@segsfault 3 жыл бұрын
No it's random, because when you don't initialise the values of any array of any variable, c++ gives it a random value and then stores it in the RAM because you can't store anything empty inside the RAM
@andreaspatounis5674
@andreaspatounis5674 3 жыл бұрын
@@segsfault thanks for answering my question
@trafon31
@trafon31 3 жыл бұрын
5:04 that's a bad practice and not "completely valid". In the compilation phase, while allocating memory for variables X does not have an assigned value, so you cannot create an undefined sized array. This will lead to crashes when you are using older/low level C/C++ compilers (lets say you are working on 8086 systems). Do not use this. Defining your array size as MACRO is the way to go. However if you are using never versions of C++ compiler, this will be handled automatically, but will lead to performance loss.
@anonymologist7946
@anonymologist7946 3 жыл бұрын
Thanks a lot! I encountered the issue you mentioned. I was trying to figure out why, but didn't find any helpful info until now. I am not sure what you mean by defining array size as macro? Could you explain more to me? Thanks!
@jo-zw9eu
@jo-zw9eu 3 жыл бұрын
why dont you use visual studio?
@jo-zw9eu
@jo-zw9eu 3 жыл бұрын
@Madhavaraj s oh ok tnx
@kprubinaath9797
@kprubinaath9797 3 жыл бұрын
19:38 wait a minute you dont entered return 0; how it is compiled
@kprubinaath9797
@kprubinaath9797 3 жыл бұрын
@Peterolen oh thank you. learned a lot from you
@shr1han
@shr1han 3 жыл бұрын
g++ -Wall -o executable.exe code.cpp This would give you a warning about not returning from main (I guess)
@random7983
@random7983 3 жыл бұрын
that's pretty sad, you're presenting the C syntax and not the C++ syntax which requires the header , not showing how to program in modern C++ in 2021 isn't that good unfortunately. :/
@random7983
@random7983 3 жыл бұрын
@Peterolen what do you mean by regular exactly?
@raffayirfan
@raffayirfan 3 жыл бұрын
hello
@SanjuKumar-ye8xz
@SanjuKumar-ye8xz 3 жыл бұрын
Second view
@eamongas
@eamongas Жыл бұрын
int x = 5; int arr[x]; is incorrect isn't it.
@KoichiNakayamada
@KoichiNakayamada 3 ай бұрын
Yeah, I think we need to make the size constant. const int x = 5; int arr[x] = {2, 3, 4, 5, 6};
@DextenXD
@DextenXD 3 жыл бұрын
I was olmost frist
@2mftoomanyflowz953
@2mftoomanyflowz953 3 жыл бұрын
put it on ur cv
@DextenXD
@DextenXD 3 жыл бұрын
@@2mftoomanyflowz953 cv?
@joshftc7392
@joshftc7392 2 жыл бұрын
@@DextenXD basically a resumé
@Bulptheblob
@Bulptheblob 22 күн бұрын
do you wear pink thigh high socks and cat ears in your spare time?
@ekuaowusuwaa6805
@ekuaowusuwaa6805 10 ай бұрын
You have to break up your words
@samalocpp
@samalocpp 9 ай бұрын
Bro couldn't even teach std::array, C-like array decaying to pointers when passed as a function argument, or that you can't return a C-like array from a function, just update yourself before teaching stuff to beginners
@rishabhsemwal4180
@rishabhsemwal4180 2 жыл бұрын
21 minute long video and total waste content. Just talking about errors. Instead you should have talked about methods and function of array
@damnstupidoldidiot8776
@damnstupidoldidiot8776 3 ай бұрын
You cannot use a variable as the length of an array, that is a GNU extension. The length of an array must be a constant expression. You can get the length with .size if you use std::array.
Learn C++ With Me #10 - For Loops
16:11
Tech With Tim
Рет қаралды 27 М.
Arrays in C++
18:31
The Cherno
Рет қаралды 414 М.
🍕Пиццерия FNAF в реальной жизни #shorts
00:41
Backstage 🤫 tutorial #elsarca #tiktok
00:13
Elsa Arca
Рет қаралды 39 МЛН
I Built a Shelter House For myself and Сat🐱📦🏠
00:35
TooTool
Рет қаралды 33 МЛН
В ДЕТСТВЕ СТРОИШЬ ДОМ ПОД СТОЛОМ
00:17
SIDELNIKOVVV
Рет қаралды 3,9 МЛН
ASMR Programming - Spinning Cube - No Talking
20:45
Servet Gulnaroglu
Рет қаралды 3,6 МЛН
Master Pointers in C:  10X Your C Coding!
14:12
Dave's Garage
Рет қаралды 280 М.
Learn C++ With Me #16 - Tuples
17:58
Tech With Tim
Рет қаралды 28 М.
Bjarne Stroustrup: C++ | Lex Fridman Podcast #48
1:47:13
Lex Fridman
Рет қаралды 1 МЛН
How To Actually Make $10k A Month Coding
14:54
Tech With Tim
Рет қаралды 78 М.
you will never ask about pointers again after watching this video
8:03
Low Level Learning
Рет қаралды 2 МЛН
10 Python Comprehensions You SHOULD Be Using
21:35
Tech With Tim
Рет қаралды 114 М.
The TRUTH About Computer Science Degrees in 2024
17:25
Tech With Tim
Рет қаралды 59 М.
Backend, Frontend or DevOps? How to Decide!
16:54
Tech With Tim
Рет қаралды 74 М.
🍕Пиццерия FNAF в реальной жизни #shorts
00:41