Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: How long would it take? (Read 10936 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How long would it take?

Reply #25
Awesome, I have got myself a SAMS "Learn C++ In 24 Hours" book.

To compile for foo will I need a premium version of vs 2005 or can I use codeblocks and the vs2005 EXPRESS compiler?

Thanks everyone!


Edit so I'm starting out with using Code::blocks and MinGW5.

However, outputting a simple program like "Hello World" (first tut ze book), makes an exe that is 500kb. Any ideas why this is? Surely it should be <50kb


MingGW does this, even with optimisation it still produces larger executables than VC++. Of course is not an issue, when you want to distribute something, just compile with vc++.


Cool, I'm just getting towards the end of hour 5 (most of the stuff at the moment are things I'm familiar with, so I can breeze through).


Out of interest, this book doesn't appear to cover making a UI. Say I wanted to make a UI based program, how the hell would that happen? Do I _need_ VSC++?


No, definately not. You just need to use the windows API. Set up a Message Pump and call CreateWindow to get started 

This article shows you how to register a window class and create a window. Have a look at it once you've mastered basic C/C++.

http://msdn.microsoft.com/library/default....usingwindow.asp

To make things easier, stuff like menus can be created in a resource editor, you just pass its resource name to the windows functions. In that example, the line:
wcx.lpszMenuName =  "MainMenu";

is specifying a pre-made menu in a resource file.

However VC++ express does not come with a resource editor. There are a few free ones around but AFAIK they are pretty crap.

How long would it take?

Reply #26
Quote
What I'd like to learn to do is develop 3D applications, make HL2 mods, and foobar components. (and possibly some network tools like a simple chat, file sending things, other general things).


I think the best way would be to set some kind of a roadmap for yourself. It could look like this:

a) Chose a Tutorial that focuses on the basics, learn about the syntax, get an understanding of pointers and how to use them etc. There are some nice tutorials in the posts above.

b) Get some insight into programming for Windows. It could come in handy to know how to work with the MSDN and use the Windows API - you will need that for foobar stuff and if you want to make your own Windows Applications (say a simple window that shows your 3D-Stuff). For HL2 things and for 3D-Programming you will now probably have to read about DirectX programming (just guessing, this is something I have no experience with).

c) write something and use your gained knowledge

b) and c) can of course be combined, it's easier to learn something when you are programming something for yourself and not always just following tutorials because you have a set goal in your mind.


Good points, but i'd also add "choose a single project that you are really, really into"

I'm a vb programmer by trade but have used and still use occasionally C,SQL,assembler,pascal and loads of others. Most languages are similar and easy to pick up if you have experience of another.

VB and C++ however are at very opposite ends of the spectrum:

VB is great for getting something 'on screen' but fails at the deeper and more complicated work. Most of the standard custom controls for example (until .net) are specially wrapped versions of the Windows ones and because of this you tradeoff a lot of functionality for immediate gratification. VB is fantastic for database apps as an example because their performance and functionality is generally limited by other components and VB is fine for simple frontends, but I wouldn't use it to extend other software. There's the runtime dependencies for a start and it's too gui-centric to ever be anything other than a kludge.

C++ however is the other way - getting something working on screen is a lot more work. Yes, you can use the many frameworks to speed up development, but then you've taken a choice that may constrain you further down the road. If you're not fully committed you'll likely give up development at the first 'insurmountable' problem you find, and there will be many

Choose as simple a 'real' foobar project as you can find that does something similar to what you're going to write. Strip it down, remove as much stuff specific to that project as you can and get down to the shell of it. Compile regularly and learn from what breaks. You'll spend less time trying to get your window handler working and more time writing useful stuff that's specific to your app.

Good luck! I'm currently pulling apart some mythtv code with a view to writing a MPD frontend for it. It's a good choice for learning as the MPD specific stuff is really just a dead simple telnet style protocol and i'll reuse the frontend drawing code of whatever code I choose to ripoff erm I mean reuse

 

How long would it take?

Reply #27
Yeah MPD is basically controlled with simple command line commands, iirc. (or was that MPC? Jeez the whole client/server media thing got to my head in the end).

The most annoying and constricting thing is at the moment, that the college/exam boards have decided that they're not going to emploly people to mark our projects written in other languages, so the 6th form college I am at is making us study fucking VB, which I am getting really annoyed with. It just feels so limited. A little sidetracked but are there any good tutorials that cover an introduction to the windows api (and working with "apis" etc) for vb?

Thanks <3
hi