Anonymous
I want to learn c/c++
Dima
Anonymous
What should I do?
Anonymous
I want to learn c/c++
Ashwani Kumar: What should I do?
Anonymous
Learn it
Anonymous
Learn it
Can you send me the link of best tutorials?
Anonymous
"Best" is subjective
Anonymous
You can refer to some resources here :
Anonymous
#cpp
Shubh
I already read 😃
klimi
welcome
MᏫᎻᎯᎷᎷᎬᎠ
Welcome
Dima
Welcome
Anonymous
Thank you
Anonymous
Hope it will help me
MᏫᎻᎯᎷᎷᎬᎠ
Welcome
MᏫᎻᎯᎷᎷᎬᎠ
Hope so
Anonymous
Can you suggest me link of some group for gate preparation
Anonymous
Or data structure
MᏫᎻᎯᎷᎷᎬᎠ
I don't think it's legal thing to do
MᏫᎻᎯᎷᎷᎬᎠ
/rules
Anonymous
/rules
Okk sorry but data structure resources
Anonymous
/rules
MᏫᎻᎯᎷᎷᎬᎠ
Okk sorry but data structure resources
https://telegra.ph/C-Resources-Biased-Towards-Beginners-09-29
MᏫᎻᎯᎷᎷᎬᎠ
Take a look at this
Anonymous
Data structre book recommendation
MᏫᎻᎯᎷᎷᎬᎠ
MᏫᎻᎯᎷᎷᎬᎠ
https://telegra.ph/C-Resources-Biased-Towards-Beginners-09-29
You might find what you are looking for here
Anonymous
Data structre book recommendation
Dude, can't you read?
Anonymous
/
Anonymous
Dude, can't you read?
But asking for book recommendation does not violates the rules...
Anonymous
I have read that bro
Anonymous
Hi everyone
Anonymous
I just want to ask that
Anonymous
What's the advantage of allias in c and c++
Anonymous
Int a, &b=a;
Anonymous
What's the advantage oh this statement👆👆👆👆
MᏫᎻᎯᎷᎷᎬᎠ
Anonymous
Int a, &b=a;
This is allias
BinaryByter
What's the advantage oh this statement👆👆👆👆
you can pass an alias instead of copying a value
BinaryByter
that way your program becomes a bit faster
MᏫᎻᎯᎷᎷᎬᎠ
Ohh
MᏫᎻᎯᎷᎷᎬᎠ
He meant references
Anonymous
BinaryByter
He meant references
they act like aliases
MᏫᎻᎯᎷᎷᎬᎠ
At first I thought he was talking about type alias
Anonymous
He meant references
That's the allias
BinaryByter
I'm not clearly get that
look at this function:
MᏫᎻᎯᎷᎷᎬᎠ
BinaryByter
int calculateEveryElement (std::vector<int> &)
Anonymous
BinaryByter
if you didn'T pass an alias, the vector would have to be copied
MᏫᎻᎯᎷᎷᎬᎠ
BinaryByter
And it's an expensive operation
depending on the size of the vector
BinaryByter
you can use move semantics though
MᏫᎻᎯᎷᎷᎬᎠ
Which causes an embarrassment for C++ program
Anonymous
Oh Okey Thanks everyone Bros..
MᏫᎻᎯᎷᎷᎬᎠ
depending on the size of the vector
In general references are better for passing to a function Except for primitive types
Anonymous
But can you explain little bit more with some simple example.. please
Anonymous
??
MᏫᎻᎯᎷᎷᎬᎠ
Yeah Explaining with text is little bit confusing
BinaryByter
But can you explain little bit more with some simple example.. please
Well when you pass an argument to a function, the computer has to copy the entire variable
BinaryByter
with big variables that takes time
BinaryByter
imagine havingy to copy an entire book
BinaryByter
instead, you can use an alias
BinaryByter
there, you don't need to copy the book, you use the old book instead
MᏫᎻᎯᎷᎷᎬᎠ
But can you explain little bit more with some simple example.. please
here is an example void swap(int a, int b) {.......} Here if you pass the parameters It will be passed by value(copy) Which means you'll swap the copies not the real passed variables But here void swap(int& a, int& b) {.....} Will swap the real variables
MᏫᎻᎯᎷᎷᎬᎠ
You get it?!!
MᏫᎻᎯᎷᎷᎬᎠ
Anonymous
You get it?!!
Yeah ..u explained it in very simple manber
Anonymous
Reference = Alias
Oh..okey.. Nothing different..?
MᏫᎻᎯᎷᎷᎬᎠ
MᏫᎻᎯᎷᎷᎬᎠ
Except for type alias