Liam
Liam
harry
sure, but I'm still doing c
Liam
C also has max.
harry
harry
Liam
fmax?
It's a predefined macro, #define MAX(a, b) (((a) > (b)) ? (a) : (b)).
correctmaninwrongplace
This is the Kind of code that makes that when someone with less experience takes your Last job, he hates you
Liam
correctmaninwrongplace
Isc
Isc
Isc
dont rely on "possible" compiler optimizations
Isc
there are many overloads, someday you will use one of them thinking that it will be inlined but nope
Liam
That's why "in this case" was applied to enclose the discussion.
Isc
in this case in this specific compiler with this specific version, compiling to this specific platform, under those specific conditions and using those libs
Liam
That's what the term "in this case" mean.
Isc
Liam
Isc
okay, tell me the OS, version, compiler, compiler version, linked libs, stl version, cpu architecture etc of @jolieblonde
Isc
if they dont match, then you dont know them
Isc
so you cannot rely on compiler optimizations
Isc
Liam
No I won't do that for you.
It's you, yourself, claimed that I DO NOT KNOW THOSE. Hence it's your responsibility to find evidences to prove your statement, not me.
Also, I'm not trying to be a programming language lawyer here, because what I want to show to Harry is that he need not to think about how to write his code in a very simple situation, for the reason that in this case and in most case, compilers are much smater than most programmers. Hence, just write codes in a simple and clear way, with as less tricks as possible.
Isc
No I won't do that for you.
It's you, yourself, claimed that I DO NOT KNOW THOSE. Hence it's your responsibility to find evidences to prove your statement, not me.
Also, I'm not trying to be a programming language lawyer here, because what I want to show to Harry is that he need not to think about how to write his code in a very simple situation, for the reason that in this case and in most case, compilers are much smater than most programmers. Hence, just write codes in a simple and clear way, with as less tricks as possible.
agree, i would also use std::max but i wouldnt say that it is always inlined
Liam
Fine for that.
Then, where are the evidences for your statement?
Isc
then, my statement is true until you prove it
Liam
lol
Following your words, I could blame you in any way and any words, and if you could not prove yourself from those censure, or you just feel tired to do those stupid things, I'm right?
Liam
Actually, this is how vilification works.
Liam
And what you said is vilification but not discussion.
Isc
deltanicola
harry
this is just like when mum and dad got divorced 😭
deltanicola
Isc
Isc
different == worse
Liam
different == worse
Well, that's one of the difference between our weltanschauungs.
In my eyes, different != worse.
harry
plural is Weltanschauungen ☝
Isc
weltanschauungses don't overload operator==
Liam
plural is Weltanschauungen ☝
Thanks for that.
But for the American Heritage Dictionary of English Language, Weltanschauungen and Weltanschauungs are both accepted.
harry
interesting
harry
it just sounds very wrong for German ears
Liam
https://www.merriam-webster.com/dictionary/weltanschauungen
Also for MW.
deltanicola
It takes more ro write it than to spell it
Liam
Anonymous
Weltanschauung ist german, yes
Anonymous
Weltanschauungs...
Anonymous
lol
Darkhan
Hiii!!!
Anonymous
std::cout « "Hi!\n";
Darkhan
I learn loop c++ while,for
Darkhan
Please ,help
Darkhan
I don't understand this topic
Anonymous
correctmaninwrongplace
Mother of god, you can be so Wild Talking about C++ xDD
correctmaninwrongplace
By the way, the guy with a exam have posted some code trying to solve it?
Anonymous
lol
Anonymous
dunno
Anonymous
The concept of looping itself?
Darkhan
While && For Loop
Darkhan
while() for()
Anonymous
ok
Anonymous
What exactly?
Anonymous
while checks the condition. If it is true, it executes the code in its body. Then it checjs the condition again etc. If the condition is false, it skips the code in its body
deltanicola
Anonymous
Any non-zero value is treated as true iirc (It's certainly true for C)
Anonymous
But that's not important
deltanicola
Anyway, imagine a code like that
int i=0;
while(i<10){
//code
i++;
}
While i stays under the value written in the parenthesis, the code in the while loop is executed
With the for, you can summarise
for(int i=0; i<10; i++){
//code
}
Anonymous
;
Anonymous
in the for loop
Anonymous
:D