klimi
/saved
klimi
Kenneth
/meta
Kenneth
#meta
Nassrullah
ok books?
#cppbookguide
Anonymous
I_Interface
/report wtf
Dima
/warn sinx/cosæ = warn
Anonymous
/warn sinx/cosæ = warn
Sinx /cos X = warn What ???
Anonymous
Anonymous
Read the rules
Yeah right sinx/ cosx= tanx
14•08
No, you don't
Ok sir enjoy your day at NASA
Dima
Lol silly people
Jesvi
Hello
Jesvi
I'm getting an error , when I use GetConsoleWindow() I 're an error saying it was not declared in scope but I added windows.h
Dima
Draw bridge
Anonymous
Hello
Anonymous
Given a set of 2D points, find the pair of points with the largest Euclidean distance between them.
Anonymous
warn?
Anonymous
in c++
Talula
Given a set of 2D points, find the pair of points with the largest Euclidean distance between them.
Solution is for every point it has 2 points. Distance = (ABS(X1 - X2) + ABS(Y1 - Y2))
klimi
Talula
Find all the distances between the while array of points and then find the maximum value and you’ll get your answer.
Anonymous
yes
for
klimi
It sounds like an assigment or some homework
Anonymous
Given a set of 2D points, find the pair of points with the largest Euclidean distance between them.
Find the diameter of the smallest circle that encloses all the points
Talula
Find the diameter of the smallest circle that encloses all the points
Yeah that’ll give you the smallest distance from the center… that isn’t the question.
Dima
Lol
Anonymous
Yeah that’ll give you the smallest distance from the center… that isn’t the question.
Maybe you don't realize that the diameter is directly going to be the answer to the question they asked?
Talula
Anonymous
Lol
I hope you're laughing at his brute force solution
Anonymous
Wait, do you guys really not get it?
Dima
At these awkward names
Shubham
4k movies link
Dima
Nevermind
Dima
4k movies link
/warn 4K warn link
klimi
Anonymous
hw??
Figure it yourself. At least that much you should be doing yourself, if it's a homework question or something like that
Anonymous
You still don't get it I guess, huh?
Anonymous
Well too bad for you, I ain't gonna spoil it for the asker
Anonymous
#ot
Dima
Pete
1. receivig operator overload errors on the [] operators. 2. I have tried to implement a function that'll cover it but I do not think I did it correctly because nothing new happened. 3. Got stuck, been looking for a solution since. 4. https://pastebin.com/Y90j7XPH
Pete
I don't think it's too difficult, although I probably am getting burnt out and could use fresh eyes
klimi
Welcome eh
olli
1. receivig operator overload errors on the [] operators. 2. I have tried to implement a function that'll cover it but I do not think I did it correctly because nothing new happened. 3. Got stuck, been looking for a solution since. 4. https://pastebin.com/Y90j7XPH
- there is no ostream << operator overload for std::vector - std::priority_queue is not random access and does not implement operator [], you cannot use [] to access elements in a priority queue since this might invalidate the data structure
Pete
So I have to push/pop instead of access it like a typical array?
Pete
And because the print array << error is a vector I will not be able to overload the operator?
Jaimy de Vries
Im a human Rose ^^ You should remember me from my group!
Jaimy de Vries
Anyone here familiar with c++ to web application compiling in an considerable easy way? looking for a way to expand our game to mobile and web
Jaimy de Vries
currently installing emsdk
Pete
yes.
Just from a quick overview of my code. I pretty much have to redo everything then correct?
Jaimy de Vries
anyone here knows more about it?
olli
And because the print array << error is a vector I will not be able to overload the operator?
yes, you can overload the << operator, you're not doing it, hence an error
olli
So I have to push/pop instead of access it like a typical array?
I don't get what you're trying to do. A priority_queue is basically a min/max-heap. Why would you perform another "heapify" operation on it? The data structure does not allow Random Access to prevent people from invalidating the heap. - If you need a max/min-heap use std::priority_queue - if you want to implement one yourself, use std::vector as backing data structure, it will grow and shrink if necessary and offers Random Access Additionally you pass many parameters as copies, modifying them without storing them inside the class or returning them is basically a noop (you won't be able to see the changes made)
Jaimy de Vries
Jaimy de Vries
I dont mind to donate a bit for a solution ^^
Jaimy de Vries
thanks Olli
Jaimy de Vries
so the issue im running into is trying to compile my source code to a source that can be loaded in web browsers
Jaimy de Vries
I heared a lot of good stuff about emSDK and tried it but I only figured how to compile 1 file and not an entire client at once. for example: emcc hello.c -s WASM=1 -o hello.html works but emcc dir -s WASM=1 -o hello.html or emcc /dir hello.c -s WASM=1 -o hello.html does not work
Jaimy de Vries
Any $x Developers? 😅
olli
so the issue im running into is trying to compile my source code to a source that can be loaded in web browsers
It probably depends on your build system / setup so far. Porting from a makefile or cmake based project should not be too hard. Never really used emcc though, this might help https://emscripten.org/docs/compiling/Building-Projects.html