0

I'm working on CS50 pset3 helpers.c, trying to implement my own search algorithm (first TODO in the helpers) like the following: enter image description here

Make helpers came back with the following error message. enter image description here

Values[] is a string, isn't it? Then why the error message? Ran without brackets, assigned it to another variable, etc, but none of them worked. I'm stacked. If I were in campus, I could easily ask my friends around, alas, I'm studying alone through the Net. Would appreciate your help...

Yoshi Watt

1

values[] is an array with strings in it, you need to index it to measure the length of the string in it.

And you really shouldn´t declare "n" as a variable for your for-loop, name it old-fashioned "i", see why?

3
  • How stupid of me! I had forgotten 'n' meant the number of the randomized number to be generated. Thank you so much for your response even to my dumb question. Now I've got 'control may reach end of non-void function error'. I would have to work on this... – Yoshi Watt Nov 7 '14 at 10:58
  • You are welcome^^ – SebBr Nov 7 '14 at 13:06
  • Is values[] a pointer to the array? – user2477 Nov 14 '14 at 8:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .