Welcome Back to my Code Rodeo!
Hey everyone, I'm Patrick, and we worked on learning more C++ and setting up a home server last week. I knocked out 4 Chapters of the book and learned about loops, conditionals, arrays, methods, functions, and pointers. Let's talk about it.
Since I already know Python, a lot of this was review. However, some notable things were different. A good example is how the 'for' loop takes three arguments, which will run until the middle value is no longer true. Then there is a 'do while' loop, which reminds me of the Python 'try and except' loop works (Here's a link to W3 schools to give you an example: Python Try Except (w3schools.com)).
Then the newest and most exciting portion of these last few sessions was 'Pointers'. Pointers are portions of memory that you can assign whenever the build is run. You can store references to data but not the data itself. It uses the '*' and the '&' when manipulating them. The overall goal of using pointers is to optimize memory usage. This is a topic I'm going to have to research further before I can effectively use it.
Code:
Quotes of the Week:
'C++ causes brain damage'
-lastmiles(Twitch)
'But you get real power (Ooh)'
-C++ All-in-One for Dummies
'The more you know about pointers the better you'll be.'
-C++ All-in-One for Dummies
Well, I hope you enjoyed this week's post, and be sure to check back the following Monday for more C++ or even a finished project.
-Peaceš£
No comments:
Post a Comment