Erdem
(:
Emir
Is there a any difference between these codes? (as fast) Player a; a.isim = “emir”; ——————————— Player * a = new Player(); a->isim = “emir”; delete Player; ———————————— I think first code faster than second, because it allocated in stack memory, is it true?
Emir
that’s not an important point
Anonymous
Hello I am in need of help I am trying to configure an reed switch sensor for the esp32. I have problem by initialising and by configuring it! Thanks!
Francisco
So if i want to write a fast program, i should use a stack memory all the time
That's what developers in embeded systems tend to do. Memory allocations are expensive, but they provide a lot of flexibility
Emir
Thanks a lot both of you
Anonymous
I am moving from c language to learning c++ so which book should I consider?
Anonymous
Ok tq I will give it a look 👍
zaman
i think he is not a beginner, he already complete c language .
Anonymous
Hello Members, I have started learning basics of C programming language. I'm using K&R C programming language book and using the Dev C++ compiler on Windows. Which library should I use to create socket and perform a simple server/client exercise? I could not find any resource written for Dev C++ compiler.
Anonymous
Dev C++ is not a compiler, it is an IDE. It uses GCC as compiler, as far as I know.
So, Unix socket programming stuffs would work? I found some resources for Unix socket programming. I just don't have any Linux distro with me. So, I was confused what to do.
Anonymous
Install Linux 👍
I love Linux. 😌 At the present moment it's not convenient for me to do so. So, have to use either Dev C++ or Tiny C compiler.
zaman
ohh...ok
zaman
thanks for your kind information.
Nameful
/report
Anonymous
/report
Dima
what
Dima
I see
Nameful
what
GOUTAM NANDA posted something spammy
Anonymous
Thank you. I will take a look into that.
Anonymous
Any Brazilian around here?
zaman
now i learn data structure and algorithm. so, i need a favour for your guys. has any groups you guys know that there are seriously discuses data structure and algorithm, like this group. please let me add.
zaman
thx
~~~~~~
/report
Anonymous
Hi guys, I'm doing an exercise that requires me to create two random access files. I've created them, and filled them with empty data, but when I try to read a line to see I everything is all right, I see that "fread" function doesn't read anything. Here is the code; I'm a newbie, so be aware that there could be some horrors lines ;) here is the code https://pad.riseup.net/p/freadDoesntRead-tmp
Anonymous
char msg[100] = "world" char *p = "hello"; sprintf(msg, "%s %s", p, strdup(msg)); Since nothing is pointing to the duplicated string produced by strdup, is the memory freed automatically?
Anonymous
thanks, like I said, I'm still learning. Honestly it's not clear to me this offset thing
Renan
OK. Thanks. 👍
Anonymous
No
Okay thanks
Anonymous
even if I use fseek to start from the beginning It doesn't change
Anonymous
Thanks, that was helpful.
Anonymous
ah, Ok, thanks, now I've understood my error
Anonymous
actually now it works
Achyut
Can anyone say how this program have been evaluated
Intel
guys pls anyone suggest link to the best program for learning c# i mean tool ?
Achyut
Can anyone say how this program have been evaluated
First ++ x execute after that x++ executed & value assiging to y is 22
Achyut
& x value will be 12
Anonymous
First ++ x execute after that x++ executed & value assiging to y is 22
no. first x++ is evaluated and its side effect is completed
Anonymous
then ++x
Achyut
Check on gcc compiler then you will known
Anonymous
the comma operator guarantees left to right evaluation. further, there is a sequence point between the lhs expression and the rhs expression of the comma operator
Emir
what if int y = (x++, x++);
Achyut
no. first x++ is evaluated and its side effect is completed
Kkk, sorry i have not seen coma operator, I thought + operator Your ans is correct
Anonymous
Kkk, sorry i have not seen coma operator, I thought + operator Your ans is correct
if it was + operator, then the answer would have been undefined
Anonymous
+ operator doesn't specify left to right evaluation and there is no sequence point between the operand expressions
Achyut
if it was + operator, then the answer would have been undefined
That time sure first ++ x execute after that x++ execute
Anonymous
it’s 11, why ?
y will be 11, x will be 12
Anonymous
Anonymous
in store1 = f(x) + g(y); store2 = f(x) + g(y); it is completely possible that in the first calculation f(x) is evaluated first and in the second calculation g(y) is evaluated first
Achyut
y will be 11, x will be 12
No x and y both 12
Achyut
Check on gcc
Anonymous
No x and y both 12
he mentioned a different problem
Emir
No x and y both 12
y11 i checked
Anonymous
Any one know mic jack issue about window8
Anonymous
Check on gcc
what part of "order of evaluation is unspecified" is hard to understand
Anonymous
Hello please anyone has a "writing a bitmap" video from cave of programming....the video has been deleted online...its 11:08 seconds tutorial video
Anonymous
Do NOT ever do this
Anonymous
Modifying the same variable more than once in the same sequence point is undefined behavior
Anonymous
There is no answer
Emir
Sorry misread
I checked on gcc, an gcc doesn’t show any warning or error about UB
Emir
how can provide that compiler warn me when i use Undefined Behavior
Aswin
Guys i am a student...i want to learn c programming....from beginning...how can i start that?