VBA vs C++

B

Brad kennedy

Giday Group

I am a regular user of VBA in Excel. I design small user friendly
workbooks for users. It is the only language I know. My 14 year old
son wants to learn C++. His aim is to get into game design. I am
unable to advise him on this matter.

I was wondering if any of you guys are competent in both and can offer
some advice on where to begin?

Do you think if I teach him what I know about VBA it will help him or
would be a waste of time.

Where would be the best place for him to start?

He has done one days work experience at a game studio and has
tutorials for level design in Unreal tournament.

regards

Brad

Australia
 
B

Bernie Deitrick

Brad,

Some programming logic will carryover between VBA and C++, but little else.
Efficient design in C++ uses pointers, data structures, and I forget what
other nasties that are hard to understand. I will say that I wrote a very
simple program in C++ that was about 1400 lines, and replaced it with what
was basically a one liner in VB (all else was done by setting the properties
of the objects in VB). I'm sure that was an extreme case, but it does
illustrate the differences. In C++, you have to do everything - in VB and
VBA, a lot is already included in the properties that you set at design
time.

HTH,
Bernie
MS Excel MVP
 
H

Harlan Grove

Bernie Deitrick said:
Some programming logic will carryover between VBA and C++, but little else.
Efficient design in C++ uses pointers, data structures, and I forget what
other nasties that are hard to understand. . . .

No C++ programmer in his/her right mind uses pointers. They use references.
If you don't know the difference, perhaps you should consider remaining
silent rather than spewing misinformation.

All sensible languages use data structures, so that's an empty point. C++
includes C's struct and union derived types (like VBA 'Type' constructs),
but the real OO power of C++ comes from name spaces, classes and templates.
. . . In C++, you have to do everything - in VB and VBA, a lot is already
included in the properties that you set at design time.

However that's irrelevant to game design, which requires as near realtime
performance as possible. In C++, while you may need to build most of the
infrastructure first, it becomes no more cumbersome than VB[A] once that
infrastructure is complete. And unless I've completely missed something in
VB, C++ threads provide UI functionality simply not available in VB.

In short, game development is much more like systems programming than
application programming due the the need to work much more closely with
harware interfaces. Aside from the basics, there's very little in common
between C++ and VB[A].

That said, there are a few open source RPG and FPS games, so the OP's son
could download the source code and study it. As for getting a development
system, FAR FAR cheaper to download a decent Linux distribution (SuSE or
Mandrake, maybe Gentoo, but *not* Red Hat Fedora for a first Linux system)
and choose the developer system at install time. That'll provide a complete
set of GNU C/C++ development tools including a symbolic debugger (that works
nothing like Visual Studio or VBE). Easy enough to find Windows cross
compilers to allow development of Windows binaries under Linux.

If the OP wants to stick with Windows, the MinGW C/C++ compiler suite and
bunutils package would be a decent first choice of systems.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top