I saw that a TODO list of some sort is like a rite of passage beginner project for coders, so I’m trying one myself. I’m not looking for a tutorial, I just wanna fix my code and learn from it, whether it’s a stupid approach or not.
Based off of my print results (it looks like a sorting algorithm of random characters, then screams to the compiler for help, and then crashes the .exe and shortly after the terminal), I’m betting that this isn’t the way to go about this. I’m essentially taking a string variable, (todoToCreate) and trying to insert it into a multi-dimensional array.
From what I’ve looked at online, the solution might have something to do with pointers, but I’m too dumb and lazy to figure it out.
for(int i = 0; i < rows + 1; i++)
{
if(todos[i] != NULL)
{
for(int j = 0; j < columns; j++)
{
todos[i][j] = todoToCreate[j];
printTodos();
}
}
}