Java to C++: Object class

Programming, for all ages and all languages.
Locked
Rui
Posts: 11
Joined: Sun Jan 25, 2009 6:53 am
Location: Portugal

Java to C++: Object class

Post by Rui »

I'm currently working with C++, and my background is Java, and some features from Java don't match in C++. For example, the Object class from Java which doesn't exist in C++.

If I have for example the following method in Java and want to port it to C++, what is the best approach?

Code: Select all

void Algorithm::setInputParameter(std::string name, Object object) { ..... }
Instead of Object use for example pointers to void? Templates?

Thanks
User avatar
gravaera
Member
Member
Posts: 737
Joined: Tue Jun 02, 2009 4:35 pm
Location: Supporting the cause: Use \tabs to indent code. NOT \x20 spaces.

Re: Java to C++: Object class

Post by gravaera »

Hi,

http://stackoverflow.com/
http://cplusplus.com/
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.horstmann.com/ccj2/ccjapp3.html
http://lmgtfy.com/?q=Introduction+to+C% ... rogramming

This forum is not a language help. There is a minimum par which you fail to meet. Please leave and learn how to program in a suitable language before returning.
17:56 < sortie> Paging is called paging because you need to draw it on pages in your notebook to succeed at it.
Rui
Posts: 11
Joined: Sun Jan 25, 2009 6:53 am
Location: Portugal

Re: Java to C++: Object class

Post by Rui »

Sorry, my bad... I read "General Programming.. Programming, for all ages and all languages."

My mistake then..
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Re: Java to C++: Object class

Post by JamesM »

Rui wrote:Sorry, my bad... I read "General Programming.. Programming, for all ages and all languages."

My mistake then..
... which is a subforum of "Osdev.org - the place to start for Operating System Developers". What it says on the tin.

There are better sites than this for your question.
Locked