Wojak
/get cbook
V01D
kodes
Does anyone here knows about google summer of code??
MᏫᎻᎯᎷᎷᎬᎠ
Lol
MᏫᎻᎯᎷᎷᎬᎠ
*Spider-man meme*
Dima
Nils
Hi, what does the <=> operator do?
Vlad
Nils
Vlad
Yeah
It's the same deal basically
Nils
?
Vlad
Allows to automaticly generate 5 comparison operators
Nils
Nils
Vlad
Nils
Ohhhh...
Vlad
Forgot !=
Anonymous
cout<<"hello peeps";
Artöm
Artöm
You then compare result of <=> with 0
Anonymous
Anonymous
The spaceship operator is the primary operator only for these for operator
Dima
I love that name
Anonymous
But if you do
auto operator<=>(T) = default;
It also generates operator== but if it's not defaulted it doesn't generate
MᏫᎻᎯᎷᎷᎬᎠ
It 1- generates or 2- does the job of them all at once with one calling function <=> or 3- both?
If 2, doesn't that cause an overhead?
Anonymous
MᏫᎻᎯᎷᎷᎬᎠ
I don't understand your question..
So basically Spaceship operator returns usual ordering objects
Right?!
Why do we need to generate other comparison operators automatically if <=> fits the same result?
Anonymous
Kenny
guys, why we should use pointers, i don't understand its use
Alex
in C or C++?
Kenny
C++
Kenny
I worked with them in Linked List, BST, and i know the use in that case
Alex
usually you should avoid raw pointers, but there are lots of cases(like optimization, allocators, C API etc) you need them
Alex
usually you use linked list from stl
Alex
so no raw pointers
Kenny
I should implement a linked list of complex numbers
Alex
if you want to create your own linked list - probably you need raw pointers
Kenny
I must used em hahaha
Alex
can you use stl?
Kenny
I couldnt
Alex
so why do you ask about pointers?
Alex
probably you need them to implement linked list
Kenny
Oh i get it
Kenny
you pass the memory direction and then you can use the operator * or -> to access to data
Rania
I've never seen for(;;) before until today. I realize it's an infinite loop, similar to while(true)
I've been using the latter all the time. When would we need to use for(;;) instead ? Or is it just the same ? Just a matter of preference ?
Cengizhan
Indolent
sometimes when i write nothing after return the code compiles but sometimes it throws error: "return statement with no value" What happening?
particaney 🐸🍲
I guys, i have a question concerning FIFO files. If i have a server and 3 clients. And they all comunicating with fifo files. How can i make my server work for 1 client and not making it wait for the 2 other clients
particaney 🐸🍲
Because when using a named tube if i open a side the program waits the other side, how canci not make it wait
Indolent
First In First Out. So that means a queue.
Nurlan
Hi👋
Anonymous
/admin
Aakarsh
I'm trying to implement shared memory problems and I want to implement a program in which different processes work with a single shared memory. So I'm looking for a way in which I could set limits for a particular process that it does all the use of shared memory in that region
Aakarsh
As if creating partitions for different processes. An suggestions how I should approach it?
su
Aakarsh
Ohh
Aakarsh
But you mean I will need to create different shared memory for different processes?
su
Aakarsh
Linux
su
Linux
which one linux and what kernel supposed to be? 5? 2?
su
i suppose ubuntu 20.04 linux kernel 5
Aakarsh
Ubuntu linux 18.04 and kernel 4.18
su
Ubuntu linux 18.04 and kernel 4.18
good.
Linux distributions based on the 2.6 kernel and later offer /dev/shm as shared memory in the form of a RAM disk, more specifically as a world-writable directory (a directory in which every user of the system can create files) that is stored in memory. Both the RedHat and Debian based distributions include it by default. Support for this type of RAM disk is completely optional within the kernel configuration file.[5]
su
https://en.wikipedia.org/wiki/Shared_memory
Aakarsh
So creating some sort of range or partition for different processes is not possible right?
su
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_72/apis/ipcshmct.htm
Aakarsh
Alright I'll try it out. Thanks for the help
.:**:.*.:。.✿KK✿.。.:* :**:.
Hi
su
Anonymous
Hi there, there is a new opportunity to hire Cuban freelancers and work remotely: https://wewoc.com/
Ismael
Which is the best IDE for C++?
Pavel
You can use 1D array of size m*n where m and n your dimensions by x and y.
To access an element you do arr[j * m + i] where i and j coordinates by x and y.
kodes
Pavel
Anonymous
If not inside then pop them