0

I'm mainly a java programmer and I'm getting started with C++. I wonder if you could help me finding a java-like object-oriented library.

Thanks and regards

Mikhas
  • 851
  • 1
  • 12
  • 31
  • 2
    [Qt](http://developer.qt.nokia.com/doc/qt-4.8/) – Mat Feb 08 '12 at 11:31
  • library for what? c++ is object-oriented. – Sam Felix Feb 08 '12 at 11:31
  • I wonder if there's a commons functions library which "feels like" java standard library. I know there's std but it's not that friendly for a c++ noob like me. – Mikhas Feb 08 '12 at 11:38
  • 2
    Java and object-orientation have remarkably little to do with each other. – Puppy Feb 08 '12 at 11:38
  • Well, C++ is **almost** object oriented. Though question is unclear. Do you need a GUI toolkit? Or something else? – Aleksandr Kravets Feb 08 '12 at 11:39
  • 2
    @Mikhas: If you're learning C++, pick up [an introductory C++ book](http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list) and read through it. C++ is nothing like Java. If you're learning C++, learn C++. It's a real tautology but it needs to be said. Learning C++ like it's any other language will lead to nothing but frustration (and vice versa, although it's worse with C++ since C++ doesn't hold your hand). – In silico Feb 08 '12 at 11:41

5 Answers5

2

I would rather suggest you to not use java-like libraries. If you want to learn C++ first dig into the standard library. Try to understand the concepts used there (iterator, allocators, templates, ...)

I found this a good source of information related to the STL.

C++ as language is far more complex than java so the learning curve is straight, but after you got the basics you can write fancier, cleaner and achieve more with less code.

Well designed libraries

  • Boost Multiple purpose (Networking, Threading, Smart Pointers, ...)
  • QT UI library, multiple purpose

I learned C# before I had to write C++, so I understand your issue. Try not to write everything object oriented. You just don't in C++.

wilhelmtell
  • 57,473
  • 20
  • 96
  • 131
Mythli
  • 5,995
  • 2
  • 24
  • 31
1

My advice would be to get used to the C++ languages and the standard library. This is how you will learn C++.

Nikko
  • 4,182
  • 1
  • 26
  • 44
1
  • Ice for communications.
  • Multipurpose Boost library.
Tio Pepe
  • 3,071
  • 1
  • 17
  • 22
  • 1
    An alternative to Ice (which is CORBA based and non-free for non GPL projects) is the `ASIO` library. There is a `boost::ASIO` as well. Stick with boost until you need something that boost will not do well enough (not a lot), as it is very well documented, consistently written, and often very close to next-gen C++ features, so you end up with (almost) future-proof code. – Dennis Feb 08 '12 at 11:50
0

I don't know if there is a good answer to your question, unfortunately. But if you like you could always interface from Java to C using JNI.

Jonas Byström
  • 25,316
  • 23
  • 100
  • 147
0

My advice: write a 10-20 console applications in pure С++. Then try to use templates. Then communication through network. And then, IF you feel comfortable with syntax and commonly used libraries like STL and BOOST, you can try GUI toolkits like wxWidgets, QT, GTK. Trying to write GUI applications from the begining seems to me a bad practice.

Aleksandr Kravets
  • 5,750
  • 7
  • 53
  • 72