#include <iostream>
using namespace std;
class Foo {
public :
static int count;
Foo( ) {
}
Foo( int i) {
std:: cout << "I am object no: " << count << std:: endl ;
count++ ;
}
} ;
int Foo:: count = 0 ;
int main( ) {
// your code goes here
std:: size_t number;
std:: cout << "Enter the number of accounts you want to create: " ;
//std::cin >> number;
Foo* f[ number] ;
for ( unsigned i= 0 ; ( i < 10 ) ; i++ )
{
f[ i] = new Foo( i) ;
}
return 0 ;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY2xhc3MgRm9vIHsKCQkKCXB1YmxpYzoKCQlzdGF0aWMgaW50IGNvdW50OyAKCQlGb28oKSB7CgkJCgkJfQoJCQoJCUZvbyhpbnQgaSkgewoJCQlzdGQ6OmNvdXQgPDwgIkkgYW0gb2JqZWN0IG5vOiAiIDw8IGNvdW50IDw8IHN0ZDo6ZW5kbDsKCQkJY291bnQrKzsgCQoJCX0KCQkKCQp9OwkKCmludCBGb286OmNvdW50ID0gMDsgCgppbnQgbWFpbigpIHsKCS8vIHlvdXIgY29kZSBnb2VzIGhlcmUKCXN0ZDo6c2l6ZV90IG51bWJlcjsgCglzdGQ6OmNvdXQgPDwgIkVudGVyIHRoZSBudW1iZXIgb2YgYWNjb3VudHMgeW91IHdhbnQgdG8gY3JlYXRlOiAiOwoJLy9zdGQ6OmNpbiA+PiBudW1iZXI7IAoJCglGb28qIGZbbnVtYmVyXTsKCQoJZm9yKHVuc2lnbmVkIGk9MDsgKGkgPCAxMCk7IGkrKykKCXsKCQlmW2ldID0gbmV3IEZvbyhpKTsKCX0KCXJldHVybiAwOwp9