• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Site › Site Feedback and Questions v
« Previous 1 ... 21 22 23 24 25 Next »

A Question on Programming with GameCube
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
A Question on Programming with GameCube
02-12-2010, 08:44 PM
#1
jiuhu
Unregistered
 
Hi,

I not sure where should I ask this question, so in Question...

I try to wrtie a simple program in GameCube with C++, and I wish to try it in OO way. but I found that I having trouble with the operator "new". I was not able to dynamically allocate the memory, perhaps this are the different of console??

I would like to know, is that GameCube does not support dynamic memory allocation or I need to do it in another approach?

Thank you.

Regards,
JiuHu
Reply
02-16-2010, 06:47 AM (This post was last modified: 02-16-2010, 06:51 AM by Ocean.)
#2
Ocean Offline
Senior Member
*******
Posts: 1,209
Threads: 39
Joined: Jan 2010
GC native compiler can't initialize dynamic memory variable. Use double *dp = new double(var) instead of just "new".

Or, you can allocate memory array of your desired size with int *table;table = new int[var];, where var is bytesize.
[Image: 1678862.png]
[Image: 2qbcgw2.jpg]
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode