Artöm
Anonymous
Because question itself is about public interface
Anonymous
I don't get the question
Suppose, the copy constructor is not private in ostream, then if we return the called out object without reference then will the chaining operation not be supported?
Anonymous
Artöm
Anonymous
Because we have the object to call operator<< on
Artöm
Dont forget that stream writes the stuff to a file. Like, would a file be copied too?
Anonymous
Artöm
Imo its not the thing to bother about first here
Anonymous
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.
Artöm
If base class doesnt have default ctor, derived wont have it unless you provide it
{CSA}
Hi
I_Interface
What is this ? Why it's here?
I_Interface
2 mins no answer - warn.
I_Interface
/warn It's C/C++ discussing here.
I_Interface
Anonymous
`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
I_Interface
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;
}
Anonymous
I_Interface
how to format multiline?
Just use formatting function from telegram. Select a text -> Right click -> Formatting -> Monospace.
Jussi
Anonymous
MᏫᎻᎯᎷᎷᎬᎠ
/report
Magnvm_Khaos
Hi I have a question about sockets?
Can i do a program like a calculator on the server that responds with solutions to questions of the client?
Roxifλsz 🇱🇹
Userbot?
Austin-sama
Yup
Roxifλsz 🇱🇹
/ban @Ginger093
Roxifλsz 🇱🇹
Austin-sama
😉
Artöm
Artöm
?
Artöm
I see copy construction, no assignment
Anonymous
Artöm
Artöm
Yes, to create an argument. Then in fun to create nbj. Then move ctor is called to crrate an object being returned
Anonymous
Can I say that cout is a stream?
Artöm
It is
Anonymous
So, Just as cout is used as a stream between the program and the stdout, stringstream acts as stream between what 2 things?
Artöm
program and string variable
Artöm
So? Not everything in program goes in cout
Artöm
sstream copies variables to internal string and returns a copy of it when one calls str()
Artöm
Anonymous
Artöm
https://en.cppreference.com/w/cpp/io/basic_stringstream/str
Artöm
Yes
Artöm
I know what assignment is bro. This T val = init; is copy construction
Artöm
Note T. You create a variable
Abdul
https://youtu.be/lxryENRZ1kI
Anonymous
Guys i started my oops concepts recently and i would like to have some materials and resources regarding it ..
Joesph
Anonymous
Wut
Anonymous
Hi guys.. can someone share ebook of c++ and vc++
Faisal
Hello, is there any one have a c# group 😅
NXiss7
NXiss7
Can't share e-book though...
NXiss7
Guys, I've written a library, built an API and want to open source it soon but I want to stress and quailty-control it as much as I can before releasing.
Like code quality, architecture, performance, obvious dumb things....
Any suggestions?
Francisco
YK Y
When we use **array[]
...
...
having so many things for a kinda small scale project is overkill, and kills productivity though
NXiss7
NXiss7
What about code quality?
NXiss7
And design?
Francisco
NXiss7
NXiss7
And design?
And I want to make my lib thread safe.
Are there "community recommended" checklists that I can follow.
I've gone through some from internet including Google's guidelines.
NXiss7
...
no, you just waste your time to satisfy your autism with some checkmarks being green and some numbers looking "okay"
Anonymous