Advertisement

Win2k extern memory...

Started by February 12, 2002 08:36 AM
3 comments, last by TipplerP 23 years ago
I made an engine on win2k but I have a problem with pointers like this winmain... { EGX_Param* param; param->bUsePak = true; ... and when I compile, it comes a mistake, that I win2k cant use external memory. how can I solve this problem? thx
to do what you want to do, you need to allocate the memory for the structure yourself. eg

winmain...
{
EGX_Param* param;
param = malloc( sizeof( EGX_Param ) );
param->bUsePak = true;
...

i think that''s right. i don''t use malloc much.

===========================
The price of intelligence is stupidity
===========================There are 10 types of people in the world. Those that understand binary and those that don't.( My views in no way reflect the views of my employer. )
Advertisement
You need to allocate memmory first, but don''t do it with malloc,
do it with the new operator. Like this :

param = new EGX_param;
"THE INFORMATION CONTAINED IN THIS REPORT IS CLASSIFIED; DO NOT GO TO FOX NEWS TO READ OR OBTAIN A COPY." , the pentagon
quote:
Original post by George2
You need to allocate memmory first, but don''t do it with malloc,
do it with the new operator. Like this :

param = new EGX_param;


Depends on if he uses C or C++.
I get still many problems
i took the pak loader code into my engine from my old engine which works very well on WinME but now...I get lots of mistakes where pointers are...but online here

void GX_Pak::gxLoadPak(PAK_File* pak,...)
{
...
pak->name = filename; // there is the mistakes but wkrs very well on WinMe
...

I could jump down the grand canon!

and sorry for my evry bad english! it is 1:00 and i''m full with lots of alcohol

thx

This topic is closed to new replies.

Advertisement