|
Page 1 of 1
|
[ 4 posts ] |
|
Void (and other) Pointers
| Author |
Message |
|
amcerbu
Novice
Joined: Sun Oct 21, 2012 10:01 pm Posts: 76
|
 Void (and other) Pointers
I was very happy to hear that the RobotC developers at Carnegie Mellon added pointers in the new release. I was wondering, however, to what extent pointers were implemented. Are there void pointers? Are there pointers to structs? Are there pointers to pointers? Is there any "malloc"-type function? I remember reading last year that there was no support for dynamic memory allocation (probably to prevent memory leaks -- don't know how one would fix something like that on an NXT), but has this changed? Thanks.
|
| Tue Oct 23, 2012 7:24 pm |
|
 |
|
MHTS
Guru
Joined: Sun Nov 15, 2009 5:46 am Posts: 1023
|
 Re: Void (and other) Pointers
Yes to all your questions except for malloc/free. There is still no dynamic memory allocation support in RobotC. In other words, there is no heap.
|
| Wed Oct 24, 2012 3:29 am |
|
 |
|
amcerbu
Novice
Joined: Sun Oct 21, 2012 10:01 pm Posts: 76
|
 Re: Void (and other) Pointers
How about function pointers? Is this sort of code legal?
|
| Wed Oct 31, 2012 8:10 pm |
|
 |
|
MHTS
Guru
Joined: Sun Nov 15, 2009 5:46 am Posts: 1023
|
 Re: Void (and other) Pointers
I wish but no, there is no function pointer support in RobotC.
|
| Wed Oct 31, 2012 9:38 pm |
|
|
|
Page 1 of 1
|
[ 4 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 6 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|