Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > C++ Programming
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old October 23rd, 2003, 09:21 AM
Registered User
Join Date: Oct 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Trying to learn C++ as cheaply as possible:

I already know some java. I'm currently up to interfaces and annonomous classes on my course and I've done some stuff on GUIs even though I'm still figuring some things out. Anyway, it seems like a lot of jobs in programming need C++ and I also wanted to convert a program I made in java to C++ so I could make it an exe. With java, I'm used to being able to look up the classes, methods, packages etc on pages like this (http://java.sun.com/j2se/1.4.2/docs/...ng/String.html). I was wondering if there's similar web pages for C++ on an official website or something. (I already ran a search and the closest I've found is Cprogramming.com) I have a book on some of the major differences between C++ and java, but it doesn't say how to compile or what classes there for GUIs or what packages they're in.

Reply With Quote
  #2 (permalink)  
Old October 24th, 2003, 06:05 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post

As no-one else has replied to this I'll give it a bash although its quite a few years since I did any C++.

You have to understand a major difference between C++ and Java, namely there is no virtual machine for C++, so that means the GUI part depends entirely on the operating system. You will not be able to write a C++ GUI program which runs on, say, both Windows and Unix like you can (in principle) with Java.

If you want details of what's available built-in to the Windows platform, http://msdn.microsoft.com/library/default.asp is the place to start. Take a look at the Platform SDK part of the Windows Development section.

Some compilers such as Microsoft's Visual C++ have their own classes to handle GUI (e.g. MFC - Microsoft Foundation Classes). But if you want to do it on the cheap I doubt you'll be interested in Visual C++.

I'm afraid I can't help you if you want to know about Unix, I've never written a single line of C for Unix. Although, you could do worse than use the GNU C compiler (GCC) which is freely available for Win and Unix and is apparently one the finest compilers available.

Reply With Quote
  #3 (permalink)  
Old October 24th, 2003, 01:09 PM
Registered User
Join Date: Sep 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts

quote:You have to understand a major difference between C++ and Java, namely there is no virtual machine for C++, so that means the GUI part depends entirely on the operating system.
Well that's partly true. C++ doesn't know anything about colors, mice, windows, keyboards, networks, scanners, printers, file systems, databases, or anything like that. Consequently, its standard library doesn't have anything that deals with the specifics of any of these devices or subsystems.

There is, however, a wealth of third party software written for use with C++ that can and does deal with specific hardware or software interfaces for systems, and some of it is quite cross-platform. There are cross-platform windowing libraries, network libraries, database systems, and so on.

The downside to this is that, unlike Java where much of this is contained in the Java standard library, these libraries are all published and maintained by different groups or people and with different levels of documentation and support. Some libraries you may have to pay for.

To learn C++, however, you do not need to know any of these third party libraries. You don't need to know MFC or how to interface with Oracle in order to get a good understanding of the C++ language. Fortunately, there are good resources available for learning the C++ language.

In my opinion, it is best to pick a book and set of resources that focus on "pure" C++. That is, C++ that uses only its standard core language features and libraries. This should help you avoid developing any unnecessary dependencies on certain third party products or any non-portable programming habits.

You will probably benefit greatly from the book "Accelerated C++" by Andrew Koenig and Barbara Moo. It is targeted to teach pure C++ to someone who already has programming experience. You might also like the book "The C++ Programming Language" by Bjarne Stroustrup. This book is currently in its third edition, and is widely regarded as the authoritative source and reference on the C++ language (apart maybe from the C++ standard, but that's a dry read)

Once you have a good understanding of C++, it's pretty easy to pick up and use any of the third party libraries for doing everything else.

Reply With Quote

Similar Threads
Thread Thread Starter Forum Replies Last Post
Best way to learn C# ? DonLennon C# 9 March 27th, 2008 09:00 PM
What should I learn first gcjetfan Intro Programming 2 March 14th, 2008 10:38 AM
how to learn j2ee? yulin11 J2EE 1 December 26th, 2007 08:55 AM
how to learn C# and API samrath C# 2 July 9th, 2007 04:32 AM
i`m a NOOB! but i want to learn :D LIMONADA VBScript 2 April 25th, 2006 11:19 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.