Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > Class extension...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 43918 of 48044
Post > Topic >>

Class extension to C

by "Jon Slaughter" <Jon_Slaughter@[EMAIL PROTECTED] > Mar 15, 2008 at 12:24 AM

I want to use cl***** in some embedded C dev to make the code more
organized. Is there any post processor that can do this? If not anyone
know
of a very simple way to go about doing this? (some type of free C/C++ like
processor that I can modify without to much trouble)

Essenitally it would translate a class into compatible C code, e.g.,


class X
{

    int i;
    void func(int c);
};

....
X.i = 3;
X.func(3);


into


int iX;
void funcX(int c);
....

iX = 3;
funX(3);
-------

I don't need polymorphism, inheritence or encapsulation really(although it
would be nice) or even need to create objects from the class(in a sense
the
cl***** are global static structs).

I just want to be able to write a bit more logical code in C with a little
bit of encapsultion(or really just organization).

I imagine though one could add the ability to use objects by just
specializing the class name a bit but it would require a little more work
to
setup the class.

Unfortunately theres no C++ compiler for the device I'm interested in and
I
don't want to write one.

Any ideas?

Thanks,
Jon
 




 2 Posts in Topic:
Class extension to C
"Jon Slaughter"  2008-03-15 00:24:15 
Re: Class extension to C
"EventHelix.com"  2008-03-16 04:14:50 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Oct 15 22:42:28 CDT 2008.