Anonymous
Alright
Too lazy to explain
V01D
Mk
Vlad
Vlad
Or you pass int**
Vlad
And have fun setting up array of pointers
Vlad
Anonymous
Anonymous
Does every C++ program has a cmake file?
Anonymous
can't you just run the .cpp file and that's it?
Anonymous
asking for a friend
Anonymous
And have fun setting up array of pointers
Anonymous
what the hell is even a cmake file
Anonymous
Im asking because I use Clion and I don't even look at that
Anonymous
cmake is a cross platform builder
Anonymous
great now Imma google what's a builder
Anonymous
g++ -o a a.cpp
Anonymous
Are there any big cows here?
Anonymous
Anonymous
a lot of big ass cows here
Anonymous
I come from China
Anonymous
Back to Chinese!
Anonymous
You guys actually made a deal with us to raise pigs here
Anonymous
nvm back to C++
Anonymous
Sorry.. I’m not good at English... It’s hard to communicate with you
Anonymous
srs
Anonymous
no one know how complex.h in C has an operator overload on multiplication ?
Anonymous
its gotta be the only type with an operator overload
Anonymous
I find that you are all amazing... I really envy you
Anonymous
Are there any partners willing to make Chinese friends!
Anonymous
1
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
The header <tgmath.h> defines a type-generic macro for each mathematical function defined in <math.h> and <complex.h>. This adds a limited support for function overloading of the mathematical functions: the same function name can be used with different types of parameters; the actual function will be selected at compile time according to the types of the parameters.
Anonymous
https://en.wikipedia.org/wiki/C_mathematical_functions
Anonymous
I found this
Anonymous
thats just function overloading damn
Anonymous
https://stackoverflow.com/questions/30986638/how-are-complex-arithmetic-operators-implemented-in-c
Anonymous
"3
C does have operator overloading -- even before the C89 standard, it overloaded operators like +, -, *, and / for both integer and floating point operations.
C does not have user defined operator overloading -- so there are just the fixed set of overloads defined in the standard and no way to extend them.
C99 just extends the int/float overloading of operators to complex numbers. There's still no way for a program to extend the overloading beyond that specified in the spec.
"
Anonymous
case closed
Sherlock
int findbeautiful(int n,int ar[2][],int d,int startindex)
Sherlock
see this is my function declaration and it says array has an incomplete element type
Sherlock
https://www.geeksforgeeks.org/pass-2d-array-parameter-c/
Indolent
bool operator == (Point point2) { return x == point2.x && y == point2.y; }
// What's happening in the above line of code?
Stefan
Stefan
also, this is illegal in c++
Stefan
the same family of error in malloc with (void*) and pointer assignment
Anonymous
Hello I have a problem when I build my program error message appears and it is Itanium x86 was not found I use visual studio 2017 Enterprise
Anonymous
I downloaded all C++ packages But the same problem, I searched google but couldn't find a solution I want help from all of you, please =(
Anonymous
Anonymous
harry
/get ide
harry
cool visual studio as always
Asad
Recently, I discovered a lot of bugs in VS2019
Asad
Sherlock
you dont because of array decaying
It seems a bit difficult topic to understand so just tell me the right syntax to ease it, my number of rows will always be 2 and n will be number of columns, now how should I proceed?
Stefan
Stefan
so that could easily give you a segfault
Sherlock
don't get it
Sherlock
any examples or link that I could read from?
olli
see this is my function declaration and it says array has an incomplete element type
there is a difference between ar[2][] what you did and arr[][2] what is used in the article
In the later arr is an array of array 2 of int, in the first case ar is an array 2 of array of int, but how many ints are there in your array? This information is needed
In regards to decay, when passing an array to a function the usual array to pointer conversion is performed, so the type of the array in the function is int (*arr)[2]
Andrew
writing arr[i][j] is same as writing *(*(arr+i))+j)
Andrew
a 2d array is an array of pointers, a 3d array is an array of pointers of pointers and so on
布丁
Shre
Hi
布丁
a 2d array is different from an array of pointers
布丁
It is just the same as 1d array w.r.t memory layout
Andrew
not really a 1d memory array you can see it as a single pointer
Andrew
position of at adress of pointer there is first element
Andrew
at adress of pointer+1 there is second element
Andrew
and when you write int arr[i] you are telling the debugger to, display the content of the address of arr+i where arr is the pointer