Hello all i need help on this simple question that I've been trying to figure but failed to find the answer about character array:
Today I was trying to write a program that simulates an answer machine, and I had a model which I copied off from a website, one of the variables is char Messages[25][100];
I wasn't sure what do to because I never worked with a variable with two arrays. But from what my teacher told me, he said that it simply says that there are 25 rows and each row can hold 100 characters maximum(well, technically it should be 99, considering the null terminator). But still I couldn't find a way to store characters in this situation.
For example, how would I input the characters "hello world" into the first row? I tried Messages[1]="hello world" but it didn't work, i tried to add [100] after [1] and it didn't work out also. I just need an example on how to input characters in this situation, thank you for your help in advance
Today I was trying to write a program that simulates an answer machine, and I had a model which I copied off from a website, one of the variables is char Messages[25][100];
I wasn't sure what do to because I never worked with a variable with two arrays. But from what my teacher told me, he said that it simply says that there are 25 rows and each row can hold 100 characters maximum(well, technically it should be 99, considering the null terminator). But still I couldn't find a way to store characters in this situation.
For example, how would I input the characters "hello world" into the first row? I tried Messages[1]="hello world" but it didn't work, i tried to add [100] after [1] and it didn't work out also. I just need an example on how to input characters in this situation, thank you for your help in advance