Windows Vista Forums

C++ Error HELP!!!!

  1. #1


    Sweetness Guest

    C++ Error HELP!!!!

    I am writing a program for class that returns a persons Birthstone,Sign and
    Season born in... after they input their Birthday and If I hard code in the
    stone it works but if I use this code:

    string Stone[13] =
    {"Invalid","Garnet","Ameythist","Bloodstone","Diamond","Emerald","Pearl","Ruby","Periodt","Sapphire","Opal","Topaz","Turquoise"};

    seeMonth = seeDate.getMonth();



    BS = Stone[seeMonth];
    I get this error:

    Unhandled exception at 0x00421cd6 in Birthday.info.exe: 0xC0000005: Access
    violation reading location 0x6679619c.

    What does it mean?
    --
    Sirena

      My System SpecsSystem Spec

  2. #2


    Family Tree Mike Guest

    RE: C++ Error HELP!!!!

    What are the declarations of seeMonth, seeDate, BS and the function getMonth()?

    I don't have c++ at home, but it sounds like getMonth is not returning a
    value between 0..12.

    "Sweetness" wrote:

    > I am writing a program for class that returns a persons Birthstone,Sign and
    > Season born in... after they input their Birthday and If I hard code in the
    > stone it works but if I use this code:
    >
    > string Stone[13] =
    > {"Invalid","Garnet","Ameythist","Bloodstone","Diamond","Emerald","Pearl","Ruby","Periodt","Sapphire","Opal","Topaz","Turquoise"};
    >
    > seeMonth = seeDate.getMonth();
    >
    > BS = Stone[seeMonth];
    > I get this error:
    >
    > Unhandled exception at 0x00421cd6 in Birthday.info.exe: 0xC0000005: Access
    > violation reading location 0x6679619c.
    >
    > What does it mean?
    > --
    > Sirena

      My System SpecsSystem Spec

  3. #3


    Sweetness Guest

    RE: C++ Error HELP!!!!

    Goodness...
    I've writen a class for Date.... which returns Month Day and Year. It is
    Pulled into my class Birthdate, which holds this code that contains the
    error.
    --
    Sirena


    "Family Tree Mike" wrote:

    > What are the declarations of seeMonth, seeDate, BS and the function getMonth()?
    >
    > I don't have c++ at home, but it sounds like getMonth is not returning a
    > value between 0..12.
    >
    > "Sweetness" wrote:
    >

    > > I am writing a program for class that returns a persons Birthstone,Sign and
    > > Season born in... after they input their Birthday and If I hard code in the
    > > stone it works but if I use this code:
    > >
    > > string Stone[13] =
    > > {"Invalid","Garnet","Ameythist","Bloodstone","Diamond","Emerald","Pearl","Ruby","Periodt","Sapphire","Opal","Topaz","Turquoise"};
    > >
    > > seeMonth = seeDate.getMonth();
    > >
    > > BS = Stone[seeMonth];
    > > I get this error:
    > >
    > > Unhandled exception at 0x00421cd6 in Birthday.info.exe: 0xC0000005: Access
    > > violation reading location 0x6679619c.
    > >
    > > What does it mean?
    > > --
    > > Sirena

      My System SpecsSystem Spec

  4. #4


    Family Tree Mike Guest

    RE: C++ Error HELP!!!!

    All I was asking for was to confirm what data type all the objects
    in the code are declared.

    I would set a breakpoint at the line "BS = Stone[seeMonth];" and
    look at the value of seeMonth. The value should be 0..12.

    "Sweetness" wrote:

    > Goodness...
    > I've writen a class for Date.... which returns Month Day and Year. It is
    > Pulled into my class Birthdate, which holds this code that contains the
    > error.
    > --
    > Sirena
    >
    >
    > "Family Tree Mike" wrote:
    >

    > > What are the declarations of seeMonth, seeDate, BS and the function getMonth()?
    > >
    > > I don't have c++ at home, but it sounds like getMonth is not returning a
    > > value between 0..12.
    > >
    > > "Sweetness" wrote:
    > >

    > > > I am writing a program for class that returns a persons Birthstone,Sign and
    > > > Season born in... after they input their Birthday and If I hard code in the
    > > > stone it works but if I use this code:
    > > >
    > > > string Stone[13] =
    > > > {"Invalid","Garnet","Ameythist","Bloodstone","Diamond","Emerald","Pearl","Ruby","Periodt","Sapphire","Opal","Topaz","Turquoise"};
    > > >
    > > > seeMonth = seeDate.getMonth();
    > > >
    > > > BS = Stone[seeMonth];
    > > > I get this error:
    > > >
    > > > Unhandled exception at 0x00421cd6 in Birthday.info.exe: 0xC0000005: Access
    > > > violation reading location 0x6679619c.
    > > >
    > > > What does it mean?
    > > > --
    > > > Sirena

      My System SpecsSystem Spec

C++ Error HELP!!!!

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error when sending e-mail (error in outbox) Error ID: 0x80191002 Stefano Live Mail 1 10 Mar 2010
no,socket Error: 11003. Error Number: 0x800CC0D cant i send email name is correctly benitocuervo Vista mail 1 31 Oct 2008
Canot post to newsgroups Socket Error: 10053, Error Number: 0x800CCC0F ThatsIT.net.au Vista mail 1 09 Mar 2008
Canot post to newsgroups Socket Error: 10053, Error Number: 0x800CCC0F ThatsIT.net.au Vista General 0 09 Mar 2008
windows live mail 2008 (Build 12.0.1606) error report error gbp007 Windows Live 13 24 Jan 2008