Error/warning when executing the provided code

I was trying to run the code that was provided in the oops section , but it shows me this warning

warning: ISO C++ forbids converting a string constant to ‘char*’

I didn’t make any changes to code, also I believe that its the same code that the instructor had written in the lecture video.

His code was working perfectly fine, then why isn’t this ?

error was due to passing a string (“FERRAI”) and parameters was char array!


check this out!

I’m aware that we are getting an error because we are passing a string for an argument defined as char array, but what i’m asking is why doesn’t this error show up when the instructor is executing this code in the video lecture.

Well it’s just a warning and code executes along with an output.

I get what is happening here now … thanks for your help.
But you might wanna check out why it wasn’t working on the coding blocks ide

Sure! if your doubt is answered you may mark it resolved