I'm working on exception handling in a windows form app made in Visual Studios 2015.
The program runs fine, minus the exceptions that I'm working on, so I created an exception class in a .h file. when I write the #Include statement in the the .cpp I get a problem with the main().
This site is more about standard C++ than "managed" C++ (or C++/CLI or whatever it's called).
However, as a guess it may be getting confused between std::array and cli::array. Are you saying "using namespace std" in your header? If so, remove it and put the std:: everywhere it's needed in that file. You should never say "using namespace std" in a header file, anyway.
Since you don't use the commandline args you can just remove them. void Main()
If you need them later you can get them with Environment::GetCommandLineArgs()
What is the actual reason that it's bad to put a using statement in a header? This is the first time I've ever had an issue with it and it seems that it is mostly because c++/CLR is different somehow than standard c++..
The reason is exactly what you've seen here. You're dumping an entire namespace into the global namespace without any regard for possible collisions. The more libraries your program uses the more possibilities there are that you will stumble upon a collision, especially with such common names the standard library uses, such as vector, set, sort, etc.
Personally, I never use using namespace std at all. It's not such a big deal to type out the std:: in front of the members and it makes the code more explicit. If you're going to do it, prefer to do it in local scope. E.g.: