An example with lots of errors

Discussion in 'C++' started by kimiraikkonen, Jul 11, 2007.

  1. 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
    kimiraikkonen, Jul 11, 2007
    #1
    1. Advertising

  2. * 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.


    --
    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?
    Alf P. Steinbach, Jul 11, 2007
    #2
    1. Advertising

  3. On Jul 11, 11:17 pm, "Alf P. Steinbach" <> wrote:
    > * 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.
    >
    > --
    > 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?
    kimiraikkonen, Jul 11, 2007
    #3
  4. On 2007-07-11 22:17, Alf P. Steinbach wrote:
    > * 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"???


    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.
    >
    >
    >> 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.


    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.

    --
    Erik Wikström
    =?ISO-8859-1?Q?Erik_Wikstr=F6m?=, Jul 11, 2007
    #4
  5. kimiraikkonen wrote:

    > On Jul 11, 11:17 pm, "Alf P. Steinbach" <> wrote:
    >> * 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.

    >
    > 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.

    --
    rbh
    Robert Bauck Hamar, Jul 11, 2007
    #5
  6. 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.
    kimiraikkonen, Jul 11, 2007
    #6
  7. * kimiraikkonen:
    > On Jul 11, 11:17 pm, "Alf P. Steinbach" <> wrote:
    >> * 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.
    >>
    >> --
    >> 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?


    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

    --
    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?
    Alf P. Steinbach, Jul 11, 2007
    #7
  8. On 2007-07-11 23:39, kimiraikkonen wrote:
    > 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.

    --
    Erik Wikström
    =?ISO-8859-1?Q?Erik_Wikstr=F6m?=, Jul 12, 2007
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. brad
    Replies:
    9
    Views:
    354
    Bruno Desthuilliers
    Jun 19, 2008
  2. Randys

    Lots of fake Compile errors SP1 C#

    Randys, Sep 22, 2008, in forum: ASP .Net
    Replies:
    2
    Views:
    309
    Randys
    Sep 23, 2008
  3. Lawrence D'Oliveiro

    JLS 3/e -- Lots Of Errors

    Lawrence D'Oliveiro, Feb 4, 2011, in forum: Java
    Replies:
    75
    Views:
    1,321
    Arne Vajhøj
    Feb 8, 2011
  4. Replies:
    0
    Views:
    102
  5. coolneo
    Replies:
    9
    Views:
    178
    coolneo
    Jan 30, 2007
Loading...

Share This Page