hi i trying fill 2d array with strings (i want split a big input string by paragraphs) but i get abort trap 6:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
char* input = getenv("AOC_INPUT");
const char* paragraphs[8];
int nextParagraphIndex = 0;
const char* delimiter = "\n\n";
char* paragraph = strtok(input, delimiter);
while (paragraph != NULL) {
paragraphs[nextParagraphIndex] = paragraph;
++nextParagraphIndex;
paragraph = strtok(NULL, delimiter);
}
}