qontinuum 2022-09-15 19:56:46
Spektrum_light 2022-09-15 19:55:34
who are you?
Yes
Spektrum_light 2022-09-15 20:00:22
good
Glats 2022-09-15 20:01:17
qontinuum 2022-09-15 19:56:46
Yes
Yes – Roundabout (Original 1971) – YouTube
Yes – Roundabout (Original version released in 1971).
Yes – Roundabout (Original version released in 1971).
I’m Not the owner of this song. All the credits and views will be of the real owners. This is just for you to hear and enjoy the good progressive rock.
yabadaba doo 2022-09-15 20:07:46
qontinuum 2022-09-15 19:39:14
Try to add the -std=c99 to your CFLAGS
i already do, i run gcc -std=99 -O0
qontinuum 2022-09-15 20:17:40
yabadaba doo 2022-09-15 20:07:46
i already do, i run gcc -std=99 -O0
Ah 🤔
yabadaba doo 2022-09-15 20:19:27
okay i double checked, they all use s[], my bad 😐
ChrisCromer 2022-09-15 20:21:35
yabadaba doo 2022-09-15 20:19:27
okay i double checked, they all use s[], my bad 😐
Well s[] is an array and *s is a pointer, so 2 different variable types…
ChrisCromer 2022-09-15 20:21:57
Obviously you need to use what the function asks for…
yabadaba doo 2022-09-15 20:22:01
but when you malloc for *s it works …
herzeleid02 2022-09-15 20:22:19
Aurelian 2022-09-15 17:09:11
What is it with mentally ill people and anime?
i listen to bts
qontinuum 2022-09-15 20:22:20
ChrisCromer 2022-09-15 20:21:35
Well s[] is an array and *s is a pointer, so 2 different variable types…
Meh, an array is just a pointer
yabadaba doo 2022-09-15 20:23:06
void *memmove(void *str1, const void *str2, size_t n)
qontinuum 2022-09-15 20:23:17
yabadaba doo 2022-09-15 20:22:01
but when you malloc for *s it works …
I think it just has to do with string literal
yabadaba doo 2022-09-15 20:23:29
qontinuum 2022-09-15 20:23:17
I think it just has to do with string literal
ohh wait
yabadaba doo 2022-09-15 20:23:34
i just remembered
yabadaba doo 2022-09-15 20:23:45
when you do pointer to string literals its read only
yabadaba doo 2022-09-15 20:23:46
doh
ChrisCromer 2022-09-15 20:24:52
qontinuum 2022-09-15 20:22:20
Meh, an array is just a pointer
True, but there are some differences in how to use the 2.
qontinuum 2022-09-15 20:28:25
The only difference I see is that an array is preallocated or uses literals while a pointer can be null
ChrisCromer 2022-09-15 20:32:02
qontinuum 2022-09-15 20:28:25
The only difference I see is that an array is preallocated or uses literals while a pointer can be null
Correct an array is preallocated on the stack. Obviously with the pointer you need to allocate memory and deallocate it yourself.
qontinuum 2022-09-15 20:32:49
Oh yeah it is also on the stack not a detail
And not zeroed
And not zeroed
capezotte 2022-09-15 20:48:32
yabadaba doo 2022-09-15 07:51:34
why is memmove fine with s[] but alergic to *s?
char *s = “aaa”;
creates a read-only pointer inside the file
yabadaba doo 2022-09-15 20:48:46
capezotte 2022-09-15 20:48:32
char *s = “aaa”;
creates a read-only pointer inside the file
creates a read-only pointer inside the file
yeah i eventually realized
yabadaba doo 2022-09-15 20:48:48
thanks dad
capezotte 2022-09-15 20:49:29
i actually asked the same thing here a year ago
capezotte 2022-09-15 20:49:40
that’s when someone showed me godbolt 😛
yabadaba doo 2022-09-15 20:49:59
i think it catches you off guard because when you pass it as a variable it becomes mutable again
yabadaba doo 2022-09-15 20:50:07
so you forget the og copy dont work that way
qontinuum 2022-09-15 20:51:05
capezotte 2022-09-15 20:48:32
char *s = “aaa”;
creates a read-only pointer inside the file
creates a read-only pointer inside the file
You mean in the data section?
capezotte 2022-09-15 21:03:39
qontinuum 2022-09-15 20:51:05
You mean in the data section?
probably
capezotte 2022-09-15 21:03:51
i don’t know ELFs
Senderman 2022-09-15 21:25:32
capezotte 2022-09-15 21:03:51
i don’t know ELFs
install GNOMEs then
qontinuum 2022-09-15 21:26:40
Senderman 2022-09-15 21:25:32
install GNOMEs then
Wat
qontinuum 2022-09-15 21:26:48
Oh fuck
Senderman 2022-09-15 21:26:56
you got it