abdelilah
/
Anonymous
Artöm
Why not call it by name?
Anonymous
Why not call it by name?
I cannot write the system() function myself. I’m expecting it to be in a target device, so I can call it.
Artöm
Why not include stdlib.h and call it by name?
Anonymous
This is a special scenario. It’s not a program. Consider it a catch for an exception.
Artöm
(((int(*)(const char*))address)("argument");
Anonymous
wtf, homework questions?
Anonymous
Anonymous
Hmm and tell me, is asking homework questions in this group a good idea?
max
I just couldn't make logic for this problem...can you help please.
Z0OM
Can someone help me with templates and friend functions
Chernykh
Hello everyone
Chernykh
Can anyone tell me, how to run code in another process without recalling my own app with special args
Chernykh
I've already saw about boost.process, but it'd be cool, if it's possible to run code via passing lambda for example
Asdew
POSIX?
Chernykh
cross platform
ThinkIt
ThinkIt
Can anyone help solve this question?
MilkBeforeCereal
gonna get banned boi
Anonymous
Go away
MALIK AMIR
Someone please tell me the benefits of C++ language I'm beginner?
pdn
Someone please tell me the benefits of C++ language I'm beginner?
it's fast, it's stable, it's C with classes, big community
Dima
depends on how you use it
Dima
C is stable too if you write your code carefully
manas
pdn
depends on how you use it
true story, in c++ so many styles..
Dima
except js and python:) these are retarded
manas
What does unstable even mean? Does it mean that the language is slow or something more?
Anonymous
Anonymous
help.. How to start doing this question i m new in cp
pdn
help.. How to start doing this question i m new in cp
start yourself, post some code, then get some help 👍
Anonymous
Could someone help me with this Broken Pipe exception please? Thx in advance
Nomid Íkorni-Sciurus
Anonymous
Yes
Nomid Íkorni-Sciurus
and are you sure the pointer is not void at that point in the code?
Anonymous
nope it shouldnt be
Anonymous
I can send you the code if you want to
Nomid Íkorni-Sciurus
check if there are nullptr in play or if ->socket points to some invalid locations
Nomid Íkorni-Sciurus
or, the socket might be in an invalid state
Anonymous
Under which circumstances does a socket generate this exception?
⚔️ ĨŇVīŠbĹ3
#include<bits/stdc++.h> using namespace std; int main(){ string a = "9" , b = "100"; if(a > b) cout << (a > b ? "YES" : "NO") << endl; if(a > b) cout << ("9" > "100" ? "YES" : "NO"); }
⚔️ ĨŇVīŠbĹ3
output
⚔️ ĨŇVīŠbĹ3
YES
⚔️ ĨŇVīŠbĹ3
NO
⚔️ ĨŇVīŠbĹ3
Explain
Nomid Íkorni-Sciurus
Explain
pay me
Anonymous
lol
Nomid Íkorni-Sciurus
too many
the general idea is that when you create "a socket" you're basically creating a read-write pipe to the target
Anonymous
yup
Nomid Íkorni-Sciurus
so, if anything went wrong during the process or read... or write... results in a broken pipe
Nomid Íkorni-Sciurus
kind of a Java IOException
Anonymous
What if nothing gets sent over the socket for a while...
Nomid Íkorni-Sciurus
it shouldn't be an issue
Anonymous
does it close or something like that
Nomid Íkorni-Sciurus
and since I saw the peer did connect to your socket
Nomid Íkorni-Sciurus
I thought there is some nullptr somewhere
Nomid Íkorni-Sciurus
or an invalid pointer
Anonymous
hm
Anonymous
What if I catch the exception and disconnect the client whch is causing problems?
Anonymous
Would it be a bad solution?
Nomid Íkorni-Sciurus
you might try but I see that is the standard C interface
Nomid Íkorni-Sciurus
probably the best you could get is something like a read-write exception
Nomid Íkorni-Sciurus
when I face this kind of problems, my first try is to log everything
Nomid Íkorni-Sciurus
then I follow the passages and see if the log mirrors what I am expecting
Nomid Íkorni-Sciurus
including member pointer locations