[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem : Don't create global static class (fwd)
- Date: Thu, 27 May 1999 16:46:22 -0500 (CDT)
- From: listadmin at oarcorp.com (listadmin at oarcorp.com)
- Subject: Problem : Don't create global static class (fwd)
---------- Forwarded message ----------
Date: Thu, 27 May 1999 21:10:01 +0900
From: "[iso-8859-1] ????" <king at syscon.soongsil.ac.kr>
To: owner-rtems-list at oarcorp.com
Subject: Problem : Don't create global static class
Hello I'm student in Korea
I'm testing next example.
I think that this example print next line in console.->
" I'm in class constructor
test point
I'm in class destructor "
but this example print console that-->
"
test point
I'm in class destructor "
Reason : RTEMS don't create global static class
I don't know this reason and don't solve it.
Teach Me
Thank you
example source code :
--------------------------------------------
#include <rtems.h>
#include <stdio.h>
#include <stdlib.h>
extern "C" {
extern rtems_task main_task(rtems_task_argument);
}
class A {
public:
A(void) { printf("\nI'm in class constructor \n"); };
test(void) { printf("test point \n"); }
virtual ~A() { printf("\nI'm in class destructor \n"); };
};
static A king;
void
test_main(void)
{
king.test();
}
rtems_task main_task( rtems_task_argument )
{
test_main();
exit(0);
}
-------------------------------------------------------
/*------------------------------------------
Lee Young Ki
king at syscon.soongsil.ac.kr
-------------------------------------------*/