dpalyca755
asked on
accessing c/c++ structs in java
Is there a way to access c structs such as enumerations in java?
Please provide examples, etc..
I have a situation where I need to keep 2 libraries definitions in synch.
There is a c header file that has for example:
enum cardsuit {
CLUBS,
DIAMONDS,
HEARTS,
SPADES
};
And I need to have the same common data definition in my Java Class to avoid dual maintenance. Is there a way to avoid have the same enumeration defined in my Java class?
Please provide examples, etc..
I have a situation where I need to keep 2 libraries definitions in synch.
There is a c header file that has for example:
enum cardsuit {
CLUBS,
DIAMONDS,
HEARTS,
SPADES
};
And I need to have the same common data definition in my Java Class to avoid dual maintenance. Is there a way to avoid have the same enumeration defined in my Java class?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.