No video

C++ Structures for beginners (explained in 30 minutes) + Test your programming knowledge!

📚 Learn how to solve problems and build projects with these Free E-Books ⬇️
C++ Lambdas e-book - free download here: bit.ly/freeCpp...
Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObj...
🚀📈💻🔥 My Practical Programming Course: www.codebeauty...
Experience the power of practical learning, gain career-ready skills, and start building real applications!
This is a step-by-step course designed to take you from beginner to expert in no time!
💰 Here is a coupon to save 10% on your first payment (CODEBEAUTY_YT10).
Use it quickly, because it will be available for a limited time.
Download Visual Assist here: bit.ly/WT-CB
I use it to enhance the performance, features, and support for C, C#, and C++ development in Visual Studio.
Download Ultra Edit here: bit.ly/UE_CB
It is a powerful, secure text editor designed specifically for programmers.
In this video, I'm explaining C++ structures for beginners. Structures are user-defined data types. They are used to represent information about something more complicated than a single number, character, array of numbers, characters, etc. So, you can use a structure to represent information about a Person, an Animal, a Sport, a Game, a Car...
In this 30-minute programming tutorial, you will learn what are structures in programming, how to create structures, why to use them, how to create variables of the struct type.
All of these topics are covered in the "Introduction to structures" part of this video.
You'll also learn how to use structures and functions and how to pass a structure as a parameter to a function.
In the final part of the video, I'll show you what are nested structures and how to use structure inside another structure
In the end, you can find a task that you can use to test your programming knowledge, together with some useful tips.
In the description, you can also find videos that can help you to solve the programming test.
☕ If you've found my content helpful and would like to support me, you now have the option to buy me a coffee or a cookie! It's a small gesture of gratitude that means a lot to me and helps me keep creating free educational videos for you. Use the link to make a contribution: bit.ly/CodeBea...
However, please don't feel obligated to do so. I appreciate every one of you, and I will continue to share valuable content with you regardless of whether you choose to support me in this way. Thank you for being part of the Code Beauty community! ❤️😇
Contents:
00:00 - Intro
01:08 - Introduction to C++ structures for beginners
15:28 - C++ structures and functions
20:38 - Nested structures, How to use struct inside another struct
27:05 - Test your programming knowledge!
29:29 - Review of the program that you should build
31:42 - Tips to solve the programming test
34:04 - Suggestions to upgrade the program
Videos that can help you to solve the programming test:
For loop - • C++ FOR BEGINNERS (202...
Nested do while and for loops - • C++ FOR BEGINNERS (202...
Nested for loop 1 - • C++ FOR BEGINNERS (202...
Nested for loop 2 - • C++ FOR BEGINNERS (202...
Arrays - • DATA STRUCTURES - How ...
Related videos:
Basic Data Types in C++ - • C++ FOR BEGINNERS (202...
Functions playlist - • C++ functions
Add me on:
Instagram 📸 - / truecodebeauty
Twitter 🐦- / truecodebeauty

Пікірлер: 631

  • @CodeBeauty
    @CodeBeauty3 жыл бұрын

    📚 Learn how to solve problems and build projects with these Free E-Books ⬇️ C++ Lambdas e-book - free download here: bit.ly/freeCppE-Book Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObjectPascalEbook 🚀📈💻🔥 My Practical Programming Course: www.codebeautyacademy.com/ Experience the power of practical learning, gain career-ready skills, and start building real applications! This is a step-by-step course designed to take you from beginner to expert in no time! 💰 Here is a coupon to save 10% on your first payment (CODEBEAUTY_YT10). Use it quickly, because it will be available for a limited time.

  • @syedusamamanzoor1838

    @syedusamamanzoor1838

    2 жыл бұрын

    Hi Saldina! How do structures compare to classes?

  • @rkumar2365

    @rkumar2365

    2 жыл бұрын

    definitely, you are a very good teacher.

  • @SpoonerBlackWolf
    @SpoonerBlackWolf2 жыл бұрын

    #include using std::cout; using std::cin; using std::string; using std::endl; struct Question{ // ** Struct with question + 3 answer and a int for the correct choice ** string questionText; string answer[3]; int correctAnswer= NULL; }; bool correctAnswer(int correct) { // ** ask and check if the answer is correct or not with a bool ** int answer; cout > answer; while (answer > 3 || answer cout > answer; } if (answer == correct) { // check if the answer is correct cout

  • @photogyulai

    @photogyulai

    Жыл бұрын

    thanks! I learned a lot about function-bool-struct features from this one.

  • @TheCrypt1c

    @TheCrypt1c

    Жыл бұрын

    Just use ''using namespace std;'' at this poiint lol

  • @deadlyq9299

    @deadlyq9299

    Жыл бұрын

    Good but you could have used structure array

  • @nithilana

    @nithilana

    Жыл бұрын

    Nice. But structure array will reduce the redundant lines of your code. Try using that. Here is my code for reference. #include using namespace std; int score; struct Quiz{ string question; int answer; }; struct Options{ string option1; string option2; string option3; }; void results(Quiz *questions,Options *options){ for(unsigned int i=0;i

  • @orestesdd

    @orestesdd

    Жыл бұрын

    If I were you, instead of writing (or coding) "question1", ..., "question5", I would have code an array of questions for 5 elements, and thus your code could be more compact.

  • @Eliel10268
    @Eliel102683 жыл бұрын

    please post c++ algorithms and data structures full course. thanks

  • @TheJaniczek

    @TheJaniczek

    3 жыл бұрын

    There are books describing this subject. If you don't want to read books use those from the STL.

  • @simaobonvalot9141

    @simaobonvalot9141

    3 жыл бұрын

    @@TheJaniczek what books do you recommend ?

  • @TheJaniczek

    @TheJaniczek

    3 жыл бұрын

    @@simaobonvalot9141 it depends what you need. K.Sayood Data Compression, Adam Drozdek Data structures and algorithms I have this one in Polish and his book also on data compression. Any book by Robert Sedgewick with C or C++ on algorithms is also very good. Cheers.

  • @simaobonvalot9141

    @simaobonvalot9141

    3 жыл бұрын

    @@TheJaniczek I was thinking about a book with solid foundations about C / C++ . In English or portuguese preferably..

  • @colinmaharaj
    @colinmaharaj3 жыл бұрын

    I am actually writing an ORM to abstract my SQL statements. One of the thing I did was create a way to map my C structures into the ORM like a virtual structure. Heavy use of pointers to the structure elements was used and became very helpful in the abstraction.

  • @nikhiljha3168
    @nikhiljha31683 жыл бұрын

    //Task Completed👍 #include using namespace std; struct quiz{ string question; string option1; string option2; string option3; int answer; }; void display(quiz q){ cout

  • @tebellosephofane9907

    @tebellosephofane9907

    2 жыл бұрын

    Amazing😍😍...But i recognize few flaw on the 2 last questions of the Quiz.

  • @onur7192

    @onur7192

    2 жыл бұрын

    its correct but you had to used arrays instead of writing question 1 by 1.

  • @marklondon1911

    @marklondon1911

    2 жыл бұрын

    amazing >

  • @manuelalejandrohernandezma9317
    @manuelalejandrohernandezma93173 жыл бұрын

    My God, you´re like an angel that came to teach us C++! Thank you so much!

  • @peter2611
    @peter26113 жыл бұрын

    You are amazing, but you forgot to answer the most important question of all - what is the difference between a struct and a class... the answer is: The only difference between a struct and class in C++ is the default accessibility of member variables and methods. In a struct they are public; in a class they are private (at least per my understanding).

  • @Kephers7

    @Kephers7

    3 жыл бұрын

    Most programming classes or structured college courses teach to always specify access modifiers explicitly in your code anyways, which somewhat makes the point moot to people with formal classes. But for beginners who do not take formal classes, you do have a point.

  • @cassolmedia

    @cassolmedia

    3 жыл бұрын

    thanks. i was surely wondering

  • @yashsonawane905

    @yashsonawane905

    3 жыл бұрын

    1) Well you can not have methods/functions inside a structure. 2) Structur is used for small stuff and class is used for big stuff 3) In struct members are public by default whereas in class they are private by default.

  • @stevenlace7902

    @stevenlace7902

    3 жыл бұрын

    @@yashsonawane905 Structs can be large and complex. Remember, they existed before the concept of classes came to be. Which is why you rarely pass a large struct to a function by value, but rather a pointer to the struct.

  • @kartikrai1ify

    @kartikrai1ify

    3 жыл бұрын

    Structures are stored in stack memory while classes use heap memory. A major difference which tells us about the time complexity and memory complexity.

  • @SA-oj3bo
    @SA-oj3bo2 жыл бұрын

    I was wondering when to use a struct and when to use classes + objects. 2) I think it is always good to show the teacher's solution so we can compare it with ours! Thx for nice tutorials..

  • @chippandenga6722
    @chippandenga67223 жыл бұрын

    #include using namespace std; int main() { const int ANSWER_COL = 4; const int ARRAY_ROW_SIZE = 5; const int ARRAY_COL_SIZE = 5; const int BASE_INDEX = 0; short int iCorrectCount = 0; string strAnswer = ""; printf(" Choose the correct answer from the given options. "); printf(" There are five questions to answer and for each question, you must choose "); printf(" from the three options provided, which is the correct answer... "); printf(" ... Good Luck!/Bahati njema! "); string queArray[ARRAY_ROW_SIZE][ARRAY_COL_SIZE] = { {"a) Who was SA's first democratic president?", "1. T.M. Mbeki", "2. H.W. de Klerk", "3. N. Mandela", "3"}, {"b) Which is the biggest soccer team in South Africa?", "1. Kaizer Chiefs", "2. Orlando Pirates", "3. Mamelodi Sundowns", "1"}, {"c) Which of these planet is the closest to the Sun?", "1. Mars", "2. Jupiter", "3. Mercury", "3"}, {"d) Which mammal has 98% of genealogy similar to homo sapiens'?","1. Monkey", "2. Chimpanzee", "3. Orangutan", "2"}, {"e) Which member of the pop group New Edition was ejected from the group?", "1. M. Bivin", "2. B. Brown", "3. R. Bell", "2"} }; for (int i=0;i

  • @patrpatl
    @patrpatl6 ай бұрын

    This teacher really wants a lot of comments and likes and shares. Lets give her it. Thank you for the free tutorial.

  • @CodeBeauty

    @CodeBeauty

    6 ай бұрын

    I do, that way my tutorials will reach and teach more people 😁 thank you 🥰

  • @Muhammad_Haris130

    @Muhammad_Haris130

    6 ай бұрын

    So take my comment as well then.

  • @zoominghoo6676
    @zoominghoo66762 жыл бұрын

    这是我在最近一个周以来,看您的第21个视频了;我从未见过如此优秀低调的老师!谢谢您!

  • @mrCetus
    @mrCetus2 жыл бұрын

    The iPhone 12 starts at $799 + Storage capacity. Storage capacity options: 64 GB , 128 GB and 256 GB. The Samsung Galaxy S21 Ultra starts at $1.299 + Storage capacity. Storage capacity options: 128 GB , 256 GB and 512 GB. The more storage you want, the more it costs. Thank you very much for the videos that you upload. They really help me to switch from Java and C to C++.

  • @zaeshanvlogs3746
    @zaeshanvlogs37463 жыл бұрын

    Youre teaching method is excellent, you deserve wayyyyy more views. Dont stop, youll go wayy big some day!

  • @CodeBeauty

    @CodeBeauty

    3 жыл бұрын

    🙏💙

  • @salihbarknakkaya8101
    @salihbarknakkaya81014 ай бұрын

    For last 5 day I am just searching out your channel and you even write a comment to me this morning. It is finally feeling me like "I CAN UNDERSTAND!" thanks for everything, you are the best teacher ever!

  • @CodeBeauty

    @CodeBeauty

    4 ай бұрын

    I'm happy that you're here and learning 😊

  • @tushargoutam3180
    @tushargoutam31803 жыл бұрын

    Mam I have a request .Can You Please make a tutorial on "File and Exception handling " in c++

  • @steveperrott520
    @steveperrott5203 жыл бұрын

    Hello Saldina, I am learning to code in order to create a trading robot in Metatrader 5. I find your teaching moves along nicely. Thank you for doing these C++ lessons.

  • @sinno2861
    @sinno28613 жыл бұрын

    I didn't understand that part where you said create a structure for answers as well but this is how I did it. I hope it's fine this way as well. It's working completely fine. Please check it out. #include #include struct Question { std::string Questiontext; std::string options[3]; int Correctanswer; }; int main() { Question question[3]; question[0] = { "What's your favorite animal?", {"Dog", "Cat", "Rabbit"}, 2}; question[1] = { "What is your favorite show?", {"Drake & Josh", "BTR", "iCarly"}, 1}; question[2] = { "What is your favorite color?", {"blue", "green", "red"}, 1}; for (int i = 0; i

  • @saig5857

    @saig5857

    3 жыл бұрын

    thanks

  • @andewprod

    @andewprod

    5 ай бұрын

    oh wow that was exactly what i was searching for! Your code is short and sweet! Questions are rather funny lol.

  • @sinno2861

    @sinno2861

    5 ай бұрын

    @@andewprod haha thanks! I'm glad it helped.

  • @1m_here
    @1m_here3 жыл бұрын

    Programming is fascinating it can make our life more easier I'm lazy and hate doing things on repeat

  • @sprintwithcarlos
    @sprintwithcarlos3 жыл бұрын

    I love C++! I'll give it a try to the quiz app this weekend on my free time. Thanks Saldina, you have helped me a lot!

  • @jeremyrogers520
    @jeremyrogers5202 жыл бұрын

    I am working on my MSCS and your videos greatly help me

  • @prasannakayitha5172
    @prasannakayitha51723 жыл бұрын

    Great explanation! My interest in coding is being developed by watching your videos and by practicing them. Thanks a lot

  • @Golden_touch85

    @Golden_touch85

    Жыл бұрын

    Hi

  • @Sekhar_Home
    @Sekhar_Home3 жыл бұрын

    Slowly gaining momentum in c++ with you only.. A big biggggg thanx.. As i am getting into embedded tech, ur c++ giving me boost.

  • @rotelearners1264

    @rotelearners1264

    3 жыл бұрын

    @sekharathome Can you guide me on how to get started with embedded tech? I am an ECE student.

  • @milanrai1556
    @milanrai15563 ай бұрын

    I love the way you said "Like this" at the end. Learning a lot ma'am 🤘🤘

  • @CodeBeauty

    @CodeBeauty

    3 ай бұрын

    🥰

  • @emagallanes89
    @emagallanes893 жыл бұрын

    Saldina, I enjoy studying C/Cpp and I absolutely appreciate you videos!

  • @darrylsmith8739
    @darrylsmith87393 жыл бұрын

    Hi Saldina. You ask us to print our code so I will. I added a couple of touches. Hope you don`t mind, teacher...lol. struct Test{ string question[2]; string choices[2]; }; void Menu(Test test1){ cout

  • @grasshopper005
    @grasshopper0053 жыл бұрын

    Namaste Saldina! Your teaching approach is so cool. Gotta tell you, this is the best c++ channel. keep up the good work.

  • @chippandenga6722
    @chippandenga67223 жыл бұрын

    Thank you, I think nobody explains anything better than you do. You are great!!!

  • @joselorenzosoren7288
    @joselorenzosoren7288 Жыл бұрын

    I am new to programming dont whether this is the correct way to do this or not, but somehow this works #include #include using namespace std; struct questionOptions { string OptionA{}; string OptionB{}; string OptionC{}; int correctAnswer{}; }; questionOptions que; void assignAns(string opt1, string opt2, string opt3, int CorrectAnswer) { que.OptionA = opt1; que.OptionB = opt2; que.OptionC = opt3; que.correctAnswer = CorrectAnswer; } int main(){ vector questions{ "Largest Country in the world?", "How many states are there in India?", "Biggest animal?", "Non Rectangular flag of the country", "Prime Minister of India" }; int queSize = questions.size() - 1; for (int i = 0; i

  • @thembamshishi5874
    @thembamshishi58743 жыл бұрын

    its funny how my lectures completed C++ course in 2 years but I never came across Structures even today I don't know how to code a binary tree with Genuine Understanding I follow tutorials with Classes (OOP) Prior Knowledge...but I appreciate your content Miss/Mrs though I came late to the party am lucky that they don't have expiry date haa lol ❤️😜

  • @fatemehalavi8226
    @fatemehalavi82262 жыл бұрын

    thank you for your excellent videos you're a great teacher i'm learning computer engineering at the university but in your vedeos you explain these topics better than my proffs in the university they are easier to underestand thank you so much❤😍

  • @nyokkongor3517
    @nyokkongor35172 жыл бұрын

    This must be the best channel for C++

  • @baconsledge
    @baconsledge3 жыл бұрын

    These are excellent courses that I am using as a refresher as I mostly use C for embedded code but love C++.

  • @bearsoundzMusic
    @bearsoundzMusic3 жыл бұрын

    One thing i have learned is not to use single letter variables. The reason is that it is sooo tedious to search for a single-letter variable in a larger program. Just using 'ps' as 'person' instead of 'p' can save you from a lot of grief. Loop-Iteration-vars like 'i' is an exception, from that recommendation.

  • @TheCrypt1c

    @TheCrypt1c

    Жыл бұрын

    I guess this depends on the fact if its a local variable or a global variable

  • @ahmedyousef5514
    @ahmedyousef5514 Жыл бұрын

    Make structure contain:(string question and array of choise build by for loop) for each question and make comon answer array 0,1 take the cin of user then make answer array forloop increment value for correct ans

  • @Atom-ji1ot
    @Atom-ji1ot3 жыл бұрын

    What a good explanation.

  • @dariokartal9453
    @dariokartal94533 жыл бұрын

    Haven't touched C/C++ in a while, but off the top of my mind, without compilation, from an unsaved Notepad: struct quizzQuestion { string question; string answerA; string answerB; string answerC; char correctAnswer; // 'a' or 'b' or 'c' }; int QuizzThemOnThis (quizzQuestion q) { cout

  • @dariokartal9453

    @dariokartal9453

    3 жыл бұрын

    Didn't listen to her past 30:20

  • @davidclepol276
    @davidclepol2762 жыл бұрын

    Just came across this video....your explanation and demonstration is unique. this is the most easy to understand struct video i have ever come across . thanks so much for this video.

  • @Gamer_0033
    @Gamer_00333 жыл бұрын

    You make learning C++ easy for me thank you

  • @user-mw2xf9qf2m
    @user-mw2xf9qf2m11 ай бұрын

    Hi ! Saldina . i hope you are doing fine ? i watchcd this tutorial yeasterday 29/august/2023 and i understood what is structure and how they work. thank you about that . the quiz of last part of lesson i was did, but i don't use loops b/c .l don't know how to use loops in that more and different questions. i only use array, structure, and cout, cin .

  • @pg.idrees
    @pg.idrees3 жыл бұрын

    I can't believe that u r back 😊😊

  • @CodeBeauty

    @CodeBeauty

    3 жыл бұрын

    Back to stay 🤗💗💗

  • @moularaoul643
    @moularaoul6433 жыл бұрын

    I first like before listening to the course. Thank you!!!

  • @shakeebahmed7246
    @shakeebahmed72463 жыл бұрын

    Hello saldina, Your videos are so helpful for us. I stop watching other videos on c++, your videos are more than enough for me. Also sharing your videos with my friends to help reach 1M subscriber soon.😊😊

  • @CodeBeauty

    @CodeBeauty

    3 жыл бұрын

    Thank you so much! You are helping to teach other people by sharing! That is so generous and nice of you!🙏💙

  • @NOPerative
    @NOPerative2 жыл бұрын

    Excellent video. The output (cout) examples tied everything together; clean, succinct and paced very well with focused instruction and description (treatment).

  • @JordanCassady
    @JordanCassady2 ай бұрын

    In 2024 the iPhone 12 costs about $800

  • @marcinzale
    @marcinzale3 жыл бұрын

    Another very good tutorial! Thanks!

  • @AzeemKhan-sr4my
    @AzeemKhan-sr4my3 жыл бұрын

    Plz share the solution and upload videos twice a week plz.... They helped us a lot

  • @adamloepker8057
    @adamloepker8057 Жыл бұрын

    You should do a video with a counter to see how many requests for comments are possible in one lesson... (I was resisting commenting as hard as I could too! Well earned.)

  • @saijadhav4
    @saijadhav43 жыл бұрын

    Thank you so much..... Your content is really Fricking cool❗❗ Congratulations for the 30K subs, u surely deserve more....keep making 😊💯

  • @CodeBeauty

    @CodeBeauty

    3 жыл бұрын

    Thank you so much! I'm very happy and grateful for every single person who watches and likes my videos! 🤗🧡🧡

  • @CuriousAndCuriouser1865
    @CuriousAndCuriouser18653 жыл бұрын

    Why would someone use a structure instead of a class and vice versa? They seem to have the same syntax.

  • @doublej118jc
    @doublej118jc2 жыл бұрын

    Nice presentation! One thing I would ad is the use of arrays of structures so the same structure can be used repeatedly to store different values of the same type.

  • @madezra64
    @madezra643 жыл бұрын

    Officially subscribed. I'm currently learning C++ and your videos, alongside all my C++ books and Udemy course is helping me a lot. Thank you for your quality content. Also, you're gorgeous!

  • @lucksayes873
    @lucksayes8732 жыл бұрын

    I am watching the tutorial in june 2022 and the i phone cost is $699 right now. Greetings CodeBeauty. Thanks for your videos they've helped me a lot. I wanna become a software engineer.

  • @rkumar2365
    @rkumar23652 жыл бұрын

    definitely, you are a very good teacher.

  • @aphelmusonda5253
    @aphelmusonda52532 жыл бұрын

    you're strong 💪 thank you

  • @CodeBeauty

    @CodeBeauty

    2 жыл бұрын

    You're brave! Thanks 😃🤗

  • @chesshooligan1282
    @chesshooligan12823 жыл бұрын

    My answer to that question is there's no way I'm paying anything close to those prices for a phone, and I still wouldn't if I was a millionaire. Another great tutorial, as usual. Thank you.

  • @isaacllanas2828
    @isaacllanas28283 жыл бұрын

    You should do a video about c++ applications in real world , it will be so interesting your perspective!

  • @softwaresolutions3111
    @softwaresolutions31112 жыл бұрын

    Hello Code Beauty. Great to see a fellow developer on the platform. Keep up the good work.

  • @adilkhalid6625
    @adilkhalid66253 жыл бұрын

    Your explanation is very wonderful, I loved it and benefited a lot from it But i have question , What's different between structure and Class

  • @CodeBeauty

    @CodeBeauty

    3 жыл бұрын

    Thanks! Structure members are public by default, and class members are private 🤗🤗

  • @user-uz6pe9sf9o
    @user-uz6pe9sf9o8 ай бұрын

    amazing presentation. You just make coding easy and fun!

  • @fourat9710
    @fourat97102 жыл бұрын

    Samsung used to be better both at performance and price but since last 3-4 years they raised their prices to match these of apple , which is crazy overpriced. Great lessons 👍 keep going

  • @jasphercadelina4577
    @jasphercadelina45773 жыл бұрын

    You're the best modern c++ teacher in KZread University

  • @bositkhonsidikov8528
    @bositkhonsidikov85283 жыл бұрын

    What a great and amazing definition!!! Thank you very much 🤗🤗🤗

  • @mutawakkilsanusibabasidi3859
    @mutawakkilsanusibabasidi3859 Жыл бұрын

    #include #include using namespace std ; struct Quiz { string Question; string Answer[3]; }; void Info(Quiz q) { cout

  • @nebertngari6627

    @nebertngari6627

    Жыл бұрын

    Wow i like this answer. Very direct and simple to understand. Thanks.

  • @mutawakkilsanusibabasidi3859

    @mutawakkilsanusibabasidi3859

    Жыл бұрын

    @@nebertngari6627 you're welcome

  • @nebertngari6627

    @nebertngari6627

    Жыл бұрын

    @@mutawakkilsanusibabasidi3859 I have tried running this code but it ain't working.

  • @mutawakkilsanusibabasidi3859

    @mutawakkilsanusibabasidi3859

    Жыл бұрын

    On which IDE??

  • @nebertngari6627

    @nebertngari6627

    Жыл бұрын

    @@mutawakkilsanusibabasidi3859 Visual Studio code

  • @mattgraves3709
    @mattgraves370910 ай бұрын

    Reporting from 2345 and the iPhone 111 is only 1899.99 Andromedian Shmooolians, (189⁷ US dollars) Also I am a professional lead Android engineer, have been writing Android apps since 2008 with G1 so am partial to Android.

  • @reemabdella4443
    @reemabdella4443 Жыл бұрын

    Hope you guys are enjoying coding, Here is my program which I have tried. #include #include #include using namespace std; struct question1{ string question; int choice[3]; }; void printques1(question1 qu) { int correct=2; for(int i=0;i

  • @reemabdella4443

    @reemabdella4443

    Жыл бұрын

    Keep going dear😍

  • @user-mv9jz5ew1e

    @user-mv9jz5ew1e

    5 ай бұрын

    @@reemabdella4443 its been a year

  • @rahmaalghafri8057
    @rahmaalghafri80572 жыл бұрын

    The best explanation ever!!!!! Thank you .

  • @simalkhan4261
    @simalkhan42613 жыл бұрын

    Hello Mam! i try to solve this problem in Dev C++ Software #include using namespace std; int main() { // Question number1 cout

  • @kerekesakos6930

    @kerekesakos6930

    2 жыл бұрын

    I did it the same, but instead of IF i used switch. #include using std::cin; using std::cout; using std::endl; using std::string; main() { cout

  • @ankitraj4991
    @ankitraj49913 жыл бұрын

    Ma'am please make a series on DS & Algo :)

  • @CodeBeauty

    @CodeBeauty

    3 жыл бұрын

    In progress... 🤞😊

  • @YouTubehandler910
    @YouTubehandler91020 күн бұрын

    Here 😁 youre the best in our school youre helpful

  • @CodeBeauty

    @CodeBeauty

    20 күн бұрын

    🥰🥰

  • @monkshoodtv
    @monkshoodtv2 жыл бұрын

    I have seen a few of your KZread videos on C++ and found them very well presented, easy to follow and informative in detail. However, on this occasion I found this to be a bit difficult to follow; seemingly a ramble through the process, lacking in explanatory detail. But, in the end, I had learned little. Nevertheless thanks for the stunning effort. Thanks.

  • @daviddomenici7940
    @daviddomenici79402 жыл бұрын

    wow !!! thanks for the exercise, it wasn't easy for me but I did it :) at least it works, I don't know if the path taken is the right one but it's already a satisfaction tanks again.

  • @maytezhou2585
    @maytezhou25853 жыл бұрын

    #include #include #include using namespace std; struct Option{ string text; }; struct Question { string text; Option options[3]; string correctAns; }; // Creating a function int answerCorrect( Question question,int numOfOptions){ // returns the correct answer in terms of number, making a match between the correct answer and one of the options provided int correct; for (int j = 0 ; j if ( question.options[j].text == question.correctAns) { correct = j +1; break; }else{ correct = -1 ; } } return correct ;// can return 1,2,3 or -1 } int main() { Question questions[100]; // supposed that the Trivia can have at most 100 questions string question; string option; string correctAns; int numOfOptions; int numberOfQuestions; cout numOfOptions; for (int i =0 ; i cout

  • @sffscholars5347

    @sffscholars5347

    2 жыл бұрын

    i need this its not working please help

  • @Balazur
    @Balazur3 жыл бұрын

    12:00 ctlrl+shift+left || right = copy block of text at the left || right side of the cursor. ;) P.S. +up||down, pgup||pgdown, home || end...

  • @andyvarella6336
    @andyvarella63366 ай бұрын

    Easy to understand explanation of structures. Thanks CodeBeauty.

  • @rnd1sir347
    @rnd1sir3472 жыл бұрын

    Salina please do vectors; and how they interact with objects and pointers.

  • @evans8245
    @evans82453 жыл бұрын

    /** Re-usable log function */ #define log(param) std::cout

  • @daneddieloayon2701
    @daneddieloayon2701 Жыл бұрын

    So much better than my professor 🥰😍

  • @isaacnaughton5206
    @isaacnaughton52063 жыл бұрын

    A clear and concise explanation. Thank you.

  • @amanpratapsingh6056
    @amanpratapsingh60563 жыл бұрын

    ma'am please make videos on Data Structures & solution of this quiz problem. Ma'am really love your way of teaching. Just keep going.❤ You are the only one who focus more on foundation. Thank you ma'am.

  • @JustBasicJoseph
    @JustBasicJoseph Жыл бұрын

    I think I did it right... great tutorial btw!!! #include #include #include #include #include using namespace std; vectorcounting; //need to count how many answers correct. vector totalcount (int number) { int tcount; tcount += number; counting.push_back(tcount); return counting; } struct Question { string text_question_prompt; int answer = 0; int count = 0; }; void PrintQuestion(Question question) { int user_input; int count_num; cout > user_input; if (question.answer == user_input) { count_num++; cout

  • @varunabp5581
    @varunabp55812 жыл бұрын

    Very good and useful video...Task to test our knowledge is the best portion here....it would be good if u can provide the test after each video....

  • @hassannawaz661
    @hassannawaz6613 жыл бұрын

    Awesome! I was looking for this! Thanks beauty.

  • @williamwambua7710
    @williamwambua77103 жыл бұрын

    Yes!!!!!!!!!!!!!!!!!! Make a video we go through it and also add one more example in that video showing how we can store the structures in case we are making lets say a project on cars...whereby at the end we will need to output a kind of form for all cars. Thank Youuuuuu

  • @genzo53
    @genzo532 жыл бұрын

    Your approach is very good. I'd recommend your videos to beginners learning C++. I wish I had sources like this when I learned C++ 25 years ago. BTW, in my experience C++ sucks and I reverted to good ol` C, but that's a topic for another conversation.

  • @agirlindenial8752

    @agirlindenial8752

    2 жыл бұрын

    why didn't cpp workout for you?

  • @justcurious1940

    @justcurious1940

    Жыл бұрын

    ​@@agirlindenial8752 c++ does not work for native english speakers

  • @Kaptiv239
    @Kaptiv2392 жыл бұрын

    My only criticism is that you show the first example of code and make it seem like it’s going to be too much to maintain if there were thousands of phones…but then you go on and add way more code and I didn’t feel like I understood why your strategy of a structure and functions somehow produced less code. Also, as a beginner, I tend to run into a lot more questions/problems/quizzes/tests on code that involves math/logic and I’ve rarely encountered strings. I understand that strings made it easier to explain, but I’d love to see some math examples! Great job

  • @AhmedRaza-ty7zq
    @AhmedRaza-ty7zq Жыл бұрын

    iPhone 12 Pro and iPhone 12 Pro Max will be available in 128GB, 256GB, and 512GB models in graphite, silver, gold, and Pacific blue starting at $999 and $1,099, respectively

  • @johnlaidlaw5724
    @johnlaidlaw5724 Жыл бұрын

    Love your videos! You do an excellent job! Thank you!

  • @CodeBeauty

    @CodeBeauty

    Жыл бұрын

    You are so welcome! 🥰

  • @meemdt7455
    @meemdt74552 жыл бұрын

    How do I do it with an user Input? For example the user should input his name, age and so on...and then the console should output the list

  • @chemixschool
    @chemixschool3 жыл бұрын

    Excellent tutorial. Keep up the good work.

  • @md.yousufali4698
    @md.yousufali46982 жыл бұрын

    QuizApplication is done, Form Bangladesh. I follow your C++ videos. Thanks

  • @studentschannel1784
    @studentschannel17843 жыл бұрын

    Congratulations for getting 63.1K subscribers, keep going on

  • @MariusDiMaio
    @MariusDiMaio26 күн бұрын

    Thanks Saldina for your teaching. Please make other video for template and webserver

  • @darrylsmith8739
    @darrylsmith87393 жыл бұрын

    Hi Saldina. I did it with structures and I used a do while loop instead of nesting. It works fine. You are a great teacher. I had trouble passing the array references into the structure so I had to set the arrays manually. Did you use pointers in yours.?

  • @Menahel19
    @Menahel19 Жыл бұрын

    PLEASE MAKE A VIDEO FOR THIS QUIZ APLICATION :) would be a great help.🥰🥰 you are 100% a perfect teacher.😍 I learned I understand all the concepts. Thank you so much for this kindness on all of us

  • @TheJoshuamcgowan
    @TheJoshuamcgowan2 жыл бұрын

    super stoked mql5 is based on c++ haha // CB you rock!

  • @mohammadrakibbhuyan3667
    @mohammadrakibbhuyan36672 жыл бұрын

    Your tutorial is really helpful for me. Amazing

  • @grayfoxtrots
    @grayfoxtrots3 жыл бұрын

    I enjoyed the upload and won’t be able to attempt the homework soon. Will progress your videos in order so I’ll be coming back to it.

  • @prajyot2021
    @prajyot20212 жыл бұрын

    really loved your teaching style

  • @dineshG419
    @dineshG4193 жыл бұрын

    Congrats for 35k followers and keep going ahead

  • @SwagGM
    @SwagGM7 ай бұрын

    So yeah here's the code for the final quiz, using arrays and structures: #include #include using namespace std; struct Question{ string question; string option1; string option2; string option3; int answer; bool isCorrect(int ans){ if(ans==answer){ cout

  • @MBPCTutorials

    @MBPCTutorials

    7 ай бұрын

    What do you think? we are kind of similar, it really amazes me that there are many methods of solving problems don't you think? #include #include #include using namespace std; const int NUM_QUESTIONS = 5; struct Question { string question; string answer[3]; int correctAnswer; }; bool printQuestionAndAnswer(Question question, int userInput){ cout

  • @SwagGM

    @SwagGM

    7 ай бұрын

    @@MBPCTutorials yeah, lmao, nice