void main is nonstandard but most compilers support it. It was popular for a time in the late 90s, but it was never meant to be correct.
main can't be in a class in c++. It is the starting point of the program and there is no object at that point to hook it into. Java forces main to be in an object, because java wants to control how you code and prevent you from doing anything. (Pardon my bitterness but every time I am forced to use it, I spend 75% of my time trying to work around artificial limitations in the language).
Java came from c++ as an attempt to make a C++ like language that did not have the portability problems of C++ (which were a LOT worse when this was going on and are actually much better now in many ways). The shared syntax often means that java code and c++ code look very similar -- so much so that the inner parts of many functions are totally identical in both languages esp if doing math (strings are fairly different). I believe you have mistaken some java code for c++.