Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - C++ Error HELP!!!!

Reply
 
Old 05-17-2008   #1 (permalink)
Sweetness


 
 

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
Old 05-18-2008   #2 (permalink)
Family Tree Mike


 
 

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:
Quote:

> 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
Old 05-18-2008   #3 (permalink)
Sweetness


 
 

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:
Quote:

> 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:
>
Quote:

> > 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
Old 05-19-2008   #4 (permalink)
Family Tree Mike


 
 

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:
Quote:

> 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:
>
Quote:

> > 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:
> >
Quote:

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

Thread Tools


Similar Threads
Thread Forum
Help with windows vista mail, Socket Error: 10053, Error Number: 0x800CCC0F Vista mail
no,socket Error: 11003. Error Number: 0x800CC0D cant i send email name is correctly Vista mail
Canot post to newsgroups Socket Error: 10053, Error Number: 0x800CCC0F Vista mail
Canot post to newsgroups Socket Error: 10053, Error Number: 0x800CCC0F Vista General
windows live mail 2008 (Build 12.0.1606) error report error Windows Live


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46