Anonymous
Windows 7 Is The God....
Yes thats correct
Anonymous
Windows 7 Is The God....
They are working on 10 still to give user more command on the OS
Ariana
well woudnt the compiler be warning about implicit typecasting?
Anonymous
Many versions came and go but never matched speed,accuracy to any other windows
Anonymous
Which windows is best for laptop for doing c programming
Forget about Windows, install a Linux distribution
Anonymous
Hey @stevewozniak can i give FAIZUR a pdf
Anonymous
Hey @stevewozniak can i give FAIZUR a pdf
why would you not send it in pm?
Anonymous
Anyone
Which area are you living in
Anonymous
why would you not send it in pm?
I know thats right 😉😉
Anonymous
I'm using 'C In Depth' book
Anonymous
BPB publications
Ariana
If you want to do illegal stuff go to pm xd
Ariana
Like it will just warn wouldnt it
Ariana
>< mirrored
Ariana
well it would work cuz arrays are just pointers anyways, i guess a 1 element int array is identical to an int
Ariana
uhh it isnt anything new
Anonymous
By the way. Where are you all from ??
Ariana
like it would work in the past when c was just a thing
Ariana
singapore, there's a offtopic chat
Ariana
#offtopic
Marie
#offtopic
https://t.me/joinchat/Ci0Cak-BPuxaHdcbjab4QQ
Ariana
huh they are different?
Ariana
arrays are just pointers really
Noice
In modern c++ "{put-args-here}" is used to construct instances in general. It could even be seen as a shorthand for "Type name = Type(put-args-here);"
Ariana
oh interesting
Noice
As modern as they can get
Mat
wtf
Mat
No
Mat
int a {5}; is not int a = 5;
Mat
At the end both will create a variable with a value equals to 5
Mat
But they work differently
Mat
The compiler do different stuff
Mat
Maybe this 🤔 http://www.informit.com/articles/article.aspx?p=1852519
BinaryByter
the wordlist i'm using is screaming in anxiety
Alignant
Alignant
It's not always different, by the way :D
BinaryByter
Alignant
compiler optimization
It doesn't matter what you use if it's a basic type
Mat
It's not always different, by the way :D
The result is the same, but the compiler's work isn't
olli
to assign or initialze an integer you mov it
Alignant
to assign or initialze an integer you mov it
Yep. That's why it doesn't matter with basic types
Alignant
But most people like using initializer list for consistency
Noice
But most people like using initializer list for consistency
Which I think is the main reason the brace-initializer exists.
Alignant
Which I think is the main reason the brace-initializer exists.
Well, there's nothing wrong with = assignment And there is nothing wrong with postfix iteration either~
Mat
Well, there's nothing wrong with = assignment And there is nothing wrong with postfix iteration either~
{} is better imho than = to init a variable :P The fact that isn't wrong is another topic
Alignant
{} is better imho than = to init a variable :P The fact that isn't wrong is another topic
Variable initialization is not a very complex subject. Most times it doesn't matter :D
Mat
That doesn't mean you can't prefer a better tool
Mat
Or that you shouldn't care
Alignant
That doesn't mean you can't prefer a better tool
It's even more stupid than tabs vs spaces 😢
Alignant
Because it's C++, not ++C
olli
Because it's C++, not ++C
I guess you like copies then, no offense
Mat
It's even more stupid than tabs vs spaces 😢
No. You should use everytime the best tools you have. If something has better support, it's not stupid to point out something like that
Alignant
I guess you like copies then, no offense
What do I copy if I iterate an integer?
olli
What do I copy if I iterate an integer?
I think it's easier to always use prefix, so you are always using the fastest. When using postfix operators on user-defined types the only sane way to do this, is to perfom a copy of the object. Writing ++x instead of x++ does not hurt me, but might be faster
olli
Do you use unsigned int as a counter in a loop? :D
I try to use <algorithm> as often as possible, which prevents using loops in some cases for-range loops help as well
Alignant
I know, I'm just curious. I saw a serious debate that for (int i = 0; i < N; i++) is bad, and it should always be for (unsigned int i =0; i < N; ++i) :D
olli
I know, I'm just curious. I saw a serious debate that for (int i = 0; i < N; i++) is bad, and it should always be for (unsigned int i =0; i < N; ++i) :D
I think the more interesting part is counting down Like what you would use to - reverse iterate over a std::vector (or c-array) in reverse while maintaining the index
Mat
It's like saying that is useless to have good habits as if they doesn't worth it :-/
olli
It's not bad, if you are writing serious software there are far more important things to optimize.
My point simple was writing ++i does not hurt but might offer advantages, so why not do it?
Alignant
It's like saying that is useless to have good habits as if they doesn't worth it :-/
Well, what if I say that i++ helps me see it's an int and not a iterater and makes code clearer? :D
Mat
I always try to learn the best way to do things, even if they've not so impact on performance.
Deni
i=i+1 is better than i+1=i(joke)
olli
Well, what if I say that i++ helps me see it's an int and not a iterater and makes code clearer? :D
I think this behavior is likely to introduce issues when working in teams. like "Wait, did you name your iterator i? or are you doing postfix on iterators?"