Beyond C++ console program..

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2005
Posts: 42
Reputation: j1979c is an unknown quantity at this point 
Solved Threads: 0
j1979c's Avatar
j1979c j1979c is offline Offline
Light Poster

Beyond C++ console program..

 
0
  #1
Dec 5th, 2005
This is an ongoing question going through my head....

I've been doing C++ programming for about 4 months now. Been using Deitel's C++ How to program book. Learned from the basics till data structures like link lists, queues, stacks, trees..all using templates, vectors, pointers. File processing (sequential and random). Well, practically >90% of the book. Had to cram all these into my head, cause my college assigned an Advanced C++ class for me though I didn't know any C++ at all. The end result was pretty satisfying though.

The question is...where do I go after this? These are some of the things I have in mind and happen to have the books for it:
1) Windows 32 API (MS Press, Programming Windows, 5th edition)
2) Windows with MFC (MS Press, Programming Visual C++, 5th edition)
3) Adding C to my knowledge besides C++?

Been programming console programs all these while, and I am interested in making applications with GUI and eventually some simple games (2D maybe). What I know is that, it is probably easier to write apps with VB or Java....but I don't want to waste my effort that I've put into C++. Plus Java programs kinda work much slower than C++ and I've been pretty amazed with the speed of C++ though it is much harder than anything I've learned.

So...anyone out there who's gone through a similar phase got any advice for me? Hope you guyz can help me out..
Thanks in advance. :o
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Beyond C++ console program..

 
0
  #2
Dec 5th, 2005
The idea that Java is "much slower than C++" is largely a myth.
Sure, it once used to be slower, but no more.

For C++ GUIs (I guess you're working on Win32 platform only given what you already mentioned for options) there's another option to consider and that's VCL.
It's the standard GUI library for Borland C++ Builder which is included in the brand new Delphi Studio 2006 (to be released later this month) as well.
A breeze to work with, and far more consistent than is MFC.

I've used VCL extensively in the past under Delphi (how's that for commonality, one library under several languages) and it's very nice indeed.
Far easier than Windows API programming in C and C++ (which I've done) or MFC (which I've looked into but never done seriously, too convoluted).
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: Beyond C++ console program..

 
0
  #3
Dec 5th, 2005
Move to java. u'll b surprised the, sintax is the same. I think. and u can use applets so if u write programs to use 4 the web. Then i go with java.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 1,496
Reputation: WolfPack has a spectacular aura about WolfPack has a spectacular aura about WolfPack has a spectacular aura about 
Solved Threads: 104
Moderator
WolfPack's Avatar
WolfPack WolfPack is offline Offline
Mentally Challenged Mod.

Re: Beyond C++ console program..

 
0
  #4
Dec 5th, 2005
I personally believe that following the Petzold Book ( I believe that is the book number one in your list ), is the best when starting GUI programming in Windows. So before starting on MFC you better go through that. Initially the Applications will look ugly, due to the use of system fonts, but later you will get the hang on how to improve them. I think it is essential you follow this book because you can get the concept of the message loop in windows. Once you get the hold of this, following the MFC Framework or other libraries will be easier. I have not used the VCL, but when I used MFC, the main problem was the meaning of Events and their Handler Functions. Since MFC does this automaticcaly for you, you dont get the basics of it, and when it come to changing the application even slightly you will have to rely on examples of previously done programs. Once you learn to do this directly using the Win32 API and the Platform SDK Documentation, you will be better off, even if you later transfer to MFC or other GUI Library.
One thing is, the Petzold book's examples are in C. But if your knowledge on C++ is good, I dont think you will find it difficult.
After trying this you can move into game programming in Windows. More advanced reading can be found in Programming Applications for Microsoft Windows by Jeffrey Richter.
And remember we are here to help you when you crash. . So go ahead.
Reply With Quote Quick reply to this message  
Join Date: Sep 2005
Posts: 42
Reputation: j1979c is an unknown quantity at this point 
Solved Threads: 0
j1979c's Avatar
j1979c j1979c is offline Offline
Light Poster

Re: Beyond C++ console program..

 
0
  #5
Dec 5th, 2005

Hmmm....I see...

Getting kinda cleared right now. I was thinking of the same thing too...Windows Programming then to MFC and others.
Read the intro for the books that I have, where they state roughly what you need to know.

Did a basic calculator using MFC wiz before. The thing is with MFC, lots of stuff are added automatically as WolfPack has pointed out and it's kinda hard to look for something and modify.

Guess I have a go with Windows Programming first, and get used to the loop message and the hungarian notations... :lol: since it's useful for apps and games.. :eek:

Guess C won't be much of a problem. Read around a little and the main difference seems to be the output/input syntax (printf and others), there's no templates in C, and struct is used instead of classes....I think.

Well bout Java, I did find a difference in execution time...just with a Hello World program. One using an applet and the other a win32 dialog box. The win version executed a bit faster. Guess it's because with Java you need to go through another layer for intepretation, which is the JRE? If it's a big program then I might see a bigger difference I guess.

Anyway, I guess I'll use Java if I'm planning to make a program that's platform independent or solely for the web, and C++ if it's something specificaly on windows.

Well, thanks to you guyz again for giving a helping hand on my problem.. :mrgreen:
Reply With Quote Quick reply to this message  
Join Date: Nov 2005
Posts: 78
Reputation: perniciosus is an unknown quantity at this point 
Solved Threads: 4
perniciosus's Avatar
perniciosus perniciosus is offline Offline
Junior Poster in Training

Re: Beyond C++ console program..

 
0
  #6
Dec 5th, 2005
I have been stuck in your corner for quite a while, guess I ran out of time... I also recommend that first book since it will tell you what all those classes in MFC does, really...

(Saw an example here a while ago... the MFC way was
CMenu *cMenu = GetMenu() ;
CMenu *cSubMenu = cMenu->GetSub... (something)...
cSubMenu->EnableMenu( ... )

while w32 way is
HMENU hMenu = GetMenu(hWnd) ;
HMENU hSubMenu = GetSubMenu( hMenu, ... ) ;
EnableMenu( hMenu, ... ) ;

I usually get annoyed when people trie to do things for me (hate wizzards) on the other hand you never get anything done, and I have spent quite some time trying to stick objects to windows to store common data, while you get that for free with MFC...

I recently read about wtl which sounded cool, but no time so I dont know if it is really any use trying.

However the layout of Java is much smother and much better documented, you pretty much do not need any books once you get a hang of the api (well I suppose that is true with any api but I hate msdn, they got so much stuff you never find what you want, and most of the time some c# or mfc shit turns up when you search for your favorite w32 api function (grabb a copy of devcpp w32.hlp file a must)...

Oh, and what I was originally going to write... Java is really not that much slover, it has some pain in the ass startup time (especially for small HelloWorld more time is spent loading shit that actually running anything)... Try Azerus (bittorrent) there is a kick ass program with damn good responsibility (thought it uses some native port ui I gather but still)... For gui programs you mostly iddle in loops anyway so speed is probably not an issue (once the startup cost has been paid the just in time compiled code can in theory be faster than c/c++ code I've been told but that requires a damn good optimizer) damn it less ranting more working, im off...
/pern.*/i

Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. Albert Einstein
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Beyond C++ console program..

 
0
  #7
Dec 5th, 2005
What you noticed with Java was the startup time of the JVM which adds to application load time.
With an application that runs for more than a few seconds that's a trivial difference.

Of course you need to program differently as well. While the syntax may LOOK the same it isn't (Java syntax is actually closer to Object Pascal than C++) and the paradigms to use are quite different as well.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC