Array of Structures & Pointer to Array Program example | C++ Programming

Поділитися
Вставка
  • Опубліковано 14 гру 2024

КОМЕНТАРІ • 144

  • @SimpleSnippets
    @SimpleSnippets  5 років тому +11

    Hey Guys, if you want more such tech educational videos on this channel then please support me by subscribing to this channel & also share it with your friends as it helps me create more content just for you ✌

    • @PrinceKumar-el7ob
      @PrinceKumar-el7ob 4 роки тому +1

      WE ARE ALSO TRYING BRO KEEP UPLOADING FASTLY DATA STRUCTURES PART

  • @NOBODYUSEFULL
    @NOBODYUSEFULL 5 років тому +2

    You could also write cin>>n and in for loop write i

  • @anands9407
    @anands9407 5 років тому +20

    ARRAY!!this was top CLASS and well STRUCTURED :P...and yes to the POINT

    • @SimpleSnippets
      @SimpleSnippets  5 років тому +1

      Hehehe thank you so much Anand 😉 this was a very creative comment 😂🤟 I would request you to please share the video with your friends too ☺️

  • @aliasgxr.07
    @aliasgxr.07 2 роки тому +1

    Explained it in a simple way!

  • @pankajjagtap2355
    @pankajjagtap2355 4 роки тому +14

    dude i am here to revise my concepts and i am already learning new things

    • @SimpleSnippets
      @SimpleSnippets  4 роки тому +1

      Thats really great to know buddy🙏 Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇

  • @abhinavkumar5000
    @abhinavkumar5000 6 років тому +22

    You explain far better than our school teacher
    thanks a lot bro :)

    • @SimpleSnippets
      @SimpleSnippets  6 років тому +3

      Hello Abhinav, thank you so much for such a wonderful feedback buddy. Means a lot to me. I would request you to please share this video with your friends. That will be the best help ✌️😊

    • @abhinavkumar5000
      @abhinavkumar5000 6 років тому +2

      Definitely bro! I'll surely do that

    • @SimpleSnippets
      @SimpleSnippets  6 років тому +1

      Thank you so much bro for your support ✌️😊

  • @shariharan2002
    @shariharan2002 5 років тому +4

    this is a very efficient video taken my school teacher took 120 minutes to teach this i did not attend it due to some reasons this video saved my day thanks a lot

    • @SimpleSnippets
      @SimpleSnippets  5 років тому

      Thank you so much for the positive feedback buddy 😊. Please share the video with your friends too ✌️ that'll be the best help and support 😊

    • @shariharan2002
      @shariharan2002 5 років тому +2

      Shared it already in my class whatsapp group

    • @SimpleSnippets
      @SimpleSnippets  5 років тому

      Thank you so much buddy. That's the best support for our channel and everyone ✌🏻

  • @Black-pt9ux
    @Black-pt9ux 5 років тому +31

    Anyone Noticed that he is being harsh with his innocent keyboard...xD

    • @SimpleSnippets
      @SimpleSnippets  5 років тому +11

      Lol 😂 not that harsh, actually the audio recorder is pretty close to the keyboard so it picks up that sound. But yeah I do type fast and a bit hard 😛 no fun otherwise 😂

  • @deacastelli
    @deacastelli 5 років тому +5

    You are an amazing teacher!! You make the explanation and understanding of the topics waaay easier! Keep the good work!!

    • @SimpleSnippets
      @SimpleSnippets  5 років тому +1

      Most welcome Andrea 😊 glad to hear this from you. Please do share the videos with your friends too 😬😇🤘

  • @lazar2949
    @lazar2949 6 років тому +4

    Thank you, your videos are amazing, very easy to understand and follow.

    • @SimpleSnippets
      @SimpleSnippets  6 років тому

      Thank you so much Lazar for such a wonderful review ❤️
      Please do share this video with your friends and contacts 😇 and keep sharing the knowledge 😇

  • @VINEET_
    @VINEET_ 3 роки тому +1

    Man your way of teaching the concept is next level thanks alot 😍😍

  • @uniqueversalunicorn2412
    @uniqueversalunicorn2412 6 років тому +3

    Superb and Easy Explanation dude

    • @SimpleSnippets
      @SimpleSnippets  6 років тому +1

      Thank you so much for the feedback buddy. Glad to hear this. Please do share the video with your friends too 😇✌️

  • @irhcsa
    @irhcsa 4 роки тому +3

    Amazing, this was so easy to understand. Thanks!

    • @SimpleSnippets
      @SimpleSnippets  4 роки тому

      That's great to know buddy, please do Subscribe to our channel as we have a lot tech educational content which you'll surely like. Also please do share our channel and videos with your friends too, that's the biggest help and support you can provide buddy ✌️

  • @prakharjain9068
    @prakharjain9068 4 роки тому +2

    GOD BLESS YOU SIR..!!

    • @SimpleSnippets
      @SimpleSnippets  4 роки тому +1

      Thank you Prakhar, glad to hear this from you. please do share the videos with your friends too. Thats the biggest help and support you can provide 😇

  • @ashokdurunde1814
    @ashokdurunde1814 4 роки тому +2

    thanks bro watchin in lockdown 2020
    and keep it up bro
    congratulations for 100k sub.
    i have sub. recently.
    thanks one again.

    • @SimpleSnippets
      @SimpleSnippets  4 роки тому

      Thank you so much 😀 Welcome to Simple Snippets Family!

  • @vikramsingh-xz8uk
    @vikramsingh-xz8uk 4 роки тому +1

    ur explanation is very good

    • @SimpleSnippets
      @SimpleSnippets  4 роки тому

      Thank you so much Vikram, please do share the videos with your friends too. Thats the biggest help and support for our channel ✌

  • @deepalipatil9899
    @deepalipatil9899 4 роки тому

    Awesome !!!! No-one can explain better than these videos !!! very well structured and explained.

  • @samrudhinawale756
    @samrudhinawale756 4 роки тому +1

    Thanks for explaining it so well!

    • @SimpleSnippets
      @SimpleSnippets  4 роки тому

      Glad it was helpful! Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇

  • @ashishkumar-fg7ph
    @ashishkumar-fg7ph 3 роки тому

    You make my day thank you sir

  • @kishanthc7657
    @kishanthc7657 5 років тому +1

    Thank God u explained it in English ..plz continue

    • @SimpleSnippets
      @SimpleSnippets  5 років тому

      Most welcome buddy. Please do share the video with your friends too ✌️😊

  • @johannesvanderzwan7122
    @johannesvanderzwan7122 5 років тому +4

    Thanks a lot for the video. I am looking for how to fill a list with a struct, perhaps you can help.

  • @tamimcs
    @tamimcs 5 років тому +2

    Thank you man.

    • @SimpleSnippets
      @SimpleSnippets  5 років тому

      Thank you so much buddy, please share the video with your friends too. Thats the biggest help and support 😇

  • @susanvijay1606
    @susanvijay1606 5 років тому +1

    Tysm! Bttr than the school explanation

    • @SimpleSnippets
      @SimpleSnippets  5 років тому

      Thanks buddy 😊 glad to know this. Do share the video with your friends too 😊

    • @susanvijay1606
      @susanvijay1606 5 років тому

      @@SimpleSnippets suree

  • @sarak9250
    @sarak9250 3 роки тому +1

    Why did you take (i+1) for entering the details of person?

  • @nagadhanushbadminton9865
    @nagadhanushbadminton9865 6 років тому +2

    good i m now through in structures .

    • @SimpleSnippets
      @SimpleSnippets  6 років тому

      That's great to hear buddy. There are many more videos on C++ programming on our channel. Infact I have complete c++ programming tutorial series so do check it out. Also if you liked this video please do share it with your friends 😇✌️

  • @muhammadnoman2635
    @muhammadnoman2635 3 роки тому

    Excellent

  • @mbusamuhesi1077
    @mbusamuhesi1077 6 років тому +1

    thanks for the work done

    • @SimpleSnippets
      @SimpleSnippets  6 років тому

      You're welcome buddy. Do share this video with your friends and contacts :-)

  • @nikkolim1460
    @nikkolim1460 5 років тому +1

    THANKS ALOT MAN! U EARN A SUB!

    • @SimpleSnippets
      @SimpleSnippets  5 років тому

      Thank you so much buddy, I am glad to hear this from you. Please do share the videos with your friends & Definitely SUBSCRIBE. Thats the biggest help & support 😇✌

  • @coolpadnote3744
    @coolpadnote3744 6 років тому +1

    Bro your are best

    • @SimpleSnippets
      @SimpleSnippets  6 років тому +1

      Thank you so much buddy. I'm glad you liked this video and hope it helped you ✌️
      Please do share the videos with your friends and contacts so that even they get to learn these concepts. 😇

  • @robellegesse5206
    @robellegesse5206 3 роки тому

    Thank u 💞

  • @prathamgwari9027
    @prathamgwari9027 6 років тому +1

    great efforts bro

    • @SimpleSnippets
      @SimpleSnippets  6 років тому

      Thank you so much buddy :-) super happy to hear this from you and glad that this video helped you 😇
      I would request you to please share the video with your friends too. That'll be the best help and support for everyone 🤟😁😊

  • @B__MdEktiarHossen
    @B__MdEktiarHossen 5 років тому +1

    Thank you dear sir love you sir

    • @SimpleSnippets
      @SimpleSnippets  5 років тому

      Most welcome my friend. Please share the videos with your friends too buddy ✌️

  • @craymoncommunity6211
    @craymoncommunity6211 7 років тому +4

    Hi Tanmay,
    Nice video.
    Add simple data structures. Explain linked list, nodes and all those things in next videos. Please...
    Thanks

    • @SimpleSnippets
      @SimpleSnippets  7 років тому +2

      Thank you so much Abhishek.. Yes Data Structures complete playlist is going to be coming soon. but before that I need to cover full C++ Object Oriented Programming part.Do share this video with your friends and contacts, and like always keep up the support buddy ✌😇

    • @craymoncommunity6211
      @craymoncommunity6211 7 років тому +3

      Okay Thanks Tanmay.
      Waiting for series.
      One more thing that will surprise you. In my school your videos are used to explain the Flip Flop concepts. I am in class xii. My computer teacher asked that there is any online document or videos to explain the class xi students then I told him about your channel. The next day when I gone to our school's activity hall, then I was just surprised that my teachers are showing your video of flip flop through projector and explaining to students.
      👍

    • @SimpleSnippets
      @SimpleSnippets  7 років тому +2

      +Abhishek Verma wow Abhishek, this is so nice to hear buddy. Which school are you in? And infact you can let your school teachers know that if they need any IT subjects in video format I can make the video series on UA-cam for them. It's so nice to hear this buddy. Really feeling happy and all thanks to you and your support ✌️😇

    • @SimpleSnippets
      @SimpleSnippets  7 років тому +2

      +Abhishek Verma oh I just realized, I have not put any videos of flip flops😅 it must be half after and full adder and other Boolean algebra concepts 😅

    • @craymoncommunity6211
      @craymoncommunity6211 7 років тому +3

      Simple Snippets Yes, I am telling about the boolean algebra Videos. But they used your videos because your channel name and logo is there. They opened your boolean algebra playlist. More things I will tell you by emailing you. Have you remembered, We both talked through email a month ago.
      You're videos are great. I share your videos with all my CS friends, whenever you upload. My friends also like your videos.

  • @hendryamalraj2896
    @hendryamalraj2896 5 років тому

    What type of compiler are you using for c++ in pc , the link that given below description is not working

  • @venkatakrishnanramesh4718
    @venkatakrishnanramesh4718 6 років тому +1

    Array of structure

  • @raghavjhunjhunwala9971
    @raghavjhunjhunwala9971 6 років тому

    Had one question, why did you use getline while taking the input for the name? You could've simply used "cin>>p1.name"
    Is there any special reason behind using getline? And if you could give a brief explanation of getline.
    Thanks

    • @husnatouseef1688
      @husnatouseef1688 6 років тому +1

      It's just the easier way to write there's no difference in it

    • @raghavjhunjhunwala9971
      @raghavjhunjhunwala9971 6 років тому

      @@husnatouseef1688 Thanks mate

    • @maanav_77
      @maanav_77 2 роки тому +1

      I know i am too late to reply but get line is used for taking string input with spaces 🙂

  • @anugrahsingh9204
    @anugrahsingh9204 2 роки тому

    Bro can we use normal pointer instead of array pointer for user input 12: 06

  • @fakeraees5790
    @fakeraees5790 2 роки тому

    Sir in the first code it is not taking name after space.. So what amendment we have to made to accept after space.. When i am using getline then its is giving me error that name not declared in the scope... Plz can you tell me The command of calling string name to main function and entrying the full name?

  • @roshanes225
    @roshanes225 4 роки тому +1

    thks bro

    • @SimpleSnippets
      @SimpleSnippets  4 роки тому

      Thanks buddy, glad to hear this from you. Please do share the videos with your friends too & definitely subscribe to our channel. Thats the biggest help and support you can provide ✌😇

  • @MrBloodman123
    @MrBloodman123 2 роки тому

    I was wondering if it is possible to create Array of Class similarly to Array of Structs ?

  • @harismehmood9371
    @harismehmood9371 3 роки тому

    can you explain what if the members is array and we have to return strucutre array from another function..

  • @prakashpaulraj4361
    @prakashpaulraj4361 3 роки тому

    Bro , in this case how to bring a value stored already instead of getting from user

  • @manishadas7434
    @manishadas7434 5 років тому +1

    i have a quesn,if we have structures to dispaly data for whatever number of objects we want,then what is the need for class???

  • @vinuiamrocking
    @vinuiamrocking 5 років тому +1

    What's the benefit of pointer to structures over array of structures?

    • @SimpleSnippets
      @SimpleSnippets  5 років тому

      Well pointers concept is totally different from arrays. I didn't get the question clearly.

    • @vinuiamrocking
      @vinuiamrocking 5 років тому

      @@SimpleSnippets where we need pointer to structures?
      Array on structures suits more for the scenario in this video

  • @satvikjha8932
    @satvikjha8932 4 роки тому

    why was getline() not used in this??

  • @chintaphaniramavaibhav3714
    @chintaphaniramavaibhav3714 3 роки тому

    please provide functions and arrays usage mixed in the structures

  • @abhishekmohanty232
    @abhishekmohanty232 5 років тому +1

    what i think is that this can be done in a even simpler way without using structures as follow:
    #include
    #include
    using namespace std;
    int main()
    {
    string name[2];

    int age[2];
    double salary[2];
    for(int i=0;i

  • @santoshbiradar9517
    @santoshbiradar9517 4 роки тому +1

    hello sir..could u pls suggest any pdf or ebook on c++ available on internet to download free

    • @SimpleSnippets
      @SimpleSnippets  4 роки тому

      For starters check this - simplesnippets.tech/courses/cpp-programming-tutorials-for-beginners/

  • @MuhammadSaad-oy8bo
    @MuhammadSaad-oy8bo 5 років тому +1

    yaarr broo.... plz make a video on pointer to structure array too... in this u didnt show us that what if we needed to create a structure for large number of student and take input for that using pointer to structure array.

  • @radu5282
    @radu5282 4 роки тому +1

    Hello there, do you or anyone here knows how to sort for example n cars from the not so powerfull car to the most powerfull
    Can you write in like code or something just the part where I need the sort function ?
    Thanks in advance :))

  • @AdamScrimz
    @AdamScrimz 3 роки тому

    What if I have an array of 50 structures but only want to take user input for 1. And I do not want it to be a specific one, but rather the user's input values would be assigned to whichever next entry is available in the array.

  • @jacobblack2544
    @jacobblack2544 5 років тому +1

    Try making on turbo c++

  • @seba23571
    @seba23571 6 років тому +1

    Is there any difference between struct and class?

    • @SimpleSnippets
      @SimpleSnippets  6 років тому +8

      Good question. Yes the 2 major difference are as follows -
      1) Members of a class are private by default and members of struct are public by default.
      2) When deriving a struct from a class/struct, default access-specifier for a base class/struct is public. And when deriving a class, default access specifier is private.
      Apart from this, pretty much everything is the same ✌

  • @christopherlugod9022
    @christopherlugod9022 5 років тому

    How to initialize array of structure in vc++?

  • @khadijanaheed8310
    @khadijanaheed8310 6 років тому

    hello sir! i have a question! what is the purpose of an array of pointers to object??
    i have searched a lot but can't find proper answer..

  • @poojasanklecha2719
    @poojasanklecha2719 4 роки тому

    Hey I have been trying to use getline function here by replacing cin>>P[i].name by getline(cin, P[i].name). I have been trying to figure out since half hour why does process inside for loop executes only 1 time & then it stops. What could be the possible solution? Could anyone please help :)
    Note: I am talking about the middle part of the video where p1 is converted into array .

  • @TubeVeva
    @TubeVeva 4 роки тому

    So bro, who teach you programming ?

  • @shubhamkumarsingh
    @shubhamkumarsingh 4 роки тому

    I m getting error while doing this using pointer.
    Tried a lot. Copied your programme line by line. Also tried different ide but still getting errors either at compilation or during runtime. Please help!
    @simple snippets

  • @hemanthmusic1933
    @hemanthmusic1933 6 років тому +2

    Hi ,I have a doubt can u plz help me

    • @SimpleSnippets
      @SimpleSnippets  6 років тому

      Sure let me know ✌️

    • @hemanthmusic1933
      @hemanthmusic1933 6 років тому +1

      How can I insert full structure into a file in c++

    • @SimpleSnippets
      @SimpleSnippets  6 років тому

      You'll have to use a loop to iterate through all the values inside a structure. You can do this by creating a separate function ✌️

    • @hemanthmusic1933
      @hemanthmusic1933 6 років тому

      @@SimpleSnippets can u please give me some example code

    • @hemanthmusic1933
      @hemanthmusic1933 6 років тому

      @@SimpleSnippets hi please give me example code

  • @syedfawaz4043
    @syedfawaz4043 4 роки тому +2

    Anyone noticed the time was around 1 at midnight?

    • @SimpleSnippets
      @SimpleSnippets  4 роки тому

      Hahah yeah work all night buddy 😅🙂

    • @syedfawaz4043
      @syedfawaz4043 4 роки тому +2

      Anyways good work, can understand well 👍

    • @SimpleSnippets
      @SimpleSnippets  4 роки тому

      @@syedfawaz4043 thank you buddy. Means a lot for this positive comment 🤘

    • @ar3568row
      @ar3568row 4 роки тому +1

      BTW most of videos have midnight timings

  • @PrashantSingh-mc6cn
    @PrashantSingh-mc6cn 6 років тому +1

    hey bhai what do you do i am your new subscriber contiue making it

    • @SimpleSnippets
      @SimpleSnippets  6 років тому

      I make CS/IT video tutorials on this channel 😇And welcome to the Simple Snippets Family 👍

  • @hashimmaniyar7702
    @hashimmaniyar7702 3 роки тому

    Bro in this array programme you took the name datatype as string, i too did the same but i want the program to take the complete name not jst the furst name could you help me with it,i tried to use the process of getline() as u have shown in ur last video but it didnt help could you pls help with it. by the way love your content keep growing,stay blessed

    • @maanav_77
      @maanav_77 2 роки тому

      Getline(cin,name);

  • @pepguardiola6220
    @pepguardiola6220 3 роки тому

    can i have code for array structs

  • @eiantala9200
    @eiantala9200 4 роки тому

    Mine said no viable conversion when i tried it

  • @nimishagarwal1436
    @nimishagarwal1436 5 років тому +1

    Wowwwwww

  • @rjstyxer
    @rjstyxer 5 років тому

    where is Pointer to Array ???

  • @kingshaine2408
    @kingshaine2408 5 років тому +1

    my programming teacher is cancelledt

  • @lacasadesaturno9497
    @lacasadesaturno9497 6 років тому +1

    9000 views

  • @technicalahlawat9690
    @technicalahlawat9690 4 роки тому +1

    Can't you explain in hindi 🙄😏

    • @SimpleSnippets
      @SimpleSnippets  4 роки тому +1

      Nope. This channel is for global audience which prefers English only 🤟

  • @sametbal9759
    @sametbal9759 5 років тому

    i had to mute this channel bec his voice .....

    • @SimpleSnippets
      @SimpleSnippets  5 років тому

      Sometimes when I hear myself I feel this too LOL. Hope you managed to understand the concept though. If you did, then you are great! 😝

  • @sharifhussain9850
    @sharifhussain9850 6 років тому

    you type less and talk more...

    • @SimpleSnippets
      @SimpleSnippets  6 років тому +1

      cause I gotta explain it I suppose 😅✌️

    • @saravananj7161
      @saravananj7161 6 років тому

      What ever u teach sounds gud...but it's highly volatile.....how could I remember it

  • @tcstone89
    @tcstone89 6 років тому +1

    It took me a minute before I even realized you were speaking English. Your accent is super heavy which can make it difficult to follow.

    • @SimpleSnippets
      @SimpleSnippets  6 років тому +1

      Yeah it's Indian accent. Can't really modulate that a lot though ✌️

    • @jasminesyan3505
      @jasminesyan3505 6 років тому +2

      use your ears idiot. What do you expect him to do about his accent

    • @SimpleSnippets
      @SimpleSnippets  6 років тому

      @@jasminesyan3505 thank you so much for your support Jasmine ❤️😇