An example with lots of errors

K

kimiraikkonen

Hello dear experts,
New to programming and while surfing the net to learn some examples,
this C++ (maybe C, but source file name's extension is "cpp") game
sample gave a lot of errors with the latest Dev C++ compiler. Maybe
there are headers which do not exist or something wrong about
"declerations"???

Where's the fault and possible reasons? With seeing that kind of
errors even at the beginning of C++ programming, i become very
pessimistic.

Link of example:
http://www.programmersheaven.com/d/click.aspx?ID=F53718

And here is the error screenshot reported by Dev C++ :
http://img48.imageshack.us/img48/2929/gameexamplevq7.jpg
 
A

Alf P. Steinbach

* kimiraikkonen:
Hello dear experts,
New to programming and while surfing the net to learn some examples,
this C++ (maybe C, but source file name's extension is "cpp") game
sample gave a lot of errors with the latest Dev C++ compiler. Maybe
there are headers which do not exist or something wrong about
"declerations"???

See the compiler's error messages.

Where's the fault and possible reasons? With seeing that kind of
errors even at the beginning of C++ programming, i become very
pessimistic.

Link of example:
http://www.programmersheaven.com/d/click.aspx?ID=F53718

This is a text only group. Don't push zip files on us.

And here is the error screenshot reported by Dev C++ :
http://img48.imageshack.us/img48/2929/gameexamplevq7.jpg

This is a text only group. Don't push jpeg files on us. Learn how to
use your compiler from a command interpreter, capture the output, or,
find equivalent functionality in your chosen IDE.
 
K

kimiraikkonen

* kimiraikkonen:


See the compiler's error messages.



This is a text only group. Don't push zip files on us.


This is a text only group. Don't push jpeg files on us. Learn how to
use your compiler from a command interpreter, capture the output, or,
find equivalent functionality in your chosen IDE.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

The text-code based message have got too long to post here, as i
thought to be kind by giving the exact zip link if you appreciate.

Can't you give some help about possible reasons or faults just by
looking at the screenshot or the zip contained source code?
 
?

=?ISO-8859-1?Q?Erik_Wikstr=F6m?=

* kimiraikkonen:

If you want to learn C++ don't go grabbing the first stuff you find from
the net and look at that. It will not be very useful since a) it's
probably badly written, and b) probably uses non-standard header-files
and other dependencies which will make it harder both to compile and
understand. Get yourself a good book instead and look at the examples
and exercises there, you'll gain more from it.
See the compiler's error messages.



This is a text only group. Don't push zip files on us.



This is a text only group. Don't push jpeg files on us.

A bit hash I think, all he did was post URLs, if you don't want to open
them, fine, but don't act as if he attached the stuff.
 
R

Robert Bauck Hamar

kimiraikkonen said:
The text-code based message have got too long to post here, as i
thought to be kind by giving the exact zip link if you appreciate.

Can't you give some help about possible reasons or faults just by
looking at the screenshot or the zip contained source code?

The code is not written in standard C++, the topic of this NG. It is not
written in C either. It seems to be written in an old dialect of C or C++,
relying on a bunch of nonstandard libraries, and to compile it, you
probably need some old compiler, for which this code was written. I suggest
you give it up. Surely, the game isn't that great, and it's a terrible
example to learn C++ from.
 
K

kimiraikkonen

Erik and Robert,
Thanks for the comments. However, on net there are a lot of
"suspicous" tutorials or code examples about C++ as you've seen.

So, which resource or which book is the most necessary to begin
learning C++ step by step?

I appreciate to your directions and experiences from now.

Regards.
 
A

Alf P. Steinbach

* kimiraikkonen:
The text-code based message have got too long to post here, as i
thought to be kind by giving the exact zip link if you appreciate.

Can't you give some help about possible reasons or faults just by
looking at the screenshot or the zip contained source code?

First step of learning to program is to learn how to use the tools.
Without being able to use the tools, you'll get nowhere very fast, and
then stuck. I told you to look at the error messages, and the first one
says, well, what does it say?

Start there if you want the example to compile.

But as others have remarked, it's a bad example, and second, or rather
first, you need to be able to use your tools.

Also, please don't quote signatures.

See the FAQ, both for posting guidelines, help about learning, and help
with other common questions.

Hth.,

- Alf
 
?

=?ISO-8859-1?Q?Erik_Wikstr=F6m?=

Erik and Robert,
Thanks for the comments. However, on net there are a lot of
"suspicous" tutorials or code examples about C++ as you've seen.

So, which resource or which book is the most necessary to begin
learning C++ step by step?

Accelerated C++ by Koenig and Moo is often recommended, also there's the
book Thinking in C++ by Bruce Eckel (hope I spelled that right) which is
available for free on his site (google and you shall find). Also I like
www.cplusplus.com and www.cppreference.com as references though there
are probably better around if you are willing to pay.
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top