0

I have this statement in my Arduino code :

 byte blockcontent [16] = itoa(order);

and it gives me an error saying: "Too few arguments to function 'charitoa(int,char,int)'. Even though I've looked for the documentation of itoa function and I found that it accepts one input argument. Can anyone help me fix this error?

asked Jan 12, 2017 at 22:38
3
  • Where did you find this documentation, out of interest? The very first hit I get with Google shows 3 arguments: char * itoa ( int value, char * str, int base ); Commented Jan 13, 2017 at 4:38
  • @NickGammon stackoverflow.com/a/5590395/539490 Commented Jun 16, 2019 at 8:03
  • That "reference" is just a question on Stack Overflow. Underneath that question is the comment: How does option 1 even work for you at all? It's my understanding that itoa() takes three parameters - Questions are often asked because people are unsure about what they are doing. Commented Jun 16, 2019 at 10:49

1 Answer 1

0
answered Jan 12, 2017 at 22:48
2
  • Thank you, but is it possible to set an array pointer instead of character pointer? Commented Jan 12, 2017 at 22:53
  • You can probably set a char pointer inside an array of char pointer yes if that is what you mean. Commented Jan 12, 2017 at 22:58

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.