Actually, a Hello World type program can be written in C++ in 6 lines as
long as you are writing a text program without all the Windows Win32
junk with it. It would look like this.
std::cout << "Hello world!" << endl;
So saying you have to have 85 lines to write a Hello World program in
C++ simply isn't true. However, what you seam to be getting confused
about is the Microsoft Win32 API. That is responcible for handling
Windows, buttons, listboxes, and other Windows controls. If you count
the Win32 API and want Hello World to appear in it's own window rather
than in a text window than 85 is probably about right.
To understand the stuff you are talking about such as HINSTANCE you need
to understand the Win32 API. For example, HINSTANCE hInstance is an
object that is often used to control the current handle of the active
window. The HINSTANCE hPrevInstance is the previous instance, of the
window handle and so on. The
LPSTR lpCmdLine is a string used to process commandline parameters that might
be externally passed to the application.
x-sight interactive wrote:
> ya know? i really, really, really admire them people that can understand
> languages like c. visual basic and autoit are, what, 3 lines, if that, to
> write a simple hello world program. in c it's 85 lines, half of which i
> don't have a clue what they all mean, such as:
> HINSTANCE hInstance,
> HINSTANCE hPrevInstance,
> LPSTR lpCmdLine,
> int nShowCmd
> that hardly makes sense at all to me. those aren't even the start headers. i
> can make out little bits, like CMDLine is for command line parameters, etc,
> but most of it is half another language altogether, whereas
> #include <GUIConstants.au3>
> GUICreate("Hello World!")
> is a lot easier to understand. that's why i started with autoit. maybe i'm
> just far too impatient *grin*
> ----- Original Message -----
> From: "Thomas Ward" <[EMAIL PROTECTED]>
> To: "Gamers Discussion list" <email@example.com>
> Sent: Thursday, October 26, 2006 3:04 PM
> Subject: Re: [Audyssey] Learning VisualBasic
>> Hi Liam,
>> No change isn't always bad, and in this case I feel it was about to
>> happen sooner or later. As I understand it from what I have heard from
>> Microsoft on the subject was that many VB programmers in the field
>> bombarded MS with requests to update the language and include more
>> features present in more powerful languages such as C++ and Java. These
>> days it is unreasonable to not have a good oop design present in a
>> programming language. Especially, seeing as all the really popular
>> languages like C++, Java, Python, etc have a good oop design and are
>> more popular than non-oop languages.
>> Strictly speaking from my personal opinion and experiences when I was a
>> student in college they started us out on VB 5. Oh, I was happy as a
>> clam to be able to write something constructive, Mr. Programmer, and
>> all. However, as time went on I got in to more complex languages like
>> C++ and Java, and with them came more complex advanced concepts, new
>> design conventions, and so on. Once I learned, grasped, and understood
>> the advantages of what C++ and Java had to offer VB 5 seamed like a
>> joke, or a toy language for kids.
>> I mean I was really impressed with a simple subject like class
>> inheritence. How you could start out with a master class let's say
>> starship, put all your major variables and functions in there, and then
>> begin branching out, and create more and more specialised classes which
>> inherit the more generalised classes. With the creation of one instance
>> of an object you have access to not only the specialised class you have
>> access to variables and functions to everything that specialised class
>> was derived from. Even cooler you wrote the variables and functions
>> once, but everytime you create an instance of an object which points to
>> that class those variables are duplicated in memory for the specific use
>> of that object without having to write them over again for that item,
>> object, character, you are storing data for.
>> I guess to sum it up I learned oop design, and I couldn't live without
>> it. I found languages without oop design to be backward, outdated, and
>> really the hard way of doing things.
>> Liam Erven wrote:
>>> Jim. It's much much different. There's many major differences than in
>>> I was surprised to find out you could program in vb6 like you would in
>>> older form of basic, but the whole system is much much different now.
>>> Change isn't always bad. I'm really enjoying this new version quite a
>> Gamers mailing list .. Gamers@audyssey.org
>> To unsubscribe send E-mail to [EMAIL PROTECTED] You can
>> http://audyssey.org/mailman/listinfo/gamers_audyssey.org to make
>> any subscription changes via the web.
> Gamers mailing list .. Gamers@audyssey.org
> To unsubscribe send E-mail to [EMAIL PROTECTED] You can visit
> http://audyssey.org/mailman/listinfo/gamers_audyssey.org to make
> any subscription changes via the web.
Gamers mailing list .. Gamers@audyssey.org
To unsubscribe send E-mail to [EMAIL PROTECTED] You can visit
http://audyssey.org/mailman/listinfo/gamers_audyssey.org to make
any subscription changes via the web.