i just found out we can defining and instantiate class at once like this
#include <iostream>
using namespace std;
class PLAYERS
{
public:
int value3;
PLAYERS(int value3)
{
this->value3 = value3;
}
}play1(2), play2(3), play3(7);
int main()
{
play1.value3 = 2;
PLAYERS play4();
cout << "Hello world!" << endl << play1.value3;
return 0;
}
what is it called? when i delete the argument on instantiation of play1, play2, play3 like play4. it will compile error but the play4 is fine. how it can be?