Search found 3 matches

by vogtnich
04 Dec 2010, 06:05
Forum: Mindstorms Software
Topic: Pointers in NXC
Replies: 18
Views: 18374

Re: Pointers in NXC

That stuff about memory pools made me realize I could probably just use one big array after all. I wanted the pointers for a linked queue of search nodes, but making the queue a big array probably won't slow things down noticeably. My project is due in a few days, so I don't want to mess with the fi...
by vogtnich
03 Dec 2010, 03:40
Forum: Mindstorms Software
Topic: Pointers in NXC
Replies: 18
Views: 18374

Re: Pointers in NXC

Thanks for the reply. So I can use unsigned long as a pointer variable for any object using addressOf? That sounds like it will work. The other thing I need is something like C++'s new operator to allocate space for new instances of structs. I guess C has malloc and free but I've never used them bef...
by vogtnich
03 Dec 2010, 00:27
Forum: Mindstorms Software
Topic: Pointers in NXC
Replies: 18
Views: 18374

Pointers in NXC

Is it true that NXC doesn't have pointers at all? What about dynamic arrays? I wanted to use both of these in a program for an NXT robot. It seems like NQC has them, but it doesn't have the NXT methods l was already using (MotorRotationCount() for example). Is there any way to use pointers etc. with...