Dima
you can use such operators to store flags
ohio
srry
ohio
std::swap (a, b);
is this a c++ function?
Anonymous
anybody?
Dima
BinaryByter
defined in <utility>
Anonymous
Hi all guys
Anonymous
I am a noob and I have confuse ideas
Anonymous
It's possibile to point a value store in an array?
Anonymous
int b,c; void g(int a) { int c; { int a,d; } }
Anonymous
Hi everyone For the block in which a and d are declared, which parameters and variables are visible?
prasoon
Dima
/warn ad
Anonymous
all of them but a shadows the prior a
Which are priority then ?
Anonymous
I think a as global, c as local variable. Is this correct ? But I am confused about a
Anonymous
I think a as global, c as local variable. Is this correct ? But I am confused about a
Sorry I wrote the wrong question. b is global, c and d are local variables
Dima
outside scope nothing is visible
Dima
global are visible everywhere
Anonymous
pointer to value in your array?
Yes fill the pointer with array's value in a loop (its not matter the type of loop)
Dima
Yes fill the pointer with array's value in a loop (its not matter the type of loop)
int* a = nullptr for (…. i++) if (array[i] == …) a = &array[i];
Dima
like that?
Dima
assuming it is array of ints
Anonymous
Aaaaaaaaaa
Anonymous
Is necessary the &?
Dima
yes because you have a pointer and value and you point to that value
Dima
WHY DO YOU HAVE TO CLICK THESE BUTTONS
Anonymous
its corrupted can't open
Anonymous
its corrupted can't open
its damaged.pls make sure its okay
Alejandro
Hi. Does anyone know how can a set be iterated if it's implemented as a red-black tree? Is a Binary search required everytime you increase the iterator? Or is there some sort of array of pointers keeping track of the actual order?
Sty
Wrong input 🙏
Ashish
Give c++ latest version for window 10
BinaryByter
eeee
klimi
XD
Ανδρέας 🇮🇹
Anonymous
I don't understand this type of error
Ashish
Ashish
Indian
Леонтий
I don't understand this type of error
Try to cast addresses to unsigned int
Леонтий
unsigned long int in case of x64
Леонтий
I don't understand this type of error
but in any case (if i remember true) result of expression is k++, the expression before is useless
Anonymous
Mmm
Anonymous
d is my pointer
Anonymous
a and b are arrays
Anonymous
I would to point the sum of the sum of the array's value for each step
Anonymous
I'm feeling confuse :D
Леонтий
sure, but & has lower priority
Anonymous
So Confuse damn c++
Леонтий
So [] is the first and then you will get address of a[k] item
Леонтий
And addresses can't be used in + expression directly
Леонтий
So it's necessary to cast it
Леонтий
but *(&a[k] + 1) is Ok, in this case you'll get value of a[k+1]
Леонтий
but don't do that :)
Anonymous
thank you for help
Anonymous
but what is the meaning of cast?
Anonymous
i believe that i must study the sintax better
Anonymous
syntax
Леонтий
but what is the meaning of cast?
It's just a workaround of nonsense operation) if you will do something like "address1 + address2" you will get a new address which (99.9%) will be inaccessible)
Anonymous
mm ok
Anonymous
but i would the value not the address of value
Леонтий
just a[k] + b[k])
Леонтий
Easy)
Anonymous
yes but give me the same error
Anonymous
i'll post now
Anonymous
Леонтий
What is type of "a"?
Anonymous
int
Леонтий
Is it an array?
Anonymous
yes
Леонтий
Post all code please
Anonymous
aaaaaaaaaaa no
Anonymous
it isnt an array
Anonymous
:D
Anonymous
my shitty mind
Леонтий
All is ok) it happens)
Anonymous
yauuuu it works