programming category? -
vishnu - 02-13-2023
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.
RE: programming category? -
Raion - 02-13-2023
Hey Vishnu,
Yessir, I can add a category. I've also been thinking of a general "projects" category for people to show off their stuff.
RE: programming category? -
Raion - 02-13-2023
Ok, it's added. Go ahead and PM me a list of topics in General you think should be copied/moved, because I CBA to dig through our library
RE: programming category? -
vishnu - 02-13-2023
(02-13-2023, 01:00 AM)Raion Wrote: Ok, it's added. Go ahead and PM me a list of topics in General you think should be copied/moved, because I CBA to dig through our library 
Coolio, thanks Raion! A projects forum would be awesome, just for example here's mobile 600 kilojoule pulse forming network I worked my ass off on, we actually flew it to Germany aboard an AC-130 to use it to test their concept ETC gun for use in their Leopard tanks... 😁