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
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
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
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
:: 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.
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().
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
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?
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++.
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)??
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
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 ?
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
Precise, terse, with example. The way you nurtute this channel is much appreciated
Thanks for such a nice comment!!
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
@@evolve1431 initializer list
You have a deep knowledge of C++.
I try my best, thanks for your comment!!
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
@@evolve1431 this is structural initialization Google this you will know what it is.
@@evolve1431 watch video of initializer list
Your explanation are great, keep making such videos!
Sure dude, thanks for the comment!
Awesome Channel On TH-cam It clear my all concept about C++
Glad you think so!
Understood.
Great work 😄
Really very useful your videos.. Great work!!!
Thanks
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
@@evolve1431 initializer list
Thanks buddy... I really didn't knew we have constant object also in C++ ... :)
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
@@evolve1431 initializer list
Great vaagdu...today i got this new concept
Glad it helped!!
Very nice description
Thanks for appreciation!!
int main()
{
::function(7,6);
}
what is the use of using scope resolution with function call here?
:: 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.
void print() const can we explain these prototype .plz
can you explain about function overwriting?
thanks for the information, but the template function actually allows like print(), and print(), can you explain a bit? thanks
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().
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
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?
Yes correct..
Can u suggest some books for such concepts with in the language. I have seen few of your interesting questions in C_FAQ book.
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++.
I like the book " Object Oriented Programming in C++" by Robert Lafore. It covers all the beginner -> intermediate level topics.
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)??
not able to overload print function, its throwing compiler error
What print function?
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
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
Google initializer list in cpp, you will get detailed explanation.
@@CppNuts ya tqs now I understand we can intilize like general parameterized constructor also
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.
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.
Super sir
Thanks man!!
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 ?
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
Thank you Sir
Most welcome dude.