IMO, C++ is more simple and easier to use than Java

Hey guys, I just registered and this is my first post.

I'm currently learning C++ and I found it to be very easy and comfortable than any other languages that I've worked with sofá.

I wrote my first little C++ program that converts various temperatures like Celsius Fahrenheit and Kelvin and works like a charm (but has a little bug if you write letters instead of numbers)

http://pastebin.com/SZpiahRi

C++ condenses a lot of code that Java would use. It's seems to me that a lot of stuff is logical instead of Java, there are a ton of stuff that don't make sense to me.

Stuff stuff = new Stuff(stuff); - wtf?

Look at the main function of Java compared to C++.

public static void main(String [] args) {} - Java

int main(){} - C++

A lot more simple.

So what do you think?
Last edited on
The behavior of your program is undefined because you're making calls to main() from within main().
This seems more lounge worthy.

Anyways, I don't think that your distaste for Java has much to do with Java being better than C++ (Subjective). I think it has to do with you not knowing much about C++ (?)

Example :

int main() is a definition for one of the following supported "expanded" main functions.

int main(void)

int main(int argc, char* argv[]) or int main(int argc, char** argv)

The C++ way of dynamically allocating objects on the heap, is by using the new or new[] operator(s).

Foo* foo = new Foo(/*args*/);
Last edited on
Topic archived. No new replies allowed.