Shvmtz
Jaaa
Yes i am writing a c++ programme and their is some on my screen so i just wanna can i fix this
Anonymous
why
/warn do not pm, it's against the rules
PaAaAria
Hakeem
hello guys, i want to ask a simple question about c++ algorithm,
in code i wrote :
if (balance > 1 && key < node->left->key),
so, in algorithm, is it correct if i write :
if(balance > 1 && key < node.left.key)
Hakeem
or do i just need to write back in algorithm the same as the code
Al
Hakeem
ouh forget to say that node is a new node, and left is also a node
Hakeem
key is an int value
Al
bro... node is a pointer or not?
Hakeem
yeah a pointer
Al
you can use only the 1 then
Hakeem
ouhh okayyyy, thank you Al bert
Hakeem
💪🏽💪🏽💪🏽
Al
np
Anonymous
write a c++ program to find the maximum number from the integers array
Anonymous
Anyone can make?
MᏫᎻᎯᎷᎷᎬᎠ
In each loop
Anonymous
MᏫᎻᎯᎷᎷᎬᎠ
Lool
olli
Anonymous
Anonymous
Anonymous
Anonymous
how can i have the size of array
Henry
how does associativity worl
ברני
Hey.. I need an advice..
I wanted to learn Java script and c#
To find a job.. But my friends recommend me to start with C..
I'm almost 3 months on C and it's annoying..
Will it be that bad to ditch it for C#?..
Pavel
Anonymous
I got a little trouble in copy constructor in c++ can anyone plzzz make me to understand ??
Pavel
Pavel
I mean, what exactly you don't understand?
ברני
Anonymous
Dude like I read the documentation but I didn't get . If the compiler makes the default constructor why we need to make our own ??
Anonymous
Pavel
Default copy constructor
Sometimes the default behavior is not enough. Imagine you're making a custom linked list. Our class contains pointer to it's start. We wan't to copy our list but ups, default constructor copied only the pointer, so we have two lists that points to the same data, it's not only wrong logically but when we destroy one of them the second one will point to the garbage data.
Pavel
So in this case you need to make a custom copy constructor that makes a copy of each element and link them correctly
So after copying you will have two correct lists
Anonymous
Ooooo so basically it just copy the address of the lists nd if we make change in one it reflects in the other so we have to make the copy ri8 ...
Pavel
Anonymous
Thanku brother for making me understand ...means a lot !! ❣️
Pavel
Thanku brother for making me understand ...means a lot !! ❣️
There's a rule of thumb, if you have a non-default destructor then there's a big chance you need a custom copy constructor (and assignment operator, (and move constructor and move assignment operator probably also)).
This known as the rule of 3 or the rule of 5.
https://en.cppreference.com/w/cpp/language/rule_of_three
Sam
Send it here
Anonymous
Hello
Anonymous
/notes
Zigzag
What is it?
Pavel
What is it?
Someone summoned a list of notes. You can ignore messages from Rose, unless the messages mention you or your messages :)
Hasan Emre
Hello, does anyone know of linked lists?
Hasan Emre
For example, our affiliate list: 10-20-30-40-50-60-70
How do I make this list like this?
40-50-60-70-10-20-30
Igor🇺🇦
Hasan Emre
Hasan Emre
Root->next = 70 I got it here but I don't know how to get 70
Igor🇺🇦
Hasan Emre
Igor🇺🇦
The link is broken :(
What does it mean? It's just pastebin.com. Can't you access the site?
Hasan Emre
Turkey also banned think
Hasan Emre
Look at the my code
Hasan Emre
I can do this if the number of list elements is low, but I have difficulty if the number of elements is too high
Hasan Emre
Continuous next next next
Hasan Emre
İt is difficult
Igor🇺🇦
Can try other paste it code? Telegram doesn't format code well and it's hard to understand what's going on. There are many other sites
Hasan Emre
Okey
Igor🇺🇦
Okey
In short you should iterate while your node is not 70 and set its next to node with 30. You just need to store current node during iteration
Hasan Emre
repl.it/@emredblood/Linked-List#main.cpp
Hasan Emre
Create a list of 10 elements with different integers. Ask the user to enter a sequence number from 1 to 9. Create the inverse (int order) function that divides the list into two from the point where the user entered the sequence number and reassembles it backwards. For example, if the user enters the value 4, the linked list is 4.5.6.7.8.9.10.1.2.3. will be listed as.
Hasan Emre
Jaaa
What is wrapped array
Igor🇺🇦
Igor🇺🇦
Jaaa
If we have give array of -1,4,-6,7,5 does it mean that subaaray are
-1,4,6,75
4,-6,7,5-1
-6,7,5,-1,4 ans so on
YVEF
Hi guys. Is there any way to find an start index of subarray within another array using any standard functions? byte* arr1 = new byte[n] { 1, 2, 3, 4 } byte* arr2 = new byte[m] { 3, 4 } => index == 2
Hasan Emre
The user will determine where to split the list
Anonymous
Hi