Does C++ support constant arrays of type string? -


I am a programming student in my first C ++ classroom, and for a recent project, Arrays like I have C #:

Is it possible to do something similar in C ++?

Thank you!

If you start the array in C ++, then it does not need to set a size (Although it will accept one), therefore:

  std :: string month [] = {"Jan", "fur", "march", "april", "may", "June", "July", "August", "September", "October", "November", "Dec"};  

For me, it's fine with G ++ and I hope it compiles it elsewhere. I hope your errors are due to the lack of std :: namespace.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -