I wonder if it makes sense to add a programming forum to the site, just a generic forum for any language and any version. I'm sure it would be low traffic but I know there are some good programmers here, and I find using stackoverflow to be extremely annoying due to the vast number of haughty know-it-alls there, who seem far more interested in insulting people rather than helping them.
Like just for example I'm diddling around with using const C++ arrays which has been in the standard library since, I think, C++ 11, but I'm having a hard time seeing how there's any advantage to using it compared to a good old fashioned const C array:
Code:
#include <array>
#include <string>
int main()
{
std::array<const std::string, 34> right_column_strings_new =
{
std::string("0"), "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0",
"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0",
"0", "0", "0", "0", "0", "0", "0", "0", "0", "0"
};
const char * right_column_strings_old[34] =
{
"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0",
"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0",
"0", "0", "0", "0", "0", "0"
};
return 0;
}
To compile on Linux, save it to your disk as filename std_array.cpp:
g++ -Wall -W -Wno-unused -pedantic std_array.cpp -o std_array (running the compiled program does absolutely nothing).
No need trying it on MIPSPro because MIPSPro doesn't have the array in it's standard library.