Anonymous
Рома
I meant storing and retrieving stuff
Who can explain in detail? What is done with pointers in this function
void SortBySurname(SlistOfStudents **ppHead)
{
SlistOfStudents *pNewElement, *pNewElementNext, *pNewElementPrevious1, *pNewElementPrevious2, *pTemp;
for (pNewElement = *ppHead; pNewElement->m_pNext; pNewElement = pNewElement->m_pNext) {
for (pNewElementNext = pNewElement->m_pNext; pNewElementNext->m_pNext; pNewElementNext = pNewElementNext->m_pNext) {
pNewElementPrevious1 = PreviousStudent(*ppHead, pNewElement);
pNewElementPrevious2 = PreviousStudent(*ppHead, pNewElementNext);
if (strcmp(pNewElement->m_chSurname, pNewElementNext->m_chSurname) < 0) {
if (pNewElement->m_pNext == pNewElementNext) {
pTemp = pNewElementNext->m_pNext;
pNewElementNext->m_pNext = pNewElement;
pNewElement->m_pNext = pTemp;
} else {
pTemp = pNewElementNext->m_pNext;
pNewElementNext->m_pNext = pNewElement->m_pNext;
pNewElement->m_pNext = pTemp;
pNewElementPrevious2->m_pNext = pNewElement;
}
if (!pNewElementPrevious1)
{
*ppHead = pNewElementNext;
} else {
pNewElementPrevious1->m_pNext = pNewElementNext;
}
pTemp = pNewElement;
pNewElement = pNewElementNext;
pNewElementNext = pTemp;
}
}
}
}
SlistOfStudents* PreviousStudent(SlistOfStudents* pNode, SlistOfStudents* pItem) {
if (pItem == pNode)
return NULL;
SlistOfStudents* pNewElement;
for (pNewElement = pNode; pNewElement->m_pNext != pItem; pNewElement = pNewElement->m_pNext);
return pNewElement;
}
Stanislav
did anyone ever expand boost asio functionality? i have a custom network stack (made in userspace), and it has its own listen, bind, accept, etc functions. and at this point i’m a bit confused how to do it. custom io service? custom socket service class?
Stanislav
Anonymous
#include <stdio.h>
int main()
{
int n=153, sum=0, k;
while(n>0)
{
k = n%10;
sum += pow(k, 3);
n /= 10;
}
printf("%d", sum);
return 0;
}
Pow gives the wrong output....doing k*k*k gives the correct result.
Why?
Anonymous
Anonymous
Please Any books and tutorials on socket programming in c/c++, (already searched on Google, only found example programs). Thanks in advance.// @sherkhan30452
Sher
Thank you
Anonymous
Welcome
Anonymous
Anonymous
@ANkiT1w hello
Anonymous
Pls refer to this
Dima
lol
Anonymous
 pow() Prototype
double pow(double x, double y)
The first argument is a base value and second argument is a power raised to the base value.
To find the power of int or a float variable, you can explicitly convert the type to double using cast operator.
int base = 3; int power = 5; pow(double(base), double(power));
Anonymous
The return type of pow library function is of type double
Anonymous
So you would have to type cast ur values appropriately to get the right results
Anonymous
I apologise Rose wouldnt repeat it
Anonymous
pow ( double(k) , double (3));
Anonymous
Does need math.h header file
Anonymous
Pls dont forget that sum is an integer and pow returns double
Anonymous
So u would have type cast for that as well
Anonymous
Hope it makes sense??
Anonymous
hi l am a new student 😁
Anonymous
in C++
Anonymous
Or at least that's what I think ☺️
Alexander
Dima
lol
Dima
c++ fan service
Anonymous
l love this language
lt's come my friend 😁😁
Anonymous
Alexander
Anonymous
😹😹
Anonymous
C++ is quite powerful for certain applications
Dima
oh really?
Anonymous
But with great power comes great responsibility 😁
Anonymous
oh really?// why do u doubt it ??
Anonymous
When it comes to graphics, gaming etc ... c++ rocks
Dima
I am being sarcastic
Dima
Mr. Obvious
Anonymous
Sorry didnt catch the drift
Dima
Anonymous
Mr.Sarcastic
Alexander
C++ and Mr.Obvious and Mr.Sarcastic ...
Anonymous
Lol
Alexander
MᏫᎻᎯᎷᎷᎬᎠ
Guys
Just help him
Dima
what
MᏫᎻᎯᎷᎷᎬᎠ
We don't have to be that super sarcastic for all newbies
It's getting bored
Dima
this group is for advanced
Dima
not for newbies
Falcon
When program runs , gives error "cannot find modul"
Asad
Anonymous
not for newbies
Here are mostly indians, 99% here are newbies lel
Asad
Alexander
Anonymous
Lol who said am a noob
MᏫᎻᎯᎷᎷᎬᎠ
The implication of actions of being newbie isn't against the rules of the group
Anonymous
Dima is being a pr!ck
MᏫᎻᎯᎷᎷᎬᎠ
Being so sophisticated
MᏫᎻᎯᎷᎷᎬᎠ
😂😂😂😂😂
For real😂😂
Alexander
Anonymous
bandarita 😲
Anonymous
are you bandarita x
the famous youtuber 😧
Anonymous
Yes sure, I am, who ever this bandarita is
MᏫᎻᎯᎷᎷᎬᎠ
noop
MᏫᎻᎯᎷᎷᎬᎠ
🤔
MᏫᎻᎯᎷᎷᎬᎠ
am a noop
MᏫᎻᎯᎷᎷᎬᎠ
indians
Anonymous
MᏫᎻᎯᎷᎷᎬᎠ
Weird
I wanna get that filter
Anonymous
Anonymous
this is a famous youtuber
Anonymous
MᏫᎻᎯᎷᎷᎬᎠ
btw
MᏫᎻᎯᎷᎷᎬᎠ
/report
I_Interface
@bond00_7 Mb go for ot chat with this ?))
Dima
why