| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Realloc() |
On 19 Dec 95 22:36, Paul Edwards wrote to Kieran Haughey:
Hi Paul,
KH>> I can't remember if realloc has one or two varibles for it, I think it's
PE> 1. Look in the header file stdlib.h
Faster to look in online help :). and it's two from memory.. last time I
checked which was right about writing that message..
PE> 2. FREQ ANSI_C.* from 3:711/934.
ok I will...
KH>> right.. The main reason I'm after an example, is because my previous
KH>> attempts at doing this failed, ended up getting exception errors...
PE> Post a small program that demonstrates the bug. For examples of
PE> using realloc(), get the vast amounts of source code available
PE> for FREQ from 3:711/934.
it was more a problem of missing the allocation of an array, but the
program still accessing it..
what I want is something like this
#define ARR_SIZE 2000
int main()
{
char *buffer;
long arr_size_cur=0;
long count=0;
buffer = calloc(100,sizeof(char));
arr_size_cur = 100;
while(whatever)
{
/* any code whatever */
if(count >= arr_size_cur && (count+10) * 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™.