I'm new to C++, but have a solid grasp of pointers and DMA in other languages.
My main issue is that i'm trying to figure out how to do things in an enviroment where i have no base class libraries, and i'm also trying to get my head around the layout of C++ files etc. I have a reasonable grasp of the basics, but am totaly lost as far as collection structures go.
As a learning exercise i am looking to make an arraylist structure. I've had a look around but not found any code that really fills my needs.
* Firstly the structure will contain an array, with count and length data.
* The array will be an array of pointers. (void pointers)
* When the Count value reaches the Length value, a new array is constructed that is scaled up from the origional by a given value.
* The items are shifted across to the new array.
* The origional array is deleted and set to null.
* Add some memory shuffling stuff to add / remove. (I can handle this if i get the rest working)
If anyone can direct me to some source code that will either explain it all or give me enough info to get working on this, that'll be a great help.
Also I've seen some code like this:
*char a; //Or whatever object we are refferencing<br />
//Assign some stuff here<br />
delete a;<br />
a = NULL;<br />
But there seems to be no NULL keyword. I know it's just setting the pointer to nothing, which should genericaly be 0. Is this an actualy keyword in some version of C++, or is it standard practice to have a global constant 'NULL = 0;'?
What you are basically trying to do is a sort of memory heap, right ? C++ coders normally do not handle collection by themselves, this would be reinventing the wheel, though I can understand that it can be educational. We normally use STLs, or collection provided by the windows API (which is not relevant for you, since you do not want to rely on base classes).
Hi to all, I'm currently an undergraduate in Nanyang Technological University, School of Electrical and Electronics Engineering. My team mates and I are designing to use Logitech gamepad to control a robot's movement. We have decoded the the string codes for every button on the gamepad. However, we have software difficulties in linking these string codes to the GUI application. I would like to seek help in these. My email address is: HEAH0001@ntu.edu.sg
Hi to all! My team used WinDriver software to diagnose the gamepad of Logitech. This diagnosis software creates multiple C++ source code which gives us the character string of each button found on the gamepad. We would like to use these codes to be linked with the GUI application and then to the ADAM system. My team has been trying hard to link the C++ source code files created by WinDriver to the GUI application. The GUI application is also written in C++ source code. The ultimate objective is to use the gamepad to control the robots movement. If these C++ source code files cannot be linked to the GUI application, is there any other ways to do it?