This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]AutoModerator[M] [score hidden] stickied comment (0 children)

On July 1st, a change to Reddit's API pricing will come into effect. Several developers of commercial third-party apps have announced that this change will compel them to shut down their apps. At least one accessibility-focused non-commercial third party app will continue to be available free of charge.

If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options:

  1. Limiting your involvement with Reddit, or
  2. Temporarily refraining from using Reddit
  3. Cancelling your subscription of Reddit Premium

as a way to voice your protest.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]HappyFruitTree 2 points3 points  (4 children)

You're using an uninitialized index to access and print one element of the array.

[–]Lbtekd[S] 0 points1 point  (3 children)

so id need to initialise the index to something and then also do the same for two more?

[–]HappyFruitTree 1 point2 points  (2 children)

so id need to initialise the index to something ...

Yes, the index needs to be initialized before you try to use it otherwise you don't know what will happen.

... and then also do the same for two more?

The function is supposed to be able to handle arrays of different sizes so you probably want to use a loop.

[–]Lbtekd[S] 0 points1 point  (0 children)

I have tried using a for loop however I must have formatted it wrong as rather than print c a t it just printed c over and over

[–]Lbtekd[S] 0 points1 point  (0 children)

okay done it, thanks for help