|
-
November 25th, 2004, 01:01 AM
#3
Re: Error In This Code ?????????
Actually, there are 2 problems.
1. When you allocated n+1 Coord objects, you are using the extra 1 for the header. It is very difficult to understand your code and this should be separated into a different function to avoid the confusion.
2. Using memory after free(), is undefined behavior. In other words, it may work or crash anytime.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|