0
Write a function for update first argument depends upon second argument
If second argument input is 'on' then first argument is update with ON If second argument input is 'off' then first argument is update with OFF otherwise update with NONE
2 Respuestas
+ 5
This forum is for helping people to clear their doubts or to fix their code. Not for free assignments. If you did a code and got any errors and don't know how to fix that, then share it, we can help =)
+ 4
if arg2 == 'on'
arg1 = ON
else if arg2 == 'off'
arg1 = OFF
else
arg1 = NONE
... ?
Need better description of what you are struggling with / actually need to achieve. Assuming that your question is related to the one you posted earlier, then from your the code you wrote, seems like you're not accurately interpreting the question.
https://www.sololearn.com/Discuss/2920458/?ref=app
My understanding is that the first argument is an enum, not a char*.
https://code.sololearn.com/cr93iixHfo8C/?ref=app