BinaryByter
you have to allocate it first
Jonathan
you have to allocate it first
In the body of outer struct or main block?
BinaryByter
inside of the struct
BinaryByter
since its just a pointer
Jonathan
since its just a pointer
Could you show me the syntax ?
BinaryByter
objectout.inner = new Objectin;
BinaryByter
wait, this is C
BinaryByter
then
Jonathan
Yeah
BinaryByter
objectout.inner = malloc (sizeof(Objectin));
buggybug
There are 2 solutions: 1) allocate memory anywhere before accessing the field 2) use aggregation (use an object instead of a pointer)
buggybug
As for the C it's wrong cause may mask an error
BinaryByter
no
BinaryByter
C doesnt care about pointer types
BinaryByter
(ewww)
Jonathan
Ok got it sorry I got confused
Jonathan
Thanks for all the help 👍😅
Anonymous
Hi
Anonymous
Anonymous
what is it asking me click here to prove you're human ))
Anonymous
Anonymous
Does it works
Dima
What the hell
BinaryByter
many
I've never used mpz and gmp family but I'm pretty sure that you may have to check for argc before accessing argv elements
𝓐𝓼𝓱𝔂
Hi
𝓐𝓼𝓱𝔂
?
𝓐𝓼𝓱𝔂
Hey
swarnim
Java is not welcome here..😡
Dima
Jawa from the Tatooine
Russkiy
cout <<"hit every one";
Dima
Lol
BinaryByter
stop it asap please
Russkiy
why is that!?
BinaryByter
why is that!?
SO MANY REASONS
klimi
fucking math
swarnim
why is that!?
the context get's muddled for starters.
Russkiy
so you telling me that you are this "smart" to write code using std:: !?
Victor
maybe he is just using std::cout 😂
klimi
why is that!?
its confusing
Russkiy
is not
klimi
/saved
Russkiy
ummm wat?
yeah that. is just wasting your time
Russkiy
the time you use doing that can be doing more code
swarnim
so you telling me that you are this "smart" to write code using std:: !?
this dilutes the context of the code and make it harder to figure out where does something come from.
klimi
maxi pm
BinaryByter
yeah that. is just wasting your time
you know what? Im going to write a library that contains cout
Russkiy
you can use that if you are making 20 20 lines of code
Russkiy
not hundred
BinaryByter
dude
Russkiy
namespace is there fore a reason
BinaryByter
it is there for a reason
BinaryByter
stop diluting it
Russkiy
four characters
yeah at every line of code
BinaryByter
yeah at every line of code
... where you use cout
BinaryByter
so maybe ... 4 lines
BinaryByter
at most
Russkiy
use that time to debugging
BinaryByter
as many chars as "using namespace std;" itself
Russkiy
Russkiy
not all time
Russkiy
not at every cout line
Russkiy
Dima
so you don’t want to write std:: namespace everytime but you want your project to be bloated with stuff you don’t need?
Dima
you shouldn’t be looking here then
Dima
gg
Dima
Anonymous
Ok guys whats the fundamental difference between printf and putchar?
Anonymous
Also, scanf and getchar?
Dima
putchar, hence the name, puts only a single character