| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Realloc |
* Crossposted in area C_ECHO, AUST_C_HERE
Hi All,
I just thought I'd let you know I managed to fix, after looking at frank
adam's example code, my realloc problems.. and I think the error was as
simple as forgetting to multiply the new struct size with the size of the
struct I was using, I completely forgot that realloc works the same as
malloc :)..
I basically had
realloc(fareas,cur_arr_size);
where cur_arr_size is something like 110..
when it should have been
realloc(fareas,cur_arr_size * sizeof(FA));
Thank you to all the people who helped me fix this :)..
ÿ
Happy New Year,
Kieran
3:711/413.17{at}fidonet
@EOT:
--- MsgedSQ 3.30
* Origin: -=> The Last Stand Against Sanity <=- (3:711/413.17)SEEN-BY: 50/99 620/243 623/630 711/401 409 410 413 420 423 430 510 808 809 SEEN-BY: 711/932 934 712/515 713/888 714/906 800/1 7877/2809 @PATH: 711/413 808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.