Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / February 2005

Tip: Looking for answers? Try searching our database.

VBA vs C++

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brad kennedy - 09 Feb 2005 11:24 GMT
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
Bernie Deitrick - 09 Feb 2005 14:18 GMT
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

> Giday Group
>
[quoted text clipped - 19 lines]
>
> Australia
Harlan Grove - 10 Feb 2005 02:04 GMT
"Bernie Deitrick" <deitbe @ consumer dot org> wrote...
>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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.