2007-02-20 17:35:21 +03:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int foo();
|
|
|
|
class A
|
|
|
|
{
|
|
|
|
public:
|
2016-05-16 17:34:04 +03:00
|
|
|
A() { this->i = foo(); }
|
2007-02-20 17:35:21 +03:00
|
|
|
int i;
|
|
|
|
};
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
A a;
|
2016-05-16 17:34:04 +03:00
|
|
|
if (a.i == 21) {
|
2007-02-20 17:35:21 +03:00
|
|
|
printf("passed foo is 21\n");
|
|
|
|
return 0;
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2007-02-20 17:35:21 +03:00
|
|
|
printf("Failed foo is not 21\n");
|
|
|
|
return -1;
|
|
|
|
}
|