Click here to Skip to main content
15,889,034 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
Hello all,

I have this working code in C++,but I am working on a new prototype with basically same circuit but different processor, for which I need the program in C.

I do have a API references and examples in C for the processor , but converting a program is definitely not included in it. Can any one suggest how do I represent all the public and private classes in C.

What I have tried:

I am not a pro at either C nor C++ . I was able to convet the basic protocols which are just a very small part of the code.
Posted
Updated 28-Jun-18 2:50am

Classes do not exist in C, so all the class methods must be put into inline functions. Class variables need to be declared wherever they are needed. Unless you are reasonably proficient at both languages this could be a difficult task. You could also try convert c to c - Google Search[^] as there may be some usable tools around.
 
Share this answer
 
Quote:
I am not a pro at either C nor C++ . I was able to convet the basic protocols which are just a very small part of the code
Then change processor. Seriously.

Unless it is a very trivial code, you have to be proficient in both C++ and C in order to accomplish the task.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900