polymorphism in C #32587 (12/16/2012 12:29:29 AM) comp.lang.c I found a code to do polymorphism in C (taken from a book):
struct Class {
size_t size;
void * (* ctor) (void * self, va_list * app);
void * (* dtor) (void * self);
void * (* clone) (con... Jack
struct arguments to function480 (12/14/2012 7:09:47 AM) comp.lang.c In the following code:
struct A
{
char* name;
int age;
}
struct B1
{
struct A a;
char * type;
int num;
}
struct B2
{
struct A aa;
double price;
int num;
}
void... Jack
A cast question3100 (12/10/2012 7:30:43 AM) comp.lang.c In the following code (taken from a book):
struct Class {
size_t size;
void * (* ctor) (void * self, va_list * app);
void * (* dtor) (void * self);
void * (* clone) (const void * self);
i... Jack
Java thread8190 (9/11/2011 4:03:24 AM) comp.lang.java.programmer For Java thread, how to ensure that wait() does not miss notify()? Otherwise the thread will hang and can not shut down. Thanks. Jack ... Jack
Spring/hibernate and JDBC36207 (7/9/2011 9:56:52 PM) comp.lang.java.programmer With spring and hibernate so popular now, is there anybody still only use JDBC to write database application code? Thanks. ... Jack
How to get the oldest timestamps?5614 (5/24/2010 11:21:12 PM) comp.unix.shell I have a file containing timestamps from the date command, for
example:
Thu May 13 13:51:36 PDT 2010
Wed May 12 11:51:36 PDT 2010
Mon Fed 10 10:08:20 PDT 2009
How to get the oldest timestamp? If I use a ... Jack
Why it does not work?4400 (5/11/2010 3:12:23 AM) comp.unix.shell In my script, I do this:
a=100
b='expr $a \* 2'
The error is:
expr $a \* 2: integer expression expected
Thanks.
... Jack
Database development59369 (4/25/2010 5:03:43 AM) comp.lang.java.programmer When I work on database development projects, I use JDBC and SQL. Many
people use hibernate/spring. Can somebody explain the pros and cons of
using JDBC and SQL vs using hibernate/spring on database
developm... Jack
static object/variable4188 (1/23/2008 7:44:59 AM) comp.lang.c++ Is it possible to destruct a static object or variable before the program terminate? Thanks ... junw2000(221)
ofstream #23209 (1/25/2008 6:55:22 AM) comp.lang.c++ How to assign a default arguement to ofstream? For example: void My_Function( int a, int b = 0, ofstream outFile ) { //Boby of the code } The arguement b has a default value 0. How to assign a default ar... junw2000(221)
catch exception7191 (8/22/2008 9:15:13 PM) comp.lang.c++ class A { public: A() { try { p = new int; //Other lines that may throw exception. } catch(...) { delete p; ... junw2000(221)
Default argument6182 (1/16/2009 7:54:23 AM) comp.lang.c++ In the function below: void func1( int a = 10 ) { //function body } The variable a is a default argument. For the function below: void func2( MyClass obj ) //MyClass is a defined class. { //function body... junw2000(221)
Java crash7188 (2/24/2010 7:37:55 AM) comp.lang.java.programmer I have java program that keeps crashing. Below are the errors in log: --------------- T H R E A D --------------- Current thread (0x10924400): JavaThread "Thread-1" [_thread_in_native, id=2220, stack(0x10b... junw2000(221)
Java thread8190 (9/11/2011 4:03:24 AM) comp.lang.java.programmer For Java thread, how to ensure that wait() does not miss notify()? Otherwise the thread will hang and can not shut down. Thanks. Jack ... junw2000(221)
struct arguments to function480 (12/14/2012 7:09:47 AM) comp.lang.c In the following code:
struct A
{
char* name;
int age;
}
struct B1
{
struct A a;
char * type;
int num;
}
struct B2
{
struct A aa;
double price;
int num;
}
void... junw2000(221)
polymorphism in C #32587 (12/16/2012 12:29:29 AM) comp.lang.c I found a code to do polymorphism in C (taken from a book):
struct Class {
size_t size;
void * (* ctor) (void * self, va_list * app);
void * (* dtor) (void * self);
void * (* clone) (con... junw2000(221)