title
C++ Tutorial for Beginners - Learn C++ in 1 Hour

description
This C++ tutorial for beginners shows you how to get started with C++ quickly. Learn C++ basics in 1 hour and get ready to learn more! - Subscribe for more C++ tutorials: https://goo.gl/6PYaGF - Want to learn more? Try my Complete C++ Programming course: https://bit.ly/ultimate-cpp - Get my free C++ cheat sheet and summary notes: https://bit.ly/3zEnPEs WANT TO LEARN MORE? - Courses: https://codewithmosh.com - Twitter: https://twitter.com/moshhamedani - Facebook: https://www.facebook.com/programmingwithmosh/ - Blog: http://programmingwithmosh.com TABLE OF CONTENT 0:00:00 Course Introduction 0:00:56 Introduction to C++ 0:04:14 Popular IDEs 0:06:11 Your First C++ Program 0:13:36 Compiling and Running a C++ Program 0:16:01 Changing the Theme 0:17:16 Course Structure 0:18:48 Cheat Sheet 0:19:20 Section 1: The Basics 0:19:52 Variables 0:26:00 Constants 0:27:28 Naming Conventions 0:30:25 Mathematical Expressions 0:36:39 Order of Operators 0:39:49 Writing Output to the Console 0:49:06 Reading from the Console 0:53:41 Working with the Standard Library 0:58:19 Comments 1:00:51 Introduction to Fundamental Data Types 1:01:41 Section 2: Fundamental Data Types 1:04:45 Initializing Variables 1:09:29 Working with Numbers 1:13:03 Narrowing 1:15:17 Generating Random Numbers #cprogramming #programming

detail
{'title': 'C++ Tutorial for Beginners - Learn C++ in 1 Hour', 'heatmap': [{'end': 1593.097, 'start': 1489.966, 'weight': 0.824}, {'end': 2340.12, 'start': 2282.094, 'weight': 1}, {'end': 2690.669, 'start': 2584.446, 'weight': 0.804}, {'end': 3435.159, 'start': 3381.376, 'weight': 0.793}], 'summary': 'This c++ tutorial series, instructed by a seasoned software engineer, aims to teach everything about c++ from basics to advanced concepts in 1 hour, highlighting its relevance in software development with an average salary of over $170,000 for c++ programmers in the us, discussing standard library functionalities, c++ programming basics, variable naming conventions, fundamental concepts, functions, data types, number systems, and random numbers.', 'chapters': [{'end': 52.044, 'segs': [{'end': 34.979, 'src': 'embed', 'start': 2.369, 'weight': 0, 'content': [{'end': 4.57, 'text': 'Welcome to the ultimate C++ course.', 'start': 2.369, 'duration': 2.201}, {'end': 10.952, 'text': "In this course, you're going to learn everything you need to know about C++ from the basics to more advanced concepts.", 'start': 5.25, 'duration': 5.702}, {'end': 15.414, 'text': "So by the end of this course, you'll be able to write C++ code with confidence.", 'start': 11.232, 'duration': 4.182}, {'end': 22.676, 'text': "If you're looking for a comprehensive, easy to follow, well organized and practical course that takes you from zero to hero,", 'start': 15.954, 'duration': 6.722}, {'end': 24.597, 'text': 'this is the right C++ course for you.', 'start': 22.676, 'duration': 1.921}, {'end': 28.658, 'text': "You don't need any prior knowledge of C++ or programming in general.", 'start': 25.057, 'duration': 3.601}, {'end': 34.979, 'text': "Everything you need to know about C++ is in one place, so you don't need to jump back and forth between random tutorials.", 'start': 28.998, 'duration': 5.981}], 'summary': 'Comprehensive c++ course covering basics to advanced concepts, enabling confident coding. no prior knowledge required.', 'duration': 32.61, 'max_score': 2.369, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb82369.jpg'}, {'end': 65.416, 'src': 'embed', 'start': 36.999, 'weight': 1, 'content': [{'end': 44.301, 'text': "I'm a software engineer with over 20 years of experience and I've taught millions of people how to code through this channel and my online school,", 'start': 36.999, 'duration': 7.302}, {'end': 45.281, 'text': 'CodeWithMash.com.', 'start': 44.301, 'duration': 0.98}, {'end': 49.442, 'text': "If you're new here, be sure to subscribe as I upload new videos all the time.", 'start': 45.841, 'duration': 3.601}, {'end': 52.044, 'text': "Now let's jump in and get started.", 'start': 50.322, 'duration': 1.722}, {'end': 65.416, 'text': "Before we start coding, let's spend a couple of minutes and talk about C++, what you can do with it and how to master it.", 'start': 58.95, 'duration': 6.466}], 'summary': 'Experienced software engineer with 20+ years has taught millions how to code through codewithmash.com.', 'duration': 28.417, 'max_score': 36.999, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb836999.jpg'}], 'start': 2.369, 'title': 'Ultimate c++ course', 'summary': 'Covers an ultimate c++ course instructed by a software engineer with over 20 years of experience and millions of people taught, promising to teach everything about c++ from basics to advanced concepts, enabling learners to write c++ code confidently.', 'chapters': [{'end': 52.044, 'start': 2.369, 'title': 'Ultimate c++ course', 'summary': 'Covers an ultimate c++ course that promises to teach everything about c++ from basics to advanced concepts, enabling learners to write c++ code confidently, and is instructed by a software engineer with over 20 years of experience and millions of people taught.', 'duration': 49.675, 'highlights': ['The course promises to teach everything about C++ from basics to advanced concepts, enabling learners to write C++ code with confidence.', 'The instructor is a software engineer with over 20 years of experience and has taught millions of people how to code through this channel and online school.']}], 'duration': 49.675, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb82369.jpg', 'highlights': ['The course promises to teach everything about C++ from basics to advanced concepts, enabling learners to write C++ code with confidence.', 'The instructor is a software engineer with over 20 years of experience and has taught millions of people how to code through this channel and online school.']}, {'end': 365.162, 'segs': [{'end': 192.387, 'src': 'embed', 'start': 58.95, 'weight': 0, 'content': [{'end': 65.416, 'text': "Before we start coding, let's spend a couple of minutes and talk about C++, what you can do with it and how to master it.", 'start': 58.95, 'duration': 6.466}, {'end': 75.512, 'text': 'C++ is one of the most popular programming languages on the world and is the language of choice for building performance, critical applications,', 'start': 66.846, 'duration': 8.666}, {'end': 80.756, 'text': 'video games, device drivers, web browsers, servers, operating systems, and so on.', 'start': 75.512, 'duration': 5.244}, {'end': 89.742, 'text': "That's why it's used by large companies like Adobe, Google, Microsoft, Netflix, and even government agencies like NASA, just to name a few.", 'start': 81.216, 'duration': 8.526}, {'end': 95.306, 'text': 'every three years we get a new version of c++ and the latest version at this time is version 20.', 'start': 90.322, 'duration': 4.984}, {'end': 98.469, 'text': 'the next version is coming out next year.', 'start': 95.306, 'duration': 3.163}, {'end': 102.712, 'text': 'now there are people, like our famous superstar developer, john smith,', 'start': 98.469, 'duration': 4.243}, {'end': 108.617, 'text': 'who think that c++ is no longer relevant because of the newer languages like java or c sharp.', 'start': 102.712, 'duration': 5.905}, {'end': 109.918, 'text': 'that is not true.', 'start': 108.617, 'duration': 1.301}, {'end': 114.122, 'text': 'c++ is still one of the fastest and most efficient languages available,', 'start': 109.918, 'duration': 4.204}, {'end': 121.623, 'text': 'so if you want to build an application that needs to be fast and use memory efficiently, c plus plus is a great choice.', 'start': 114.642, 'duration': 6.981}, {'end': 126.424, 'text': 'this is an advantage that it has over languages like c sharp and java.', 'start': 121.623, 'duration': 4.801}, {'end': 132.986, 'text': 'c plus plus is also one of the first languages often taught to computer science or software engineering students,', 'start': 126.424, 'duration': 6.562}, {'end': 140.227, 'text': 'because it has influenced many programming languages like c sharp, java, javascript, typescript, dart and so on.', 'start': 132.986, 'duration': 7.241}, {'end': 147.476, 'text': "So if you're looking for a job as a software engineer, learning C++ is a great investment and opens a lot of doors for you.", 'start': 140.607, 'duration': 6.869}, {'end': 153.905, 'text': 'According to Indeed.com, the average salary of a C++ programmer in the US is just over $170, 000 a year.', 'start': 148.017, 'duration': 5.888}, {'end': 158.329, 'text': 'now to master c plus plus.', 'start': 156.528, 'duration': 1.801}, {'end': 160.331, 'text': 'there are two things you need to learn.', 'start': 158.329, 'duration': 2.002}, {'end': 165.854, 'text': 'one is the c plus plus language itself, meaning the syntax or the grammar of this language.', 'start': 160.331, 'duration': 5.523}, {'end': 170.157, 'text': 'the second thing you need to learn is the c plus plus standard library or stl,', 'start': 165.854, 'duration': 4.303}, {'end': 176.762, 'text': 'which is a collection of pre-written c plus plus code that provides functionality that is required by many applications.', 'start': 170.157, 'duration': 6.605}, {'end': 183.564, 'text': 'Examples are data structures like lists and maps, and algorithms for searching and sorting data.', 'start': 177.242, 'duration': 6.322}, {'end': 186.905, 'text': 'These functions are required in almost every application.', 'start': 184.124, 'duration': 2.781}, {'end': 192.387, 'text': 'So, instead of us creating all this functionality from scratch every single time,', 'start': 187.425, 'duration': 4.962}], 'summary': 'C++ is popular for performance-critical applications, used by big companies like adobe, google, microsoft, and nasa. it offers high speed, memory efficiency, and influenced many programming languages. the average salary for a c++ programmer in the us is over $170,000 a year.', 'duration': 133.437, 'max_score': 58.95, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb858950.jpg'}, {'end': 282.919, 'src': 'embed', 'start': 213.914, 'weight': 6, 'content': [{'end': 219.496, 'text': "but in reality you don't need to learn all of c plus plus to be able to write substantial programs.", 'start': 213.914, 'duration': 5.582}, {'end': 224.898, 'text': "for the same reason, you don't need to learn every feature your tv provides, just to use and enjoy it.", 'start': 219.496, 'duration': 5.402}, {'end': 232.52, 'text': "so in this course we're going to explore c plus plus step by step, and as we go, i'm going to show you how you can write some really cool programs.", 'start': 224.898, 'duration': 7.622}, {'end': 239.966, 'text': "as you're learning c plus plus Plus, I'm going to give you plenty of exercises to help you better understand and remember the concepts.", 'start': 232.52, 'duration': 7.446}, {'end': 243.309, 'text': 'Then you will see that C++ is not really that difficult.', 'start': 240.487, 'duration': 2.822}, {'end': 248.594, 'text': "So if you follow along, by the end of this course, you'll be able to write C++ code with confidence.", 'start': 243.67, 'duration': 4.924}, {'end': 252.037, 'text': "Alright, next we're going to talk about the tools you need to write C++ programs.", 'start': 249.155, 'duration': 2.882}, {'end': 265.893, 'text': 'To create C++ programs, we use an integrated development environment or IDE,', 'start': 260.731, 'duration': 5.162}, {'end': 272.155, 'text': 'which is basically an application that contains an editor for writing code as well as build and debugging tools.', 'start': 265.893, 'duration': 6.262}, {'end': 274.756, 'text': 'Now, there are so many different ideas out there.', 'start': 272.756, 'duration': 2}, {'end': 277.297, 'text': 'Some of them are free, the others are commercial.', 'start': 275.076, 'duration': 2.221}, {'end': 281.299, 'text': 'But the top three ones are Microsoft Visual Studio for Windows.', 'start': 277.677, 'duration': 3.622}, {'end': 282.919, 'text': 'The community edition is free.', 'start': 281.699, 'duration': 1.22}], 'summary': 'Learn c++ step by step with exercises. use ide like microsoft visual studio for windows.', 'duration': 69.005, 'max_score': 213.914, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb8213914.jpg'}, {'end': 350.811, 'src': 'embed', 'start': 323.133, 'weight': 7, 'content': [{'end': 326.775, 'text': "Now, if you're an absolute beginner and you have never coded before,", 'start': 323.133, 'duration': 3.642}, {'end': 331.138, 'text': 'I recommend you to download the free version of CLion so you can easily follow along.', 'start': 326.775, 'duration': 4.363}, {'end': 335.581, 'text': 'And then later, you can either get a license or use one of the free alternatives.', 'start': 331.538, 'duration': 4.043}, {'end': 340.842, 'text': 'So head over to jetbrains.com slash CLion slash download.', 'start': 336.658, 'duration': 4.184}, {'end': 345.046, 'text': 'Again, you can see we have versions for Windows, Mac OS and Linux.', 'start': 341.462, 'duration': 3.584}, {'end': 350.811, 'text': "Just note that if you're on Mac, make sure to download the right DMG because here we have two different builds.", 'start': 345.706, 'duration': 5.105}], 'summary': 'Beginners should download free clion, available for windows, mac os, and linux.', 'duration': 27.678, 'max_score': 323.133, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb8323133.jpg'}], 'start': 58.95, 'title': 'C++ in software development', 'summary': 'Emphasizes the relevance of c++ as one of the fastest and most efficient languages, used by major companies, influencing other languages, with average salary of over $170,000 for c++ programmers in the us. it also discusses the c++ standard library, including functionalities like data structures and algorithms, and emphasizes the importance of using an ide for c++ development, suggesting top options like microsoft visual studio, xcode, and clion, with free alternatives available.', 'chapters': [{'end': 170.157, 'start': 58.95, 'title': 'Importance of c++ in software development', 'summary': 'Emphasizes the relevance of c++ as one of the fastest and most efficient languages, highlighting its usage by major companies, influence on other languages, and high average salary of over $170,000 for c++ programmers in the us.', 'duration': 111.207, 'highlights': ['C++ is still one of the fastest and most efficient languages available, making it a great choice for building applications that need to be fast and use memory efficiently, with an advantage over languages like C# and Java.', 'Usage of C++ by major companies like Adobe, Google, Microsoft, Netflix, and government agencies like NASA, showcasing its importance in building performance-critical applications, video games, device drivers, web browsers, servers, and operating systems.', 'Influence of C++ on other programming languages like C#, Java, JavaScript, TypeScript, Dart, making it a valuable skill for software engineering jobs and opening doors for career opportunities.', 'The average salary of a C++ programmer in the US is just over $170,000 a year, according to Indeed.com, highlighting the financial benefits of mastering C++.', 'C++ is the language of choice for building performance-critical applications, video games, device drivers, web browsers, servers, and operating systems, emphasizing its versatility and widespread usage.']}, {'end': 365.162, 'start': 170.157, 'title': 'C++ standard library and ides', 'summary': 'Discusses the c++ standard library, highlighting its functionalities like data structures and algorithms, as well as the importance of using an ide for c++ development, suggesting top options like microsoft visual studio, xcode, and clion, with free alternatives available.', 'duration': 195.005, 'highlights': ['The chapter discusses the major functionalities in the C++ standard library, such as data structures like lists and maps, and algorithms for searching and sorting data, emphasizing their importance in almost every application.', 'It highlights the significance of using an integrated development environment (IDE) for C++ development, mentioning top options like Microsoft Visual Studio, Xcode, and CLion, along with the availability of free alternatives.', 'It recommends using CLion for beginners and provides a link for downloading, mentioning its availability for Windows, Mac OS, and Linux, with a note on choosing the right DMG for Mac based on the processor type.', "It suggests that C++ doesn't require learning every feature to write substantial programs, comparing it to using a TV without needing to know every feature, aiming to make C++ learning less intimidating for learners.", 'It emphasizes providing exercises to help learners understand and remember concepts in C++, aiming to demonstrate that C++ is not as difficult as perceived and instill confidence in writing C++ code.']}], 'duration': 306.212, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb858950.jpg', 'highlights': ['C++ is still one of the fastest and most efficient languages, with an advantage over C# and Java', 'Usage of C++ by major companies like Adobe, Google, Microsoft, Netflix, and NASA', 'Influence of C++ on other programming languages, making it a valuable skill for software engineering jobs', 'Average salary of a C++ programmer in the US is just over $170,000 a year', 'C++ is the language of choice for building performance-critical applications, video games, device drivers, web browsers, servers, and operating systems', 'The chapter discusses the major functionalities in the C++ standard library, such as data structures like lists and maps, and algorithms for searching and sorting data', 'Significance of using an integrated development environment (IDE) for C++ development, mentioning top options like Microsoft Visual Studio, Xcode, and CLion', 'Recommendation to use CLion for beginners and its availability for Windows, Mac OS, and Linux', "C++ doesn't require learning every feature to write substantial programs, aiming to make C++ learning less intimidating for learners", 'Emphasis on providing exercises to help learners understand and remember concepts in C++, aiming to demonstrate that C++ is not as difficult as perceived']}, {'end': 1025.989, 'segs': [{'end': 429.825, 'src': 'embed', 'start': 396.841, 'weight': 0, 'content': [{'end': 398.303, 'text': "So I'm going to sign in with my account.", 'start': 396.841, 'duration': 1.462}, {'end': 404.329, 'text': 'Good Now back to CLion, we can start our trial.', 'start': 400.825, 'duration': 3.504}, {'end': 408.593, 'text': "Now on this page, we're going to click on new project.", 'start': 406.251, 'duration': 2.342}, {'end': 412.463, 'text': 'Now on the top, we can specify the location of this project.', 'start': 409.639, 'duration': 2.824}, {'end': 418.492, 'text': "So on my Mac, it's going to be on users slash my name slash CLion projects.", 'start': 413.124, 'duration': 5.368}, {'end': 420.414, 'text': "I'm going to call this project.", 'start': 418.992, 'duration': 1.422}, {'end': 424.801, 'text': 'Hello world, all in one word without any spaces.', 'start': 421.175, 'duration': 3.626}, {'end': 429.825, 'text': 'Okay, Now over here we can specify the C++ language standard.', 'start': 424.861, 'duration': 4.964}], 'summary': 'Signing in, starting trial, creating new c++ project with specified location and language standard.', 'duration': 32.984, 'max_score': 396.841, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb8396841.jpg'}, {'end': 518.044, 'src': 'embed', 'start': 491.748, 'weight': 5, 'content': [{'end': 495.79, 'text': 'it has functions for changing the channel, controlling the volume and so on.', 'start': 491.748, 'duration': 4.042}, {'end': 504.357, 'text': 'by the same token, a c plus plus program consists of tens or hundreds or thousands of functions, each serving a purpose.', 'start': 495.79, 'duration': 8.567}, {'end': 509.38, 'text': 'now we have a special function here called main, which is the entry point to our program.', 'start': 504.357, 'duration': 5.023}, {'end': 511.261, 'text': 'this is like the power button of a tv.', 'start': 509.38, 'duration': 1.881}, {'end': 518.044, 'text': "okay, Now, note that C++ is a case-sensitive language, so it's sensitive to lowercase and uppercase letters.", 'start': 511.261, 'duration': 6.783}], 'summary': 'C++ program has functions for channel, volume control, and a main function as entry point. it is case-sensitive.', 'duration': 26.296, 'max_score': 491.748, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb8491748.jpg'}, {'end': 675.676, 'src': 'embed', 'start': 646.812, 'weight': 1, 'content': [{'end': 653.598, 'text': 'so earlier i told you that the standard library provides a bunch of capabilities that we need in almost every application.', 'start': 646.812, 'duration': 6.786}, {'end': 664.147, 'text': 'so on the top we type hashtag include, And in angle brackets we specify the name of one of the files in the standard library.', 'start': 653.598, 'duration': 10.549}, {'end': 669.692, 'text': 'That is iostream, which is short for input, output, stream.', 'start': 664.488, 'duration': 5.204}, {'end': 675.676, 'text': 'In this file, we have capabilities for printing something on the screen or getting input from the user.', 'start': 670.352, 'duration': 5.324}], 'summary': 'The standard library provides essential capabilities, such as input and output streams, accessed by including iostream in almost every application.', 'duration': 28.864, 'max_score': 646.812, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb8646812.jpg'}, {'end': 811.457, 'src': 'embed', 'start': 784.67, 'weight': 2, 'content': [{'end': 789.273, 'text': 'then we defined the main function, which is the entry point to our program.', 'start': 784.67, 'duration': 4.603}, {'end': 798.42, 'text': 'now, as you can see, the main function returns an integer, which is a whole number, like 0, 1, 2, 3 and so on, and in between the braces,', 'start': 789.273, 'duration': 9.147}, {'end': 800.903, 'text': 'we have written the code for this function.', 'start': 798.42, 'duration': 2.483}, {'end': 807.392, 'text': 'so on the first line we print something on the screen and on the second line return the value of zero.', 'start': 800.903, 'duration': 6.489}, {'end': 811.457, 'text': 'as simple as that, this is your first c plus plus program.', 'start': 807.392, 'duration': 4.065}], 'summary': 'The main function in a c++ program returns an integer (0), with code to print and return the value.', 'duration': 26.787, 'max_score': 784.67, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb8784670.jpg'}, {'end': 913.082, 'src': 'embed', 'start': 881.234, 'weight': 4, 'content': [{'end': 884.235, 'text': 'So over here, you can see the hello world message.', 'start': 881.234, 'duration': 3.001}, {'end': 892.537, 'text': "So we're using a console application here because console applications are easier to create, especially for people learning a new language.", 'start': 884.955, 'duration': 7.582}, {'end': 897.918, 'text': 'Building applications with a graphical user interface or GUI is way more complex.', 'start': 893.217, 'duration': 4.701}, {'end': 906.74, 'text': "So once you understand the basics of C++, you'll be ready to move on to writing applications with a graphical user interface if that's what you want.", 'start': 898.558, 'duration': 8.182}, {'end': 913.082, 'text': "Okay Now, let's minimize this window and make a tiny problem in this code.", 'start': 907, 'duration': 6.082}], 'summary': 'Using console application for learning c++ is easier than gui applications. once you understand the basics of c++, you can move on to gui applications.', 'duration': 31.848, 'max_score': 881.234, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb8881234.jpg'}, {'end': 953.862, 'src': 'embed', 'start': 925.308, 'weight': 3, 'content': [{'end': 928.77, 'text': 'So the error is reminding us that we have forgotten a semicolon.', 'start': 925.308, 'duration': 3.462}, {'end': 936.274, 'text': "If you're starting out, it's completely normal to encounter these errors if you have a typo or miss a semicolon and so on.", 'start': 929.49, 'duration': 6.784}, {'end': 937.995, 'text': "Don't let that discourage you.", 'start': 936.774, 'duration': 1.221}, {'end': 942.037, 'text': 'Remember, patience is the first skill of a good programmer.', 'start': 938.455, 'duration': 3.582}, {'end': 946.799, 'text': "So, if your code doesn't get compiled, pay close attention to this video.", 'start': 942.737, 'duration': 4.062}, {'end': 948.6, 'text': "see what exactly I'm typing.", 'start': 946.799, 'duration': 1.801}, {'end': 949.78, 'text': 'compare it with your code.', 'start': 948.6, 'duration': 1.18}, {'end': 953.862, 'text': "I promise if you pay close attention, you'll be able to solve issues on your own.", 'start': 949.78, 'duration': 4.082}], 'summary': 'Encountering errors is normal for beginners, pay attention to details to solve issues on your own.', 'duration': 28.554, 'max_score': 925.308, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb8925308.jpg'}], 'start': 365.162, 'title': 'C++ programming basics', 'summary': 'Covers creating a c++ program in clion, formatting c++ functions, using the iostream file from the c++ standard library, explaining code structure, compilation, and common errors, and setting up themes in clion.', 'chapters': [{'end': 555.78, 'start': 365.162, 'title': 'Creating first c++ program in clion', 'summary': 'Covers creating a c++ program in clion, including activating a trial license, setting up a new project, specifying c++ language standard, and defining the main function as the entry point of the program.', 'duration': 190.618, 'highlights': ["The first step is to open CLion and select 'start trial' for activating the license, followed by logging into JetBrains account.", 'The process involves creating a new project, specifying the project location, naming the project, and selecting the C++ language standard, such as version 20.', "The program's main file, main.cpp, is created, and the main function, serving as the entry point, is discussed, emphasizing its return value type as int for program termination status."]}, {'end': 736.327, 'start': 555.78, 'title': 'C++ function formatting and standard library usage', 'summary': "Covers the formatting of c++ functions and the usage of the iostream file from the c++ standard library to print 'hello world' on the screen.", 'duration': 180.547, 'highlights': ["The C++ standard library iostream file provides capabilities for printing something on the screen or getting input from the user, and it is used by typing '#include '.", 'The function formatting in C++ involves specifying the function name, adding parentheses to specify parameters, and using braces to define the code for the function.', "The 'std' in C++ is short for the standard library and acts as a container for the imported features, including 'cout' for character output."]}, {'end': 1025.989, 'start': 736.767, 'title': 'C++ basics: code structure & compilation', 'summary': 'Explains the basics of c++ programming, including code structure, compilation, and common errors, emphasizing the importance of semicolons, returning zero, and using console applications. it also touches on setting up themes in clion for those interested in customizing their development environment.', 'duration': 289.222, 'highlights': ['The main function returns an integer value of zero to indicate correct program termination, avoiding errors.', 'Emphasizes the importance of semicolons in C++ statements to avoid compilation errors.', 'Console applications are preferred for beginners due to their simplicity and ease of creation.', 'Provides guidance on setting up themes in CLion for customizing the development environment.']}], 'duration': 660.827, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb8365162.jpg', 'highlights': ['The process involves creating a new project, specifying the project location, and naming the project', 'The C++ standard library iostream file provides capabilities for printing and getting input', 'The main function returns an integer value of zero to indicate correct program termination', 'Emphasizes the importance of semicolons in C++ statements to avoid compilation errors', 'Console applications are preferred for beginners due to their simplicity and ease of creation', "The program's main file, main.cpp, is created, and the main function is discussed"]}, {'end': 1656.44, 'segs': [{'end': 1130.641, 'src': 'embed', 'start': 1049.558, 'weight': 0, 'content': [{'end': 1054.041, 'text': 'Each part is about three to four hours long, so you can easily complete it in a day or two.', 'start': 1049.558, 'duration': 4.483}, {'end': 1058.122, 'text': "In the first part, which is the one you're watching, we explore the basics.", 'start': 1054.901, 'duration': 3.221}, {'end': 1066.605, 'text': 'In this part, you will learn the fundamentals of programming in C++, data types, decision-making statements, loops, and functions.', 'start': 1058.642, 'duration': 7.963}, {'end': 1068.305, 'text': 'Now, throughout the course,', 'start': 1067.085, 'duration': 1.22}, {'end': 1075.348, 'text': "I'm going to give you plenty of exercises to help you develop your problem-solving skills and build your confidence in writing code.", 'start': 1068.305, 'duration': 7.043}, {'end': 1079.349, 'text': 'In fact, many of these exercises are popular interview questions.', 'start': 1075.628, 'duration': 3.721}, {'end': 1089.395, 'text': "In the second part, we'll explore intermediate level concepts such as arrays, pointers, strings, structures, enumerations, and streams.", 'start': 1080.229, 'duration': 9.166}, {'end': 1098.2, 'text': "And finally, in the last part, we'll be talking about the advanced concepts such as classes, exceptions, templates, containers, and more.", 'start': 1090.155, 'duration': 8.045}, {'end': 1105.684, 'text': "So by the end of this series, you will have a solid understanding of C++ and you'll be ready to apply it in real life.", 'start': 1098.8, 'duration': 6.884}, {'end': 1114.129, 'text': 'For example, if you want to build games with Unreal Engine, which is a popular gaming engine, you will have the necessary C++ skills to build games.', 'start': 1106.144, 'duration': 7.985}, {'end': 1116.29, 'text': 'You just need to learn about Unreal Engine.', 'start': 1114.409, 'duration': 1.881}, {'end': 1123.694, 'text': "So I hope you'll stick around and master C++, one of the fastest and most efficient programming languages available.", 'start': 1116.89, 'duration': 6.804}, {'end': 1130.641, 'text': 'Hey guys, Mosh here.', 'start': 1129.741, 'duration': 0.9}], 'summary': 'A comprehensive c++ course covering basics, intermediate, and advanced concepts, with exercises and practical applications, totaling around 3-4 hours per part.', 'duration': 81.083, 'max_score': 1049.558, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb81049558.jpg'}, {'end': 1593.097, 'src': 'heatmap', 'start': 1489.966, 'weight': 0.824, 'content': [{'end': 1493.429, 'text': 'So to solve this problem in real life, we need a third bucket.', 'start': 1489.966, 'duration': 3.463}, {'end': 1496.652, 'text': 'First, we empty our apples bucket into this bucket.', 'start': 1494.15, 'duration': 2.502}, {'end': 1498.874, 'text': 'Now the apples bucket is empty.', 'start': 1497.473, 'duration': 1.401}, {'end': 1502.197, 'text': 'So we can move the content of the oranges bucket here.', 'start': 1499.375, 'duration': 2.822}, {'end': 1508.438, 'text': 'Now the oranges bucket is empty, so we can move the content of the third bucket into this bucket.', 'start': 1503.075, 'duration': 5.363}, {'end': 1514.482, 'text': "Now we have swapped the content of our buckets, right? So let's use this idea to solve this exercise.", 'start': 1508.939, 'duration': 5.543}, {'end': 1523.147, 'text': 'We declare a third variable, we can call that temp, and we initialize it with what we have in A, that is the value of one.', 'start': 1515.143, 'duration': 8.004}, {'end': 1529.732, 'text': 'Now we can set A to B, so whatever we have in B, which is two, is now gonna be in A.', 'start': 1523.948, 'duration': 5.784}, {'end': 1535.775, 'text': "And finally, we're going to set b to temp, so b is going to be 1.", 'start': 1530.552, 'duration': 5.223}, {'end': 1540.377, 'text': "So now, if we print a, we're going to see 2 instead of 1.", 'start': 1535.775, 'duration': 4.602}, {'end': 1541.138, 'text': "Let's verify this.", 'start': 1540.377, 'duration': 0.761}, {'end': 1542.719, 'text': "So, let's run our program.", 'start': 1541.198, 'duration': 1.521}, {'end': 1543.899, 'text': 'There you go.', 'start': 1543.299, 'duration': 0.6}, {'end': 1546.941, 'text': 'Beautiful So this was your first programming problem.', 'start': 1544.079, 'duration': 2.862}, {'end': 1548.502, 'text': "If you got stuck, don't worry.", 'start': 1547.261, 'duration': 1.241}, {'end': 1549.863, 'text': "It's completely normal.", 'start': 1548.802, 'duration': 1.061}, {'end': 1555.306, 'text': "As we go through the course, I'm going to give you more and more exercises to help you build your confidence.", 'start': 1550.403, 'duration': 4.903}, {'end': 1557.807, 'text': "Next, we're going to talk about constants.", 'start': 1556.026, 'duration': 1.781}, {'end': 1570.385, 'text': "are situations where we don't want the value of a variable to change.", 'start': 1566.403, 'duration': 3.982}, {'end': 1572.166, 'text': 'this is where we use constants.', 'start': 1570.385, 'duration': 1.781}, {'end': 1573.407, 'text': 'here is an example.', 'start': 1572.166, 'duration': 1.241}, {'end': 1580.331, 'text': "let's declare a variable of type double and call it pi and set it to 3.14.", 'start': 1573.407, 'duration': 6.924}, {'end': 1589.115, 'text': 'now, with this we can calculate the area of a circle right, but what if, somewhere in our program, i accidentally set pi to a different value,', 'start': 1580.331, 'duration': 8.784}, {'end': 1589.536, 'text': 'like zero?', 'start': 1589.115, 'duration': 0.421}, {'end': 1593.097, 'text': 'with this, our calculations are going to go wrong, right?', 'start': 1590.396, 'duration': 2.701}], 'summary': 'Swapping values using a third bucket. introducing constants to prevent variable value change.', 'duration': 103.131, 'max_score': 1489.966, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb81489966.jpg'}], 'start': 1026.63, 'title': 'Complete c++ series overview', 'summary': 'Provides an overview of the complete c++ series, consisting of three parts, each about three to four hours long, covering basic, intermediate, and advanced concepts, with exercises including popular interview questions, and the potential to apply c++ skills in building games with unreal engine.', 'chapters': [{'end': 1130.641, 'start': 1026.63, 'title': 'Complete c++ series overview', 'summary': 'Provides an overview of the complete c++ series, consisting of three parts, each about three to four hours long, covering basic, intermediate, and advanced concepts, with exercises including popular interview questions, and the potential to apply c++ skills in building games with unreal engine.', 'duration': 104.011, 'highlights': ['The course is divided into three parts, each about three to four hours long, covering basic, intermediate, and advanced concepts in C++.', 'The first part covers the fundamentals of programming in C++, data types, decision-making statements, loops, and functions.', 'Plenty of exercises are provided throughout the course to help develop problem-solving skills and build confidence in coding, including popular interview questions.', 'The second part explores intermediate level concepts such as arrays, pointers, strings, structures, enumerations, and streams.', 'By the end of the series, learners will have a solid understanding of C++ and be ready to apply it in real-life scenarios, such as building games with Unreal Engine.', 'C++ skills acquired from the series can be applied in building games with Unreal Engine, a popular gaming engine.']}, {'end': 1656.44, 'start': 1130.661, 'title': 'C++ basics: variables, constants, and naming conventions', 'summary': 'Covers the basics of c++ including variables, constants, naming conventions, and practical exercises, helping learners understand the importance of initializing variables, using constants, and following naming conventions to write simple but useful programs in c++.', 'duration': 525.779, 'highlights': ['The section covers the basics of C++, including variables and constants, and provides practical exercises to help learners understand the importance of initializing variables, using constants, and following naming conventions to write simple but useful programs in C++.', 'Emphasizes the importance of using meaningful names for variables and avoiding cryptic or ambiguous names, highlighting the significance of proper variable naming conventions.', 'Demonstrates the consequences of not initializing variables, showcasing warnings and random values (garbage) due to uninitialized variables, emphasizing the best practice of always initializing variables before use.', 'Provides a practical exercise for swapping the values of two variables, using real-life analogies to guide learners through the problem-solving process, reinforcing the understanding of variable manipulation.', 'Explains the use of constants to prevent accidental modification of variable values, demonstrating the const keyword and its role in maintaining the integrity of constant values.']}], 'duration': 629.81, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb81026630.jpg', 'highlights': ['The course is divided into three parts, each about three to four hours long, covering basic, intermediate, and advanced concepts in C++.', 'Plenty of exercises are provided throughout the course to help develop problem-solving skills and build confidence in coding, including popular interview questions.', 'By the end of the series, learners will have a solid understanding of C++ and be ready to apply it in real-life scenarios, such as building games with Unreal Engine.', 'The second part explores intermediate level concepts such as arrays, pointers, strings, structures, enumerations, and streams.', 'C++ skills acquired from the series can be applied in building games with Unreal Engine, a popular gaming engine.', 'The first part covers the fundamentals of programming in C++, data types, decision-making statements, loops, and functions.']}, {'end': 2197.352, 'segs': [{'end': 1703.568, 'src': 'embed', 'start': 1657.06, 'weight': 0, 'content': [{'end': 1663.866, 'text': 'So we have different conventions for naming our variables and constants, and different teams prefer different conventions.', 'start': 1657.06, 'duration': 6.806}, {'end': 1665.808, 'text': 'So there is really no right or wrong here.', 'start': 1664.046, 'duration': 1.762}, {'end': 1668.15, 'text': 'But let me show you the popular conventions.', 'start': 1666.308, 'duration': 1.842}, {'end': 1672.154, 'text': 'So earlier we declared a variable called file size.', 'start': 1668.811, 'duration': 3.343}, {'end': 1677.578, 'text': 'The way we name this variable follows what we call the snake case.', 'start': 1672.914, 'duration': 4.664}, {'end': 1683.804, 'text': 'So with this convention, we have to use lowercase letters to name our variables and constants.', 'start': 1678.339, 'duration': 5.465}, {'end': 1688.448, 'text': 'And if we have multiple words, we should separate them using an underscore.', 'start': 1684.504, 'duration': 3.944}, {'end': 1696.194, 'text': 'Now we have another convention called Pascal case in which we should capitalize the first letter of every word.', 'start': 1689.328, 'duration': 6.866}, {'end': 1700.338, 'text': 'So the same variable using Pascal case looks like this.', 'start': 1696.795, 'duration': 3.543}, {'end': 1703.568, 'text': 'This is Pascal case.', 'start': 1701.687, 'duration': 1.881}], 'summary': 'Different naming conventions for variables and constants: snake case uses lowercase with underscores, pascal case capitalizes each word.', 'duration': 46.508, 'max_score': 1657.06, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb81657060.jpg'}, {'end': 1751.6, 'src': 'embed', 'start': 1721.921, 'weight': 5, 'content': [{'end': 1726.143, 'text': 'The only difference is that the first letter of the first word should be lowercase.', 'start': 1721.921, 'duration': 4.222}, {'end': 1728.545, 'text': 'So file size.', 'start': 1726.724, 'duration': 1.821}, {'end': 1731.207, 'text': 'This is camel case.', 'start': 1729.306, 'duration': 1.901}, {'end': 1737.611, 'text': "We also have Hungarian notation, which is a pretty old notation and it's not relevant anymore.", 'start': 1732.027, 'duration': 5.584}, {'end': 1743.915, 'text': 'with Hungarian notation, We should prefix the name of our variables with a letter that specify their type.', 'start': 1737.611, 'duration': 6.304}, {'end': 1751.6, 'text': 'So here we have an integer So we use a lowercase I and then file size just like Pascal case.', 'start': 1744.575, 'duration': 7.025}], 'summary': 'Comparison of different naming conventions: camel case, pascal case, and hungarian notation.', 'duration': 29.679, 'max_score': 1721.921, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb81721921.jpg'}, {'end': 1822.65, 'src': 'embed', 'start': 1792.703, 'weight': 1, 'content': [{'end': 1795.184, 'text': 'is an integer variable right?', 'start': 1792.703, 'duration': 2.481}, {'end': 1797.765, 'text': 'so these are the popular conventions out there.', 'start': 1795.184, 'duration': 2.581}, {'end': 1805.028, 'text': "in this course i'm going to use camel case for naming our variables and constants and pascal case for naming our classes.", 'start': 1797.765, 'duration': 7.263}, {'end': 1806.869, 'text': "we'll talk about classes later in the course.", 'start': 1805.028, 'duration': 1.841}, {'end': 1814.318, 'text': "Now, if you don't like these conventions and prefer to use snake case, that's totally fine, but make sure to stick to your own convention.", 'start': 1807.549, 'duration': 6.769}, {'end': 1819.566, 'text': 'The more consistent your code is, the easier it is to read, understand, and maintain it.', 'start': 1814.779, 'duration': 4.787}, {'end': 1822.65, 'text': "Next, we're going to talk about mathematical expressions.", 'start': 1820.166, 'duration': 2.484}], 'summary': 'Use camel case for variables, pascal case for classes; maintain code consistency.', 'duration': 29.947, 'max_score': 1792.703, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb81792703.jpg'}, {'end': 1909.787, 'src': 'embed', 'start': 1879.253, 'weight': 2, 'content': [{'end': 1885.859, 'text': "because we're dealing with two integers, the result of the division is going to be an integer, even though, in reality,", 'start': 1879.253, 'duration': 6.606}, {'end': 1893.546, 'text': 'dividing 10 by 3 is going to result in a number with a decimal point, which we call a floating point number in programming.', 'start': 1885.859, 'duration': 7.687}, {'end': 1899.905, 'text': "so if you're on our program, We see 3, but what if you want to see a floating point number?", 'start': 1893.546, 'duration': 6.359}, {'end': 1909.787, 'text': 'Well, changing the type of z to double is not going to solve this problem, because, as I told you earlier, if both our numbers are integers,', 'start': 1900.065, 'duration': 9.722}], 'summary': 'Division of integers results in an integer, not a floating point number in programming.', 'duration': 30.534, 'max_score': 1879.253, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb81879253.jpg'}, {'end': 2024.179, 'src': 'embed', 'start': 1997.89, 'weight': 3, 'content': [{'end': 2002.791, 'text': 'that is totally fine, but there is a shorter and more concise way to write this code.', 'start': 1997.89, 'duration': 4.901}, {'end': 2005.392, 'text': 'we can say x plus plus.', 'start': 2002.791, 'duration': 2.601}, {'end': 2007.453, 'text': 'this is the increment operator.', 'start': 2005.392, 'duration': 2.061}, {'end': 2015.376, 'text': "we also have decrement operator, but we don't have the equivalent for multiplication or division, only increment and decrement.", 'start': 2007.453, 'duration': 7.923}, {'end': 2017.897, 'text': 'okay, now, this increment operator.', 'start': 2015.376, 'duration': 2.521}, {'end': 2020.038, 'text': 'there are two ways we can apply it.', 'start': 2017.897, 'duration': 2.141}, {'end': 2024.179, 'text': 'we can apply it as a post fix or as a prefix.', 'start': 2020.038, 'duration': 4.141}], 'summary': 'Introduction to increment operator in coding, with examples and usage explanation.', 'duration': 26.289, 'max_score': 1997.89, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb81997890.jpg'}], 'start': 1657.06, 'title': 'Variable naming conventions and c++ variables and operators', 'summary': 'Discusses variable naming conventions such as snake case, pascal case, camel case, and hungarian notation, emphasizing the irrelevance of hungarian notation. it also covers c++ naming conventions, mathematical expressions, and increment/decrement operators.', 'chapters': [{'end': 1792.703, 'start': 1657.06, 'title': 'Variable naming conventions', 'summary': 'Discusses different variable naming conventions including snake case, pascal case, camel case, and hungarian notation, highlighting that there is no right or wrong convention and emphasizing the irrelevance of hungarian notation due to the availability of powerful editors.', 'duration': 135.643, 'highlights': ['The chapter discusses four different variable naming conventions: snake case, Pascal case, camel case, and Hungarian notation, emphasizing that there is no right or wrong convention.', 'It explains that snake case involves using lowercase letters and underscores to separate multiple words in a variable, while Pascal case requires capitalizing the first letter of every word.', 'The chapter notes that camel case is similar to Pascal case, but with the first letter of the first word being lowercase, and highlights the irrelevance of Hungarian notation due to the availability of powerful editors.']}, {'end': 2197.352, 'start': 1792.703, 'title': 'C++ variables and operators', 'summary': 'Covers the naming conventions for variables and classes, mathematical expressions including addition, subtraction, multiplication, division, modulus, and increment and decrement operators in c++. it also explains the difference between applying the increment or decrement operator as a postfix or prefix.', 'duration': 404.649, 'highlights': ['The chapter explains the naming conventions for variables and classes in C++, highlighting the use of camel case for variables and constants and pascal case for classes, promoting consistency in code readability and maintenance.', 'It details the usage of mathematical expressions for performing calculations in C++, covering addition, subtraction, multiplication, and division, emphasizing the need to convert integer division results to floating point numbers when necessary.', 'The chapter elaborates on the usage of increment and decrement operators in C++, providing examples of applying them as postfix and prefix, and clarifying the differences in their behavior.']}], 'duration': 540.292, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb81657060.jpg', 'highlights': ['The chapter discusses four different variable naming conventions: snake case, Pascal case, camel case, and Hungarian notation, emphasizing that there is no right or wrong convention.', 'The chapter explains the naming conventions for variables and classes in C++, highlighting the use of camel case for variables and constants and pascal case for classes, promoting consistency in code readability and maintenance.', 'It details the usage of mathematical expressions for performing calculations in C++, covering addition, subtraction, multiplication, and division, emphasizing the need to convert integer division results to floating point numbers when necessary.', 'The chapter elaborates on the usage of increment and decrement operators in C++, providing examples of applying them as postfix and prefix, and clarifying the differences in their behavior.', 'It explains that snake case involves using lowercase letters and underscores to separate multiple words in a variable, while Pascal case requires capitalizing the first letter of every word.', 'The chapter notes that camel case is similar to Pascal case, but with the first letter of the first word being lowercase, and highlights the irrelevance of Hungarian notation due to the availability of powerful editors.']}, {'end': 3318.81, 'segs': [{'end': 2340.12, 'src': 'heatmap', 'start': 2257.252, 'weight': 0, 'content': [{'end': 2258.312, 'text': "So I'm gonna run the program.", 'start': 2257.252, 'duration': 1.06}, {'end': 2260.374, 'text': 'there you go, we have seven.', 'start': 2259.153, 'duration': 1.221}, {'end': 2263.217, 'text': "okay. so here's what i want you to remember.", 'start': 2260.374, 'duration': 2.843}, {'end': 2276.589, 'text': 'in math or any programming languages, the multiplication and division operators always have a higher priority than addition or subtraction operators,', 'start': 2263.217, 'duration': 13.372}, {'end': 2281.534, 'text': 'but we can always change the order of these operators using parentheses.', 'start': 2276.589, 'duration': 4.945}, {'end': 2295.062, 'text': 'So in this case, if you wrap this piece of code with parentheses, first this piece is evaluated so 1 plus 2 is 3, and then 3 is multiplied by 3..', 'start': 2282.094, 'duration': 12.968}, {'end': 2296.903, 'text': 'So the result is going to be 9.', 'start': 2295.062, 'duration': 1.841}, {'end': 2297.543, 'text': "Let's verify it.", 'start': 2296.903, 'duration': 0.64}, {'end': 2299.625, 'text': 'So run the program one more time.', 'start': 2298.084, 'duration': 1.541}, {'end': 2300.705, 'text': 'There you go.', 'start': 2300.085, 'duration': 0.62}, {'end': 2303.647, 'text': "Okay? Now here's your exercise for this lesson.", 'start': 2300.905, 'duration': 2.742}, {'end': 2307.108, 'text': 'Take this mathematical expression and implement it in C++.', 'start': 2304.167, 'duration': 2.941}, {'end': 2310.889, 'text': 'Assume x is 10 and y is 5.', 'start': 2307.228, 'duration': 3.661}, {'end': 2315.09, 'text': 'So if you implement this correctly, z is going to be 1.3.', 'start': 2310.889, 'duration': 4.201}, {'end': 2319.231, 'text': 'So pause the video and work on this for a couple minutes, then come back see my solution.', 'start': 2315.09, 'duration': 4.141}, {'end': 2324.451, 'text': "All right, here's the solution.", 'start': 2323.49, 'duration': 0.961}, {'end': 2327.893, 'text': "I'm going to declare x and set it to 10.", 'start': 2324.751, 'duration': 3.142}, {'end': 2330.834, 'text': 'Then y, we set it to 5.', 'start': 2327.893, 'duration': 2.941}, {'end': 2334.957, 'text': 'And for z, first we have to add 10 to x.', 'start': 2330.834, 'duration': 4.123}, {'end': 2340.12, 'text': 'But we have to wrap this in parentheses because this whole thing is going to be our numerator.', 'start': 2334.957, 'duration': 5.163}], 'summary': 'Multiplication and division operators have higher priority than addition or subtraction; implementing a mathematical expression in c++ yields z=1.3.', 'duration': 53.637, 'max_score': 2257.252, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb82257252.jpg'}, {'end': 2410.811, 'src': 'embed', 'start': 2383.476, 'weight': 7, 'content': [{'end': 2386.538, 'text': "So don't let that discourage you, and let's move on to the next lesson.", 'start': 2383.476, 'duration': 3.062}, {'end': 2398.394, 'text': 'So you have learned how to write to the console or the terminal window.', 'start': 2395.27, 'duration': 3.124}, {'end': 2402.9, 'text': "In this lesson, I'm going to show you a few more techniques for writing to the console.", 'start': 2398.835, 'duration': 4.065}, {'end': 2405.063, 'text': "So let's start by declaring a variable.", 'start': 2403.561, 'duration': 1.502}, {'end': 2410.811, 'text': "Now let's say on the terminal, we want to print x equals 10.", 'start': 2406.145, 'duration': 4.666}], 'summary': 'Lesson on writing to console, including variable declaration and print statement.', 'duration': 27.335, 'max_score': 2383.476, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb82383476.jpg'}, {'end': 2459.058, 'src': 'embed', 'start': 2431.685, 'weight': 3, 'content': [{'end': 2437.909, 'text': 'So, using cout, we can write a sequence of characters on the standard output, which is our console window right?', 'start': 2431.685, 'duration': 6.224}, {'end': 2444.533, 'text': 'Now these double left angle brackets are called the stream insertion operator.', 'start': 2438.469, 'duration': 6.064}, {'end': 2448.336, 'text': "It's an operator for inserting something to our output stream.", 'start': 2445.034, 'duration': 3.302}, {'end': 2454.017, 'text': "In this case, we're going to write a sequence of characters which we specify using double quotes.", 'start': 2449.016, 'duration': 5.001}, {'end': 2459.058, 'text': 'Now in programming or C++ specifically, this is called a string.', 'start': 2454.637, 'duration': 4.421}], 'summary': 'Using cout, we write characters to console with stream insertion operator.', 'duration': 27.373, 'max_score': 2431.685, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb82431685.jpg'}, {'end': 2690.669, 'src': 'heatmap', 'start': 2584.446, 'weight': 0.804, 'content': [{'end': 2588.49, 'text': 'We have a bit of repetition of std double colons.', 'start': 2584.446, 'duration': 4.044}, {'end': 2590.572, 'text': 'So we have repeated this in two places.', 'start': 2588.81, 'duration': 1.762}, {'end': 2592.614, 'text': 'Let me show you how to simplify this code.', 'start': 2591.053, 'duration': 1.561}, {'end': 2600.022, 'text': 'So before our main function, we use the using directive to pick up the std namespace.', 'start': 2593.215, 'duration': 6.807}, {'end': 2602.765, 'text': 'So here we type namespace std.', 'start': 2600.262, 'duration': 2.503}, {'end': 2614.31, 'text': "now std is defined anywhere in this file, so we don't have to repeat it in multiple places, so we can simply access all objects in the std namespace.", 'start': 2603.726, 'duration': 10.584}, {'end': 2623.277, 'text': "so let's remove that and this one as well, and finally, let's realign These brackets great.", 'start': 2614.31, 'duration': 8.967}, {'end': 2626.879, 'text': 'So now our code is cleaner, more concise, and easier to read.', 'start': 2623.777, 'duration': 3.102}, {'end': 2628.78, 'text': "Great Now here's your exercise.", 'start': 2627.219, 'duration': 1.561}, {'end': 2631.982, 'text': 'Imagine you have a store and you have made $95, 000.', 'start': 2629.48, 'duration': 2.502}, {'end': 2638.806, 'text': 'Now as part of your tax return, you have to pay state and county tax at different rates.', 'start': 2631.982, 'duration': 6.824}, {'end': 2643.328, 'text': 'So state tax is 4%, whereas county tax is 2%.', 'start': 2639.306, 'duration': 4.022}, {'end': 2651.133, 'text': 'Now I want you to write code to show your total sales, as well as your state tax, your county tax, and the total tax you have to pay on this income.', 'start': 2643.328, 'duration': 7.805}, {'end': 2656.7, 'text': 'So pause the video and work on this exercise for five minutes, then come back and see my solution.', 'start': 2651.673, 'duration': 5.027}, {'end': 2662.11, 'text': "All right, here's my solution.", 'start': 2661.049, 'duration': 1.061}, {'end': 2665.592, 'text': 'First, we need a variable for storing the total sales.', 'start': 2662.57, 'duration': 3.022}, {'end': 2667.793, 'text': "And for that, I'm going to use a double.", 'start': 2666.313, 'duration': 1.48}, {'end': 2673.337, 'text': "So even though we don't have any cent values here, but for monetary values, we should always use a double.", 'start': 2668.234, 'duration': 5.103}, {'end': 2676.439, 'text': 'So double sales equals 95, 000.', 'start': 2673.978, 'duration': 2.461}, {'end': 2681.363, 'text': "Now, right after, let's print the total sales.", 'start': 2676.439, 'duration': 4.924}, {'end': 2683.464, 'text': 'Here we add a dollar sign.', 'start': 2682.123, 'duration': 1.341}, {'end': 2684.385, 'text': "That's nicer.", 'start': 2683.844, 'duration': 0.541}, {'end': 2690.669, 'text': 'Then we chain the insertion operator to print sales, followed by the end of line.', 'start': 2685.065, 'duration': 5.604}], 'summary': "Simplify code by using 'using' directive for namespace std and calculate taxes based on $95,000 income: state tax at 4% and county tax at 2%.", 'duration': 106.223, 'max_score': 2584.446, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb82584446.jpg'}, {'end': 2656.7, 'src': 'embed', 'start': 2631.982, 'weight': 5, 'content': [{'end': 2638.806, 'text': 'Now as part of your tax return, you have to pay state and county tax at different rates.', 'start': 2631.982, 'duration': 6.824}, {'end': 2643.328, 'text': 'So state tax is 4%, whereas county tax is 2%.', 'start': 2639.306, 'duration': 4.022}, {'end': 2651.133, 'text': 'Now I want you to write code to show your total sales, as well as your state tax, your county tax, and the total tax you have to pay on this income.', 'start': 2643.328, 'duration': 7.805}, {'end': 2656.7, 'text': 'So pause the video and work on this exercise for five minutes, then come back and see my solution.', 'start': 2651.673, 'duration': 5.027}], 'summary': 'Tax return includes 4% state tax and 2% county tax.', 'duration': 24.718, 'max_score': 2631.982, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb82631982.jpg'}, {'end': 2970.902, 'src': 'embed', 'start': 2939.293, 'weight': 6, 'content': [{'end': 2940.294, 'text': "Don't write code like that.", 'start': 2939.293, 'duration': 1.001}, {'end': 2943.374, 'text': "Next we're going to talk about reading input from the user.", 'start': 2940.974, 'duration': 2.4}, {'end': 2954.657, 'text': "Alright, now let's see how we can read input from the console.", 'start': 2952.076, 'duration': 2.581}, {'end': 2956.097, 'text': "So yeah, I've learned that.", 'start': 2955.357, 'duration': 0.74}, {'end': 2960.614, 'text': 'cout represents the standard output string.', 'start': 2956.59, 'duration': 4.024}, {'end': 2965.538, 'text': 'now, in this file, in iostream, we have another object called cin,', 'start': 2960.614, 'duration': 4.924}, {'end': 2970.902, 'text': 'which represents the standard input stream which we can use for reading data from the console.', 'start': 2965.538, 'duration': 5.364}], 'summary': 'Learning about reading input from the console using cin and cout in iostream.', 'duration': 31.609, 'max_score': 2939.293, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb82939293.jpg'}, {'end': 3257.074, 'src': 'embed', 'start': 3233.073, 'weight': 4, 'content': [{'end': 3239.922, 'text': "Now in this lesson, we're going to look at a different part of the standard library that gives us several useful mathematical functions.", 'start': 3233.073, 'duration': 6.849}, {'end': 3246.968, 'text': "So on the top, We're going to use the include directive one more time to include a file called cmath.", 'start': 3240.603, 'duration': 6.365}, {'end': 3250.87, 'text': 'This file declares a bunch of useful mathematical functions.', 'start': 3247.648, 'duration': 3.222}, {'end': 3257.074, 'text': "Now, if you're curious what these functions are, just go to Google and search for cmath reference.", 'start': 3251.411, 'duration': 5.663}], 'summary': 'Lesson on using cmath for useful mathematical functions', 'duration': 24.001, 'max_score': 3233.073, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb83233073.jpg'}], 'start': 2205.305, 'title': 'C++ fundamental concepts', 'summary': "Discusses the order of priority of mathematical operators, c++ console output techniques, a practical exercise of tax calculation, and reading input from the console using 'cin' and stream extraction operator, including 'cmath' library and its functions.", 'chapters': [{'end': 2361.361, 'start': 2205.305, 'title': 'Mathematical operators and order of evaluation', 'summary': 'Discusses the order of priority of mathematical operators, emphasizing that multiplication and division have higher priority than addition or subtraction, and demonstrates this concept through an example, concluding with an exercise to implement a mathematical expression in c++.', 'duration': 156.056, 'highlights': ['Multiplication and division operators have a higher priority than addition or subtraction operators in math and programming languages.', 'Demonstration of using parentheses to change the order of operators and the resulting impact on the calculation.', 'Exercise to implement a mathematical expression in C++, emphasizing the practical application of the discussed concept.']}, {'end': 2631.982, 'start': 2361.962, 'title': 'C++ console output techniques', 'summary': 'Covers techniques for writing to the console in c++, including using cout to print variables and chaining multiple stream insertion operators to format the output. the chapter also introduces how to simplify and format the code for better readability and efficiency.', 'duration': 270.02, 'highlights': ['The chapter covers techniques for writing to the console in C++, including using cout to print variables and chaining multiple stream insertion operators to format the output.', 'The chapter also introduces how to simplify and format the code for better readability and efficiency.', 'The chapter emphasizes the importance of not being discouraged by initial difficulties in learning and encourages students to embrace the learning process.']}, {'end': 2938.713, 'start': 2631.982, 'title': 'Tax calculation exercise', 'summary': 'Covers a practical exercise of writing code to calculate and display total sales, state tax, county tax, and total tax based on given rates. the code is demonstrated with specific values and best practices for variable naming and code organization.', 'duration': 306.731, 'highlights': ['The chapter covers a practical exercise of writing code to calculate and display total sales, state tax, county tax, and total tax based on given rates.', 'The code is demonstrated with specific values and best practices for variable naming and code organization.', 'The state tax rate is 4%, and the county tax rate is 2%.']}, {'end': 3318.81, 'start': 2939.293, 'title': 'Reading input and mathematical functions', 'summary': "Covers reading input from the console using 'cin' and stream extraction operator, demonstrating reading various data types and chaining input statements. it also introduces the 'cmath' library and its functions, including 'ceil' and 'floor', to perform mathematical operations.", 'duration': 379.517, 'highlights': ["The chapter covers reading input from the console using 'cin' and stream extraction operator", "Introduces the 'cmath' library and its functions, including 'ceil' and 'floor', to perform mathematical operations", 'Demonstrates reading various data types and chaining input statements']}], 'duration': 1113.505, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb82205305.jpg', 'highlights': ['Multiplication and division operators have higher priority than addition or subtraction in math and programming languages.', 'Demonstration of using parentheses to change the order of operators and the resulting impact on the calculation.', 'Exercise to implement a mathematical expression in C++, emphasizing practical application.', 'Techniques for writing to the console in C++, including using cout and chaining stream insertion operators.', "Introduction of 'cmath' library and its functions, including 'ceil' and 'floor', for mathematical operations.", 'Practical exercise of writing code to calculate and display total sales, state tax, county tax, and total tax based on given rates.', "Demonstration of reading input from the console using 'cin' and stream extraction operator.", 'Emphasis on not being discouraged by initial difficulties in learning and encouraging students to embrace the learning process.']}, {'end': 3632.936, 'segs': [{'end': 3344.821, 'src': 'embed', 'start': 3319.17, 'weight': 0, 'content': [{'end': 3327.532, 'text': 'All I want you to pay attention to here is that this function takes an input of type double and returns another double.', 'start': 3319.17, 'duration': 8.362}, {'end': 3328.953, 'text': "So let's see this in action.", 'start': 3327.973, 'duration': 0.98}, {'end': 3331.714, 'text': 'so back to the code.', 'start': 3329.793, 'duration': 1.921}, {'end': 3340.219, 'text': 'here, in the main function, to use the floor function, we type floor, followed by a pair of parentheses, and then we supply the input value,', 'start': 3331.714, 'duration': 8.505}, {'end': 3342.52, 'text': 'which is called an argument.', 'start': 3340.219, 'duration': 2.301}, {'end': 3344.821, 'text': 'so we pass 1.2.', 'start': 3342.52, 'duration': 2.301}], 'summary': 'The function takes a double input and returns another double.', 'duration': 25.651, 'max_score': 3319.17, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb83319170.jpg'}, {'end': 3435.159, 'src': 'heatmap', 'start': 3369.521, 'weight': 1, 'content': [{'end': 3375.347, 'text': 'now we can print the result just like before, and the result is one.', 'start': 3369.521, 'duration': 5.826}, {'end': 3381.376, 'text': 'okay. now some functions take multiple values or multiple arguments.', 'start': 3375.347, 'duration': 6.029}, {'end': 3384.221, 'text': 'one of them is the pow, or power function.', 'start': 3381.376, 'duration': 2.845}, {'end': 3385.543, 'text': "so let's take a look.", 'start': 3384.221, 'duration': 1.322}, {'end': 3389.346, 'text': 'pow requires two arguments.', 'start': 3386.823, 'duration': 2.523}, {'end': 3392.509, 'text': 'here we need to pass two values separated by comma.', 'start': 3389.346, 'duration': 3.163}, {'end': 3397.534, 'text': 'so if we say two comma three, that means two to the power of three.', 'start': 3392.509, 'duration': 5.025}, {'end': 3405.722, 'text': 'now, when we type this, c lion adds these labels lcpp underline x and lcpp underline y.', 'start': 3397.534, 'duration': 8.188}, {'end': 3408.625, 'text': 'these are the name of the parameters of this function.', 'start': 3405.722, 'duration': 2.903}, {'end': 3412.788, 'text': 'So CLion adds this to make our code a bit more understandable.', 'start': 3409.286, 'duration': 3.502}, {'end': 3417.07, 'text': 'okay?. Now, if we run this, we get eight, okay?', 'start': 3412.788, 'duration': 4.282}, {'end': 3426.795, 'text': 'Now, as an exercise, I want you to write a program that asks the user to enter the radius of a circle, and then it should print the area of a circle.', 'start': 3418.21, 'duration': 8.585}, {'end': 3427.995, 'text': "It's pretty easy.", 'start': 3427.255, 'duration': 0.74}, {'end': 3429.816, 'text': 'You can knock it out in a couple of minutes.', 'start': 3428.215, 'duration': 1.601}, {'end': 3435.159, 'text': "All right, here's my solution.", 'start': 3434.158, 'duration': 1.001}], 'summary': 'Learning about using functions with multiple arguments and exercise on calculating the area of a circle.', 'duration': 28.013, 'max_score': 3369.521, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb83369521.jpg'}, {'end': 3540.934, 'src': 'embed', 'start': 3508.811, 'weight': 3, 'content': [{'end': 3513.155, 'text': 'We use comments to clarify our code and to make it easier to understand.', 'start': 3508.811, 'duration': 4.344}, {'end': 3516.657, 'text': "As I told you before, comments don't get compiled.", 'start': 3513.695, 'duration': 2.962}, {'end': 3520.921, 'text': 'Now in C++, we have a couple of different ways for writing comments.', 'start': 3517.338, 'duration': 3.583}, {'end': 3528.206, 'text': 'We can start with two forward slashes and whatever we type in front of these slashes will be considered a comment.', 'start': 3521.381, 'duration': 6.825}, {'end': 3532.77, 'text': 'Now we can add the slashes above a line or in front of it.', 'start': 3529.047, 'duration': 3.723}, {'end': 3540.934, 'text': "either way works, but as you can see, here we have limited space because we're basically bound to what is left here.", 'start': 3533.49, 'duration': 7.444}], 'summary': "In c++, comments are used to clarify code and don't get compiled. two forward slashes are used to write comments, which can be placed above or in front of a line.", 'duration': 32.123, 'max_score': 3508.811, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb83508811.jpg'}, {'end': 3615.841, 'src': 'embed', 'start': 3573.849, 'weight': 2, 'content': [{'end': 3580.671, 'text': 'these two characters represent the beginning of the block and these two characters represent the end of the comment block.', 'start': 3573.849, 'duration': 6.822}, {'end': 3584.674, 'text': 'What we put in between will be considered a multi-line comment.', 'start': 3581.371, 'duration': 3.303}, {'end': 3589.418, 'text': 'Now, different teams have different preferences in terms of which style of comments should be used.', 'start': 3585.214, 'duration': 4.204}, {'end': 3591.74, 'text': 'So there is really no right or wrong here.', 'start': 3589.918, 'duration': 1.822}, {'end': 3593.621, 'text': 'Just pick one style and stick to it.', 'start': 3592.06, 'duration': 1.561}, {'end': 3601.367, 'text': 'Now, one thing I want to emphasize about comments is that you should not overuse them because they make your code harder to understand and maintain.', 'start': 3594.262, 'duration': 7.105}, {'end': 3607.032, 'text': 'So you should use comments only to explain whys and hows, not whats.', 'start': 3601.868, 'duration': 5.164}, {'end': 3607.953, 'text': 'Let me show you what I mean.', 'start': 3607.272, 'duration': 0.681}, {'end': 3610.115, 'text': 'so here i can write a comment.', 'start': 3608.533, 'duration': 1.582}, {'end': 3615.841, 'text': "let's say, declare a variable and initialize it to zero.", 'start': 3610.115, 'duration': 5.726}], 'summary': 'Different teams have different preferences for comment styles. overusing comments can make code harder to understand and maintain.', 'duration': 41.992, 'max_score': 3573.849, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb83573849.jpg'}], 'start': 3319.17, 'title': 'Using functions and c++ comments', 'summary': 'Covers the usage of functions in c++ with examples such as the floor and pow functions, along with practical application in calculating the area of a circle. it also introduces the importance of comments in c++ and explains the different ways of writing comments, emphasizing their purpose and usage.', 'chapters': [{'end': 3508.231, 'start': 3319.17, 'title': 'Using functions and power function in c++', 'summary': 'Illustrates the usage of functions in c++, including the floor function for rounding numbers, the pow function for calculating powers, and practical application through a program to calculate the area of a circle, along with emphasizing the importance of avoiding magic numbers and introducing the concept of using comments in c++.', 'duration': 189.061, 'highlights': ['The floor function takes an input of type double and returns another double, demonstrated by using the floor function to round a number to its nearest integer value.', 'The pow function requires two arguments and can be used to calculate powers, as shown by using the pow function to calculate 2 raised to the power of 3, resulting in 8.', 'A practical application of using functions is demonstrated by creating a program to calculate the area of a circle, which emphasizes the importance of avoiding magic numbers and utilizing constants for better code readability and maintenance.']}, {'end': 3632.936, 'start': 3508.811, 'title': 'C++ comments overview', 'summary': 'Explains the different ways of writing comments in c++, including single-line and multi-line comments, while emphasizing the importance of using comments only to explain whys and hows, not whats.', 'duration': 124.125, 'highlights': ['Different ways of writing comments in C++', 'Importance of using comments only to explain whys and hows', 'No right or wrong style of comments']}], 'duration': 313.766, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb83319170.jpg', 'highlights': ['Demonstrated usage of floor function to round a number to its nearest integer value.', 'Illustrated the pow function to calculate 2 raised to the power of 3, resulting in 8.', 'Emphasized the importance of avoiding magic numbers and utilizing constants for better code readability and maintenance.', 'Explained the different ways of writing comments in C++.', 'Emphasized the importance of using comments only to explain whys and hows.', 'Highlighted that there is no right or wrong style of comments.']}, {'end': 4157.015, 'segs': [{'end': 3729.562, 'src': 'embed', 'start': 3656.291, 'weight': 0, 'content': [{'end': 3661.274, 'text': "In this section, we're gonna explore the fundamental data types in C++ in detail.", 'start': 3656.291, 'duration': 4.983}, {'end': 3665.397, 'text': "We'll talk about various built-in types, as well as their size and limits.", 'start': 3661.875, 'duration': 3.522}, {'end': 3670.461, 'text': "More specifically, we'll explore various types for representing numbers and their differences.", 'start': 3665.838, 'duration': 4.623}, {'end': 3676.105, 'text': "You'll learn how to generate random numbers, which is a very useful technique, especially for building games.", 'start': 3670.881, 'duration': 5.224}, {'end': 3683.829, 'text': 'You will also learn how to work with Boolean values, characters and strings, as well as arrays, which we use for storing a list of values.', 'start': 3676.505, 'duration': 7.324}, {'end': 3691.274, 'text': 'So by the end of this section, you will have a deep understanding of these fundamental data types and how to use them to write useful programs.', 'start': 3684.29, 'duration': 6.984}, {'end': 3694.175, 'text': "So now let's jump in and get started.", 'start': 3692.294, 'duration': 1.881}, {'end': 3712.161, 'text': 'So you have seen that in C++, to declare a variable, we need to specify its type.', 'start': 3707.034, 'duration': 5.127}, {'end': 3719.992, 'text': "That's why we say C++ is a statically typed language, meaning when declaring a variable, we need to specify its type,", 'start': 3712.622, 'duration': 7.37}, {'end': 3723.396, 'text': 'and this type cannot change throughout the lifetime of our program.', 'start': 3719.992, 'duration': 3.404}, {'end': 3729.562, 'text': 'other examples of statically type languages are C, sharp, Java, TypeScript and so on.', 'start': 3723.917, 'duration': 5.645}], 'summary': 'Explore fundamental data types in c++, including size, limits, and applications such as generating random numbers and working with boolean values, characters, strings, and arrays.', 'duration': 73.271, 'max_score': 3656.291, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb83656291.jpg'}, {'end': 4166.72, 'src': 'embed', 'start': 4136.492, 'weight': 3, 'content': [{'end': 4140.527, 'text': 'so if you run this program, we see number is 0..', 'start': 4136.492, 'duration': 4.035}, {'end': 4150.671, 'text': "However, if we remove the empty initializer here and run our program again, you can see we get this random value which we say it's garbage,", 'start': 4140.527, 'duration': 10.144}, {'end': 4154.674, 'text': 'and every time we run our program we get a different value.', 'start': 4150.671, 'duration': 4.003}, {'end': 4157.015, 'text': 'So this makes our programs unpredictable.', 'start': 4154.854, 'duration': 2.161}, {'end': 4166.72, 'text': 'So we should either initialize our variables using the assignment operator to a proper value, or we should use an empty brace initializer.', 'start': 4157.715, 'duration': 9.005}], 'summary': 'Initializing variables prevents unpredictable program behavior.', 'duration': 30.228, 'max_score': 4136.492, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb84136492.jpg'}], 'start': 3633.356, 'title': 'C++ fundamental data types', 'summary': 'Covers fundamental data types in c++ including various built-in types, their size and limits, techniques for generating random numbers, working with boolean values, characters, strings, and arrays, aiming to provide a deep understanding of these fundamental data types and how to use them to write useful programs. it also explains the difference between statically and dynamically typed languages and covers int, double, float, long, long long, bool, and char, as well as different ways to declare and initialize variables.', 'chapters': [{'end': 3694.175, 'start': 3633.356, 'title': 'Fundamental data types in c++', 'summary': 'Covers fundamental data types in c++ including various built-in types, their size and limits, techniques for generating random numbers, working with boolean values, characters, strings, and arrays, aiming to provide a deep understanding of these fundamental data types and how to use them to write useful programs.', 'duration': 60.819, 'highlights': ['The chapter covers various built-in types, their size and limits, techniques for generating random numbers, working with Boolean values, characters, strings, and arrays.', 'Learning to generate random numbers is a very useful technique, especially for building games.', 'By the end of this section, learners will have a deep understanding of fundamental data types and how to use them to write useful programs.']}, {'end': 4157.015, 'start': 3707.034, 'title': 'C++ data types overview', 'summary': 'Explains the difference between statically and dynamically typed languages, covers fundamental data types in c++ including int, double, float, long, long long, bool, and char, and discusses different ways to declare and initialize variables, such as using the auto keyword and brace initialization.', 'duration': 449.981, 'highlights': ['C++ is a statically typed language, requiring the specification of variable types, with int taking 4 bytes of memory and capable of storing numbers from minus 2 billion to plus 2 billion.', 'The chapter provides an overview of fundamental data types in C++, including int, double, float, long, long long, bool, and char.', 'Explanation of different ways to declare and initialize variables, such as using the auto keyword and brace initialization, which helps prevent assigning wrong values and makes programs more predictable.']}], 'duration': 523.659, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb83633356.jpg', 'highlights': ['The chapter covers various built-in types, their size and limits, techniques for generating random numbers, working with Boolean values, characters, strings, and arrays.', 'By the end of this section, learners will have a deep understanding of fundamental data types and how to use them to write useful programs.', 'C++ is a statically typed language, requiring the specification of variable types, with int taking 4 bytes of memory and capable of storing numbers from minus 2 billion to plus 2 billion.', 'Learning to generate random numbers is a very useful technique, especially for building games.', 'The chapter provides an overview of fundamental data types in C++, including int, double, float, long, long long, bool, and char.']}, {'end': 4970.045, 'segs': [{'end': 4244.244, 'src': 'embed', 'start': 4216.695, 'weight': 0, 'content': [{'end': 4222.644, 'text': 'a hexadecimal number can contain the digits 0 to 9, as well as the letters a to f.', 'start': 4216.695, 'duration': 5.949}, {'end': 4226.469, 'text': 'as you can see, hexadecimal numbers are more compact Now.', 'start': 4222.644, 'duration': 3.825}, {'end': 4230.072, 'text': 'in programming, we use hexadecimal numbers to represent colors.', 'start': 4226.469, 'duration': 3.603}, {'end': 4234.276, 'text': "You've probably heard of RGB, or red, green, blue colors.", 'start': 4230.633, 'duration': 3.643}, {'end': 4239.42, 'text': 'Using only six digits of a hexadecimal number, we can represent any color.', 'start': 4234.896, 'duration': 4.524}, {'end': 4240.401, 'text': "That's very useful.", 'start': 4239.64, 'duration': 0.761}, {'end': 4244.244, 'text': "We don't have to deal with really large decimal or binary numbers.", 'start': 4240.781, 'duration': 3.463}], 'summary': 'Hexadecimal numbers are more compact, used in programming for colors, represented by six digits.', 'duration': 27.549, 'max_score': 4216.695, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb84216695.jpg'}, {'end': 4410.355, 'src': 'embed', 'start': 4355.808, 'weight': 1, 'content': [{'end': 4361.054, 'text': "Now if we print this, instead of negative one, we're going to get this really large positive number.", 'start': 4355.808, 'duration': 5.246}, {'end': 4368.277, 'text': "So my suggestion is to stay away from the unsigned keyword, just because C++ has this feature doesn't mean you should use it.", 'start': 4361.554, 'duration': 6.723}, {'end': 4377.061, 'text': "That's why earlier in the course, I told you that you don't need to learn all of C++, all of its features to build useful and substantial programs.", 'start': 4368.697, 'duration': 8.364}, {'end': 4380.042, 'text': 'So stay away from the unsigned keyword.', 'start': 4377.721, 'duration': 2.321}, {'end': 4392.664, 'text': 'When working with numbers, a concept you need to understand is narrowing.', 'start': 4389.042, 'duration': 3.622}, {'end': 4397.567, 'text': 'And that happens when you initialize a variable of a smaller type using a larger type.', 'start': 4393.004, 'duration': 4.563}, {'end': 4398.628, 'text': "Here's an example.", 'start': 4397.928, 'duration': 0.7}, {'end': 4402.771, 'text': "Let's declare an integer called number and set it to 1 million.", 'start': 4399.208, 'duration': 3.563}, {'end': 4409.415, 'text': 'Now to make this code more readable, we can separate these digits using a single quote.', 'start': 4404.111, 'duration': 5.304}, {'end': 4410.355, 'text': "That's better.", 'start': 4409.955, 'duration': 0.4}], 'summary': 'Caution against using unsigned keyword in c++. understand narrowing when initializing variables. practice code readability.', 'duration': 54.547, 'max_score': 4355.808, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb84355808.jpg'}, {'end': 4649.914, 'src': 'embed', 'start': 4615.912, 'weight': 4, 'content': [{'end': 4624.52, 'text': 'Well, we have a function for getting the current time in terms of the number of seconds elapsed from January 1970..', 'start': 4615.912, 'duration': 8.608}, {'end': 4629.003, 'text': "If we use that function, every time we run our program, we're going to get a different number.", 'start': 4624.52, 'duration': 4.483}, {'end': 4629.724, 'text': 'Let me show you.', 'start': 4629.244, 'duration': 0.48}, {'end': 4637.227, 'text': 'So first on the top, we need to include another file called ctime.', 'start': 4632.665, 'duration': 4.562}, {'end': 4649.914, 'text': 'In this file, we have a function called time that returns the current time in terms of number of seconds elapsed from January 1st, 1970.', 'start': 4638.088, 'duration': 11.826}], 'summary': 'A function retrieves the current time in seconds from january 1970, resulting in a unique number on every program run.', 'duration': 34.002, 'max_score': 4615.912, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb84615912.jpg'}, {'end': 4750.194, 'src': 'embed', 'start': 4721.1, 'weight': 3, 'content': [{'end': 4731.127, 'text': 'Well, over here, where we generate the random number, We can use the modulus operator and specify the upper limit.', 'start': 4721.1, 'duration': 10.027}, {'end': 4736.413, 'text': "So if you type 10, that's going to return the remainder of division by 10.", 'start': 4731.587, 'duration': 4.826}, {'end': 4739.497, 'text': 'So that can only be numbers 0 to 9.', 'start': 4736.413, 'duration': 3.084}, {'end': 4740.658, 'text': 'Right? Take a look.', 'start': 4739.497, 'duration': 1.161}, {'end': 4742.881, 'text': 'So now we have 2.', 'start': 4741.459, 'duration': 1.422}, {'end': 4745.864, 'text': 'If we run our program again, we get 9, 3 and so on.', 'start': 4742.881, 'duration': 2.983}, {'end': 4750.194, 'text': 'Beautiful Now, we have a warning here under rand.', 'start': 4746.045, 'duration': 4.149}], 'summary': 'Using modulus operator to generate random numbers from 0 to 9.', 'duration': 29.094, 'max_score': 4721.1, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb84721100.jpg'}], 'start': 4157.715, 'title': 'Number systems and random numbers in c++', 'summary': 'Covers number representation in binary and hexadecimal, unsigned keyword, narrowing in variable initialization in c++, and generating random numbers using rand and srand functions in c++ with practical examples and coding best practices.', 'chapters': [{'end': 4522.915, 'start': 4157.715, 'title': 'Number systems and data representation', 'summary': 'Covers the representation of numbers in binary and hexadecimal systems, the use of hexadecimal numbers in programming, the concept of unsigned keyword, and the issue of narrowing in variable initialization in c++, providing practical examples and warnings.', 'duration': 365.2, 'highlights': ['Computers understand only 0s and 1s, leading to the use of binary or base 2 system for number representation.', 'Introduction of hexadecimal or base 16 numbers to shorten binary numbers and represent colors efficiently in programming.', 'Practical example of representing numbers in binary and hexadecimal systems in C++ using prefix 0b and 0x, showcasing their usage and equivalence.', 'Explanation of the concept of unsigned keyword in C++ and its potential problems when handling negative values, advising to stay away from its usage.', 'Demonstration of the issue of narrowing in variable initialization in C++, showing warnings and examples of data loss.']}, {'end': 4970.045, 'start': 4522.915, 'title': 'Generating random numbers in c++', 'summary': 'Explains how to generate random numbers in c++ using the rand and srand functions, as well as the ctime library, to create truly random numbers and limit their range, with practical examples and coding best practices.', 'duration': 447.13, 'highlights': ['The chapter explains how to use the rand and srand functions in C++ to generate random numbers, emphasizing their utility in creating games and the need to include the CSTD lib and ctime libraries for their usage.', 'It demonstrates the limitations of the rand function, stating that it provides the same number every time the program is run, and introduces the srand function to set the seed for the random number generator, showcasing different random values with varying seeds.', 'It introduces the concept of using the current time as the seed for the random number generator and demonstrates how to implement it using the ctime library, resulting in different random values with each program run.', 'The chapter explains how to limit the range of generated random numbers using the modulus operator and provides a practical example of limiting the range between 1 and 9.', "It recommends the use of constants instead of 'magic numbers' to enhance code readability and understanding, exemplifying the use of constants to represent minimum and maximum values in the context of generating random dice values."]}], 'duration': 812.33, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/ZzaPdXTrSb8/pics/ZzaPdXTrSb84157715.jpg', 'highlights': ['Introduction of hexadecimal or base 16 numbers to shorten binary numbers and represent colors efficiently in programming.', 'Demonstration of the issue of narrowing in variable initialization in C++, showing warnings and examples of data loss.', 'Explanation of the concept of unsigned keyword in C++ and its potential problems when handling negative values, advising to stay away from its usage.', 'The chapter explains how to limit the range of generated random numbers using the modulus operator and provides a practical example of limiting the range between 1 and 9.', 'It introduces the concept of using the current time as the seed for the random number generator and demonstrates how to implement it using the ctime library, resulting in different random values with each program run.']}], 'highlights': ['C++ is the language of choice for building performance-critical applications, video games, device drivers, web browsers, servers, and operating systems', 'The course promises to teach everything about C++ from basics to advanced concepts, enabling learners to write C++ code with confidence', 'C++ is still one of the fastest and most efficient languages, with an advantage over C# and Java', 'Average salary of a C++ programmer in the US is just over $170,000 a year', 'The chapter covers various built-in types, their size and limits, techniques for generating random numbers, working with Boolean values, characters, strings, and arrays', 'The instructor is a software engineer with over 20 years of experience and has taught millions of people how to code through this channel and online school', 'The chapter discusses the major functionalities in the C++ standard library, such as data structures like lists and maps, and algorithms for searching and sorting data', 'The process involves creating a new project, specifying the project location, and naming the project', 'The chapter explains the naming conventions for variables and classes in C++, highlighting the use of camel case for variables and constants and pascal case for classes, promoting consistency in code readability and maintenance', 'The chapter details the usage of mathematical expressions for performing calculations in C++, covering addition, subtraction, multiplication, and division, emphasizing the need to convert integer division results to floating point numbers when necessary']}