Message from C, C++ discussions

January 2020

— Imo its not the thing to bother about first here

— 

I didn't get the following statement below:

if for any reason a base class fails to have a default constructor that's callable from a deriving class—that is, a public or protected constructor that takes no parameters—then a class that derives from it cannot automatically generate its own default constructor.

— If base class doesnt have default ctor, derived wont have it unless you provide it

— Hi

— What is this ? Why it's here?

— 2 mins no answer - warn.

— /warn It's C/C++ discussing here.

— That's 2/2 warnings; CristiCristiano is banned!
Reasons:
1: offtopic youtube not your video then it is not advertisment idk if it has ads but its youtube cuz i have autoblocker oh god i have to write my homework why do i spent time in this group trying to moderate it while just people broke rules and beg for homeworks and assigments in turbo cpp This is taking forever... it really makes you consider if you want to even be an admin... or even be alive... its a pity this happens.... Why do i even write this thing... i could just do /warn yt instead.... ah man life is hard... and other people will just throw sticticks and rocks at you.... like you do... why do you do it.... do you know it hurts???? it hurts so much.... but to this to be positive there is one inspiring quote i googled instead of googling someones assigment:
“I have not failed. I've just found 10,000 ways that won't work.”
― Thomas A. Edison
2: It's C/C++ discussing here.

Message permanent page

— Welcome.

— `class base{
private:
base(const base &obj) {}
public:
base(){}

friend base fun(base &obj)
{
base nbj = obj;
return nbj;
}
};
int main(){
base obj;
fun(obj);
return 0;
}`

here copy constructor gets called from inside the friend function so it gets called without any problem

Message permanent page

— class base{
private:
base(const base &obj) {}
public:
base(){}

friend base fun(base &obj)
{
base nbj = obj;
return nbj;
}
};
int main(){
base obj;
fun(obj);
return 0;
}

Message permanent page

— How to format multiline?