Hi Guys,
Hoping I can get some help with a little bit of code.
fptr = (adj far *) farcalloc(OldYear[z].no_of_adjs,sizeof(adj));
Now, that is using C code.
I am using C++ standard code though in MSVS 2010.
The first issue I have is with the
The compile error message I get is
..."farcalloc" is undefined |
I understand what it means... and from what I have been able to research farcalloc allocates memory from far C heap, as opposed to near C heap.
Can I fix this compile error without resorting to converting it to C++ standard (As it is not my original code)?
I have suggestion from people to use "calloc" instead of "faralloc". Will this cause issues with memory later on (as one is allocating in "far" and other is allocating in "near"), is there a difference in my situation since I am using MSVS 210?
I learnt C++ in my studies and was exposed to C just a little bit, hence I actually don't know what far & near are.
In C++ I know of memory that is stored on the "heap" and "stack" and have dealt with it a fair amount, but I am pretty inexperience with C standard :(
Back to original question, how to get faralloc to work/compile?
Many thanks guys!
P. S. Been reading more stuff... Is "farcalloc()" only a Borland C++ specific compiler???