Message from C, C++ discussions

December 2019

— Thanks, I'll think about this.


If I have time, I will help look into the lib more.

It's been a while I've seen a quite usable C++ net lib like this with great performance and fast compilation times.

— Thank you very much!

— 👍

— Glad u came today, have time for more question ? Still on db ?

— I will try to be online in the future.

— I'd like to write a function that stores the frame of the calling function, then "returns" from both the current and the calling function, so that I can later enter the "calling" function at the same position and load the stored frame onto the stack. That way I could easily create generator functions that I'd mainly use for coroutines. Is assembly the only way to implement that? I was hoping for a more portable solution.

Message permanent page

— If the condition in the if statement is true it means it's egual to 0 ?

I'm confused, If I call a function like strcmp(string a,string b) and use put it in an if statement, if the strings match means that function will return 0 and so it's true, but for the if a condition is true when it's unequal to 0, why it's confusing?

So the proper way to do it is if(!strcmp(a,b))

Message permanent page

— unequal to 0 means not equal to 0

— Yeah but, strcmp returns 0 when the strings matches but the if works contrary

— strcmp returns 0 for equal strings, yes?
then if (strcmp(str1, str2)) {...} else {...} should go to the else block if str1 and str2 are equal.

Message permanent page

— Do you experience a different behavior?