Templates or Generics Part 1 | C ++ Tutorial | Mr. Kishore

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

КОМЕНТАРІ • 66

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

    Please Comment, Subscribe and Click Bell🔔🔔🔔 Icon for More Updates. To learn software course from our experts please register here for online training: goo.gl/HIB0wL

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

      I may be couple years late but a better method to call these functions would be to specify the typename like so sum (5, 6); and if using float then sum(5.5f, 6.6f); like this...

  • @stonecoldcold2941
    @stonecoldcold2941 6 років тому +35

    sir , u are the best teacher..I was zero in coding..Now I can say that I am decent enough now..Thanks a lot sir..all coz of u

  • @aniketkumar3126
    @aniketkumar3126 4 роки тому +16

    sir in main()
    while printing float sum=
    cout

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

    One correction - use sum instead of float in ostream fn.

  • @mardhapuhareesh4553
    @mardhapuhareesh4553 6 років тому +24

    sir float type sum function printing time you have to use float instead of sum

  • @vivekmalkapuram705
    @vivekmalkapuram705 7 років тому +21

    There is a mistake in main function i.e. in second function call you have written float but that is sum(1.1, 2.2)

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

      Its a basic mistake ....can happen to any1 ..

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

      vivek malkapuram
      Fuck off

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

      @@qR7pK9sJ2t see ur name @sanskari boy ans think about ur comment

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

    Thank you sir. Your lectures are really great and easy to comprehen. I wish I had a teacher like you in my college.

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

    This playlist is best for c++

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

    what if one argument is float and another is integer..??

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

    thank u soo much ....its very easy to understand in your session.

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

    Nreash It technology channel will always be the best to learn programming, Thank you sir

  • @Sameerashaik-w3y
    @Sameerashaik-w3y 7 місяців тому

    Thank you sir! I don't need to read even text book sir🙌

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

    Wow what a fabulous lecture sirgi and I have a doubt can we implement char type here or not ?!!??

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

    Kishore sir ur doing the best job

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

    Favorite sir😍

  • @MoneyPasandKhana9
    @MoneyPasandKhana9 Рік тому

    if we are having different data type addition like (2.2, 2)then can we use only or we have to used?? and wht return type ll be?

    • @M_S__7
      @M_S__7 Рік тому

      is used if arguments are of different datatypes but if both arguments are of same datatype then is used.

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

    In main function for integer u wrote sum(5,9). but for float why did u write float(1.1,2.2) instead of sum(1.1,2.2)?

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

      Hey .
      In this video.
      He is using template on a function.
      But why written class there?.

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

      @@nikhilflautist That is the basic syntax of defining a template for a function. U can understand it as like for every objects classes are the templates and for every functions and classes templates are the templates. Hence for class templates and function Templates we use the keyword class for defining a template.

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

    Thank's , sir for explain this about c++ template. ✌️

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

    kishore sir , classes are superb, I like him very much.... !

  • @gagankashyap8201
    @gagankashyap8201 7 років тому +1

    thanks for tutorial, it really helps in last minute. thank you sir!

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

    #include

    template
    t add(t a,t b){
    return a+b;
    }

    int main()
    {

    int a,b;
    std::cout

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

    amazing teaching sir....

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

    no animation no smart boards but still best in class lectures 🤩🤩

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

    Awesome explanation sir...thank u so much sir...

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

    nice sir respect from NEPAL

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

    I've exam in 13minutes😂😘

  • @Ankur-zd4db
    @Ankur-zd4db 4 роки тому

    wow great sir ...nice explanation !!!!

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

    Nice explanation

  • @vangacharukya164
    @vangacharukya164 Рік тому

    hi sir, nice explanation but as per code how we will execute the code for char DT

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

    Excellent sir,thank you

  • @wasit-shafi
    @wasit-shafi 5 років тому

    nice video sir...... can u explain what if arguments are of int & float and return type is also different

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

    extreamly good sir

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

    Sir,Which book you are using?

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

    program not working when write sum(3,5.4) but works when sum(int,int) or sum(float,float)
    not work for(int,float) and (float,int)
    why is it so?

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

      for this see next video

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

      #include
      using namespace std;
      template
      t2 sum(t1 a,t2 b)
      {
      return a+b;
      }
      int main()
      {
      float c=sum(5,3.5);
      cout

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

    Nice video sir ji

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

    Sir it gives error as...t cannot start a parameter declaration..

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

    Pls explain about place holder

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

    Sir class templates and inheritance gurinchi cheppara plzzzz

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

    Thank you sir
    Your make more videos

  • @JaspreetSingh-tu9hf
    @JaspreetSingh-tu9hf 2 роки тому

    Good sir

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

    Super sir

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

    Sir can u plss write in big letters it is not visible for me

  • @raghavamopidevi9700
    @raghavamopidevi9700 Рік тому

    #include
    using namespace std;
    template
    c add(c x,c y)
    {
    return(x+y);
    }
    int main()
    {
    cout

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

    Very Easy

  • @saraswathibai4373
    @saraswathibai4373 7 років тому +1

    super

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

    thanks a lot sir

  • @purvampatel7188
    @purvampatel7188 Рік тому

    sir apkpo yaha pe pdhane se kya milta hain ? Kitna kama lete ho sal ka placements se jyada milta hain to hum bhi padhana shuru kar lete hain

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

    Thanks lot

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

    thanx sir

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

    Tq sirr

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

    thank u sir

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

    Please explain in hindi

  • @saraswathibai4373
    @saraswathibai4373 7 років тому +1

    super