Runtime errors but no compiletime errors
From: Cerf (dark_temp_at_hotmail.com)
Date: 04/30/04
- Next message: Cerf: "Re: Runtime errors but no compiletime errors"
- Previous message: jeffc: "Re: Newbie OOP question"
- Next in thread: Cerf: "Re: Runtime errors but no compiletime errors"
- Reply: Cerf: "Re: Runtime errors but no compiletime errors"
- Reply: Mike Wahler: "Re: Runtime errors but no compiletime errors"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 30 Apr 2004 18:35:06 GMT
Yo yo yo
When I compile my code I have 0 errors 0 warnings, but when I run it I get
an error:
Debug Error!
Program: X:\Programming\c++\tmp\Debug\tmp.exe
Damage: after Normal block (#42) at 0x00430050.
And my Code:
#include <iostream.h>
#include <vector>
using namespace std;
class cStudent
{
public:
int iAge;
};
int main()
{
vector<cStudent> pupil;
pupil.resize(1);
pupil[0].iAge = 0;
pupil[1].iAge = 1;
cout << pupil[0].iAge << endl << pupil[1].iAge << endl;
return 0;
}
Does anyone know what going on, is this a problem with my code or my
computer??
- Next message: Cerf: "Re: Runtime errors but no compiletime errors"
- Previous message: jeffc: "Re: Newbie OOP question"
- Next in thread: Cerf: "Re: Runtime errors but no compiletime errors"
- Reply: Cerf: "Re: Runtime errors but no compiletime errors"
- Reply: Mike Wahler: "Re: Runtime errors but no compiletime errors"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|