how to insert values from readline into an array?
how to insert values from readline into an array?
3 Replies
Heyy
Can you elaborate on your question?
You just need to store the results from readline in a variable then put the result in the array index you want (or skip storing it in a variable and just put it in the required index location directly)
whats an index?
do i mkae a variable for every slot?
u can set by board[ any index ] = ReadLine
but array has fixed size, meaning it cant scale up or down dynamically
List<> is a better approach if scaling is required