const Keyword Behaviour With Function Overloading In C++

  Рет қаралды 12,763

CppNuts

CppNuts

Күн бұрын

Пікірлер: 52
@rajesh09ful
@rajesh09ful 6 жыл бұрын
Precise, terse, with example. The way you nurtute this channel is much appreciated
@CppNuts
@CppNuts 6 жыл бұрын
Thanks for such a nice comment!!
@evolve1431
@evolve1431 3 жыл бұрын
can u please tell me why you wrote like this I cant understand----( :x{x} ) these thing over constructor defination , I couldn't understand why you wrote like this
@krishnagupta7208
@krishnagupta7208 2 жыл бұрын
​@@evolve1431 initializer list
@aditya.ishan27
@aditya.ishan27 6 жыл бұрын
You have a deep knowledge of C++.
@CppNuts
@CppNuts 6 жыл бұрын
I try my best, thanks for your comment!!
@evolve1431
@evolve1431 3 жыл бұрын
can u please tell me why you wrote like this I cant understand----( :x{x} ) these thing over constructor defination , I couldn't understand why you wrote like this
@aditya.ishan27
@aditya.ishan27 3 жыл бұрын
@@evolve1431 this is structural initialization Google this you will know what it is.
@krishnagupta7208
@krishnagupta7208 2 жыл бұрын
​​@@evolve1431 watch video of initializer list
@iamsiddhantsahu
@iamsiddhantsahu 5 жыл бұрын
Your explanation are great, keep making such videos!
@CppNuts
@CppNuts 5 жыл бұрын
Sure dude, thanks for the comment!
@programmingwithht
@programmingwithht 3 жыл бұрын
Awesome Channel On KZbin It clear my all concept about C++
@CppNuts
@CppNuts 3 жыл бұрын
Glad you think so!
@AkhileshSingh-y4v
@AkhileshSingh-y4v Жыл бұрын
Understood. Great work 😄
@AshokKumar-mk1nr
@AshokKumar-mk1nr 5 жыл бұрын
Really very useful your videos.. Great work!!!
@CppNuts
@CppNuts 5 жыл бұрын
Thanks
@evolve1431
@evolve1431 3 жыл бұрын
can u please tell me why you wrote like this I cant understand----( :x{x} ) these thing over constructor defination , I couldn't understand why you wrote like this
@krishnagupta7208
@krishnagupta7208 2 жыл бұрын
​@@evolve1431 initializer list
@cid007007
@cid007007 4 жыл бұрын
Thanks buddy... I really didn't knew we have constant object also in C++ ... :)
@evolve1431
@evolve1431 3 жыл бұрын
can u please tell me why you wrote like this I cant understand----( :x{x} ) these thing over constructor defination , I couldn't understand why you wrote like this
@krishnagupta7208
@krishnagupta7208 2 жыл бұрын
​@@evolve1431 initializer list
@ankitahlawat4812
@ankitahlawat4812 6 жыл бұрын
Great vaagdu...today i got this new concept
@CppNuts
@CppNuts 6 жыл бұрын
Glad it helped!!
@yogendragangwar9795
@yogendragangwar9795 6 жыл бұрын
Very nice description
@CppNuts
@CppNuts 6 жыл бұрын
Thanks for appreciation!!
@unknow9075
@unknow9075 6 жыл бұрын
int main() { ::function(7,6); } what is the use of using scope resolution with function call here?
@konstantinrebrov675
@konstantinrebrov675 5 жыл бұрын
:: scope resolution operator without any class or namespace means global scope. It allows you to call a function inside the global scope if there is a function with same name inside a namespace. namespace foo { int function(int a, int b) { return a + b; } // function one } int function(int a, int b) { return a + b; } // function two int main() { ::function(7,6); // calls function one foo::function(7,6); // calls function two } If you have using namespace foo; int main() { ::function(7,6); // calls function one function(7,6); // calls function two } Please try it, compile this code.
@shirishareddy2795
@shirishareddy2795 4 жыл бұрын
void print() const can we explain these prototype .plz
@sureshgoondla1917
@sureshgoondla1917 Жыл бұрын
can you explain about function overwriting?
@chengjiwei
@chengjiwei 5 жыл бұрын
thanks for the information, but the template function actually allows like print(), and print(), can you explain a bit? thanks
@CppNuts
@CppNuts 5 жыл бұрын
Good question, but try to understand from another end of the problem, there is no difference when you overload print function with "const int" or just "int", so now there is no point in differentiating print() and print().
@evolve1431
@evolve1431 3 жыл бұрын
can u please tell me why you wrote like this I cant understand----( :x{x} ) these thing over constructor defination , I couldn't understand why you wrote like this
@biswaranjan3550
@biswaranjan3550 6 жыл бұрын
Hello Sir,One doubt here what is the difference between( int& val) and (const int& val) .As per my knowledge (const int& val) in this case we cannot change the value of val right?
@CppNuts
@CppNuts 6 жыл бұрын
Yes correct..
@girishmortha4823
@girishmortha4823 6 жыл бұрын
Can u suggest some books for such concepts with in the language. I have seen few of your interesting questions in C_FAQ book.
@CppNuts
@CppNuts 6 жыл бұрын
I have never ever follow any book, they were expensive and i was poor. My knowledge comes from stack over flow, i was following it too much and daily tracking what people ask and i tried to give answer for those questions. This is how i built my knowledge for c++.
@Impulse_Photography
@Impulse_Photography 5 жыл бұрын
I like the book " Object Oriented Programming in C++" by Robert Lafore. It covers all the beginner -> intermediate level topics.
@Impulse_Photography
@Impulse_Photography 5 жыл бұрын
What is the difference from const int& color(int& x, int& y) To The Function int& color(int& x, int& y) const (keyword const before function or after function)??
@arpithams
@arpithams 5 жыл бұрын
not able to overload print function, its throwing compiler error
@CppNuts
@CppNuts 5 жыл бұрын
What print function?
@vigneshwarmohanraj1490
@vigneshwarmohanraj1490 6 жыл бұрын
Dear team, I have a small clarification. I want multiple integers sep by spaces from stdin and store it in vector. Please help me on this /Vignesh
@evolve1431
@evolve1431 3 жыл бұрын
can u please tell me why you wrote like this I cant understand----( :x{x} ) these thing over constructor defination , I couldn't understand why you wrote like this
@CppNuts
@CppNuts 3 жыл бұрын
Google initializer list in cpp, you will get detailed explanation.
@evolve1431
@evolve1431 3 жыл бұрын
@@CppNuts ya tqs now I understand we can intilize like general parameterized constructor also
@girishmortha4823
@girishmortha4823 6 жыл бұрын
I think U forget to add the same scenario occurs when int or const int is used as return type or may be it was not highlighted.
@CppNuts
@CppNuts 6 жыл бұрын
I am not able to understand what you are asking? We can not overload on the basis of return types. Please provide some code to clarify.
@revarevanth1800
@revarevanth1800 6 жыл бұрын
Super sir
@CppNuts
@CppNuts 6 жыл бұрын
Thanks man!!
@vasireddyganesh
@vasireddyganesh 4 жыл бұрын
Sir when we write Void print(int &val) What kind of value can val hold For example: Void print(int *val) Here val can take the addresses.... While calling this function we need to call it by passing address of some object as an argument.... Like wise what can &val hold ?
@evolve1431
@evolve1431 3 жыл бұрын
can u please tell me why you wrote like this I cant understand----( :x{x} ) these thing over constructor defination , I couldn't understand why you wrote like this
@vvpChannel3112
@vvpChannel3112 3 жыл бұрын
Thank you Sir
@CppNuts
@CppNuts 3 жыл бұрын
Most welcome dude.
Overloading new And delete Operator In C++
21:59
CppNuts
Рет қаралды 23 М.
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
Overloading Function Template In C++
19:32
CppNuts
Рет қаралды 14 М.
Advanced Data Structures: C++: The const Keyword
11:20
Niema Moshiri
Рет қаралды 10 М.
Static Data Member And Static Member Function In C++
17:19
CppNuts
Рет қаралды 52 М.
CONST in C++
12:54
The Cherno
Рет қаралды 416 М.
Const Data Member In C++
15:03
CppNuts
Рет қаралды 23 М.
Rust vs C++
7:18
conaticus
Рет қаралды 106 М.
you will never ask about pointers again after watching this video
8:03
Inheritance In C++
28:29
CppNuts
Рет қаралды 41 М.
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН