```A = (char *) malloc(sizeof(char) * 6);``` Hi ev...
# announcements
m
Copy code
A = (char *) malloc(sizeof(char) * 6);
Hi everyone, could someone help me with what is the alternative of malloc in kotlin? I would like to convert above in kotlin
s
in kotlin (and java) you don't have to allocate memory before affecting string
m
are you looking for #C3SGXARS6 ?
m
the closest allocation I can think of is
Copy code
val ca = CharArray(6)