![]() |
|
#1
|
|||
|
|||
Small help with this build error!!I keep getting this build error saying "stack around the variable 'date' is corrupted"...please help me so i can continue writing my program for class...thanks????
CPP / C++ / C Code:
|
|
#2
|
||||
|
||||
|
Hi Krc784. What compiler/OS are you using? I have never seen an error like that before and I can't find anything "build-wise" wrong with your program. This sounds like a system error or something. Do you have another computer you can try this on? Have you rebooted your computer and tried to compile again?
Program wise, what are you trying to get the user to put in for your date? I am just curios as to why this is an integer array.... Sorry I can't be of more help. __________________
The best damn Sports Blog period. |
|
#3
|
|||
|
|||
|
I have an idea about what's wrong. When you first declare date[8], it's an array from 0 through 7, stopping before 8. Thus, you're declaring an array with 8 elements, but no 8th element. So, when you say cin>>date[8], you're referring to an integer element that is non-existent. Another thing is that if you want to read in a name string, with more than one character, you want to declare a char array or pointer, and read into that. Like this:
CPP / C++ / C Code:
|
|
#4
|
|||
|
|||
ThanksQuote:
Well i just saw that date thing when i sent it and i am going to fix it shortly...thats just the beginning of my program and i was having a few problems...but thanks a lot for yalls help and will be asking some more questions soon probably |
Recent GIDBlog
Writing a book by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Tutorial] GUI programming with FLTK | dsmith | FLTK Forum | 10 | 03-Oct-2005 15:41 |
| Operator Overloading: << | aaroncohn | C++ Forum | 36 | 07-Dec-2004 19:22 |
| link error? | pablowablo | C++ Forum | 14 | 19-Jun-2004 10:00 |
| OpenGL always reports error | mvt | OpenGL Programming | 2 | 04-Jun-2004 06:42 |
| Visual C++ 6 Compiler error | vip3r | C++ Forum | 2 | 13-Apr-2004 14:34 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The