Deprecated strings...
Say I create a set of strings like this,
1 2 3 4 5 6 7
|
static char *SomeList[] =
{
"String 1", // this string deprecates
"String 2", // this string deprecates
"String 3", // this string deprecates
};
|
How do I define this so I don't see the warning?
1 2 3 4 5 6 7 8
|
#include <string>
static std::string SomeList[] =
{
"String 1",
"String 2",
"String 3"
};
|
Thank you for the suggestion, I hadn't come to that conclusion yet.
If you really must use character arrays, make sure you use const char *
I tried const char* it didn't get rid of the warning.
Topic archived. No new replies allowed.