Thespartann
BinaryByter
Can someone help me out with this 👆👆in C programming
nobody will help you with 👆👆 problem 🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣😝😝😝😝😝😝😝
klimi
Can someone help me out with this 👆👆in C programming
Same as in ot: it looks like assignment to me
BinaryByter
this is probably C
BinaryByter
duh
14•08
14•08
How bad is it lol
To the maximum
Francisco
Not exactly
Anonymous
14•08
Lol
Hey there
Anonymous
Hey there
What’s up
Anonymous
Hey there
I finished my tic tac toe game , now building a hangman game
BinaryByter
add a minmax algo to make the engine play tictactoe against the user
BinaryByter
trust me, you'll learn a lot
Azons
Yes i know that 😎👍
Silvestr
Have one question) about move semantic and rvalue. string&& func()... vs string func() inside func(){ return string("hfhfhf");} this two return types with && and without have different effect?
BinaryByter
the string you move from gets destroyed
Anonymous
You build?not get you
You never played hangman
BinaryByter
well unusable
14•08
What’s up
Hey how can allow user input from structure.c??
Silvestr
Question is about when I assign this function to variable std::string s = func() it will be assigned as rvalue?
14•08
You never played hangman
Yeah but I guess i've seen somewhere but i don't remember
Anonymous
Yeah but I guess i've seen somewhere but i don't remember
You have X Amount of turns to guess a word before the man get hung to death , funny it’s a children’s game
14•08
Huh
Do you have any idea why are you laughing
klimi
:D
Anonymous
So you made it 😂😂
It was invented long before I was born
Anonymous
Just practicing the little c++ I know
klimi
Looks like bot
14•08
It was invented long before I was born
Hahaha I thought you're the one from them who developed it
14•08
Looks like bot
Bot vs bot 😂
MᏫᎻᎯᎷᎷᎬᎠ
.
klimi
.
.
14•08
Hangman
Anonymous
Hangman
Hopefully they figure it out , this guy is almost soil food
MᏫᎻᎯᎷᎷᎬᎠ
.
..
klimi
..
:(
MᏫᎻᎯᎷᎷᎬᎠ
:()
MᏫᎻᎯᎷᎷᎬᎠ
:\/
14•08
Someone help me 😔
Silvestr
And what is means?
olli
And what is means?
what does what mean?
Silvestr
That I can't return it from function
MᏫᎻᎯᎷᎷᎬᎠ
I think I forgot C++
14•08
Can anyone show me how to accept user inputs in the structure.c
Silvestr
what does what mean?
A r-value reference is still a reference
olli
A r-value reference is still a reference
Do you know the concept of references?
MᏫᎻᎯᎷᎷᎬᎠ
I didn't write a thing for 1 week
olli
Yeah
so you should know that returning references to local objects results in a dangling reference.
Silvestr
It's address on memory that can't be a null
olli
Sure
this applies to r-value references as well, hence you should avoid returning r-value references to locals
14•08
Oh any tutorial wanna see ..
MᏫᎻᎯᎷᎷᎬᎠ
MᏫᎻᎯᎷᎷᎬᎠ
I think you meant lvalue reference
MᏫᎻᎯᎷᎷᎬᎠ
Silvestr
this applies to r-value references as well, hence you should avoid returning r-value references to locals
The last question. std::string&& s = func() here for s was called move constructor?
14•08
So nervous😂 ? Y
olli
@BOND_0O7 no, I meant rvalue references. A rvalue reference does not increase the lifetime of an object. Why should you not write std::string& avoid() { return std::string("hello"); } ? For the same reasong you should not write std::string&& avoid2() { return std::string("hello"); } either
klimi
So nervous😂 ? Y
Who TF is nervous
olli
The last question. std::string&& s = func() here for s was called move constructor?
no. You're only holding a reference not creating a new object
14•08
Who TF is nervous
😂😂😂 who else ?? If not you
olli
How about return std::move(string ("hello")); in the second one?
doesn't make any difference. std::move is basically just a cast, you're still returning the reference to a local object. hence Danling reference
klimi
😂😂😂 who else ?? If not you
Me gonna ban without reason
Silvestr
no. You're only holding a reference not creating a new object
What is called for s object when I assign function result for it?
Silvestr
I mean what operator or constructor