2008-10-12 18:41:06 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int foo();
|
|
|
|
class A
|
|
|
|
{
|
|
|
|
public:
|
2016-07-09 11:21:54 +02:00
|
|
|
A() { this->i = foo(); }
|
2008-10-12 18:41:06 +02:00
|
|
|
int i;
|
|
|
|
};
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
A a;
|
2016-07-09 11:21:54 +02:00
|
|
|
if (a.i == 21) {
|
2008-10-12 18:41:06 +02:00
|
|
|
printf("passed foo is 21\n");
|
|
|
|
return 0;
|
2016-07-09 11:21:54 +02:00
|
|
|
}
|
2008-10-12 18:41:06 +02:00
|
|
|
printf("Failed foo is not 21\n");
|
|
|
|
return -1;
|
|
|
|
}
|