Alignant
You CANNOT change the size of a C-array. you can only reallocate it
Well, that's how it works on the inside. You regard array as an object, but in C it's a bunch of bytes
olli
N1570 6.7.6.2 defines arrays let's read it
Alignant
should compile on a C11 compiler
It says that variable length arrays are a part of C99 standard, but not a part of C++ standard. At least not in C++11 standard https://stackoverflow.com/questions/1887097/why-arent-variable-length-arrays-part-of-the-c-standard But GCC still supports it because... magic. I didn't know that
olli
Btw C does not enforce implementation of variable length arrays but does allow it
Alignant
thats exactly what I said
I didn't know that you can do it in GCC
BinaryByter
you can do it in C
Alignant
Maybe the reason is that GCC has both C and C++ compilers, and microsoft only supports C++
Alignant
You can't do VSA in MSVC C++ compiller
Alignant
I wander why :D
Alignant
Variable size array
Alignant
Or variable length array
Alignant
The proper term is VLA, I believe
olli
I wander why :D
The official term is the later one Vendors are not enforced to support VLA
Alignant
Which means that some code may be not cross platform because of this small issue? That's sick
olli
"Variables length arrays are a conditional feature that implementations need not to support" N1570 6.7.6.2.4
Alignant
I probably didn't know that because I didn't use C-arrays for some time
BinaryByter
those suckers
Dima
microsux indeed
Dima
lol not even c99
Alignant
C++ standards are ambiguous, lol
Alignant
I bet microsoft exploits it :D
Dima
explodes it
Alignant
And you still think that C is better for a beginner to learn?
Can you make a recap of your arguments against C? I just want to make a small checklist. Most people love C and criticize C++, that'd be a change :D
Mat
Is it what i think?
Alignant
"Minecraft Recipes For Dummies" Lol, they've made a book of it
Mat
/warn no illegal books
Marie
Warn removed by クリミ.
Anonymous
😂
Dima
2/3 lol
Dima
well well well
Alignant
/warn no illegal books
What I am I laughing?
Mat
What I am I laughing?
That doesn't make sense
Dima
lol couldn’t read too
Alignant
Will the third warn result in a permanent ban? :D
Alignant
Do you compare yourself to Jesus?
BinaryByter
why did they?
olli
Stop - political or religious topics are forbidden
Dima
here you go third warn
Alignant
Loool 😂
BinaryByter
/varn yes
BinaryByter
lol jkjk
Alignant
/varn yes
A close one
Alignant
You're playing with a certain fire you know
BinaryByter
the guy whose mother got pregnant without fucking her husband?
BinaryByter
Lots of guys were born this way :D
it was a "miracle" (the mother forgot to clean her hands after getting her bf off)
BinaryByter
anyway, let's go back to drawing :D
olli
No
olli
You're basically asking to get banned
Roxifλsz 🇱🇹
the guy whose mother got pregnant without fucking her husband?
>Oh hello guys, what's going on in he... >Excuse me what the fuck
olli
So what? You break into houses and steal from the rich?
Alignant
We're programmers, we're rich mudafakas, yolo swag
olli
Furthermore this is #offtopic
Alignant
I'm bored with your books issue @linuxer4fun, remind me why you criticize C. It's not a common sight, you know
BinaryByter
that's the TL;DR
Alignant
Some would say(I'm not saying I agree with it) that some C++ features are lame and cause more trouble, than benifit 😉
Alignant
C-arrays are wonderful.
Ariana
c arrays and c++ arrays have a diff?!?
Alignant
c arrays and c++ arrays have a diff?!?
For the sake of argument we call std::arrays C++ arrays, and normal arrays C arrays. Like we do it with strings
olli
c arrays and c++ arrays have a diff?!?
C++ added std::array as a better alternative over the default arrays.
Ariana
oh
Ariana
I see arrays as p+index still xd
Alignant
I see arrays as p+index still xd
That's because you started with C which is highly non-recomended by some people
olli
or because you understand the idea of randon access and continuous memory regions
Ariana
Or really cuz i do too much assembly xd lea eax [ebp-0x20]
Ariana
But then memory corruption :>
Anonymous
What is malloc
Ariana
googled?
Ariana
What did you not understand
Anonymous
OK got it memory allocation 😂
BinaryByter
I see arrays as p+index still xd
thats exactly what arrays are