B
Bryan Parkoff
I tried to create pointer array. Each element in this array has 4 bytes
or pointer. How can I create pointer array instead long (dword) array? I
do not have to convert from "unsigned long" to "char*".
It should look like *A[0], *A[1], *A[2].....
If it is not the option what C/C++ Compiler has, I will be forced to use
struct keyword. If I have to use struct array that would be 100 structs in
one array, how can struct be initialized at dynamic memory instead of static
memory using new keyword?
Please advise and look at my code below.
char *name1 = "Bryan";
char *name2 = "Jon";
char *name3 = "Daniel";
unsigned long* A = new unsigned long[0x1000];
A[0] = (unsigned long)name1;
A[1] = (unsigned long)name2;
A[2] = (unsigned long)name3;
char *name4 = (char*)A[0];
Bryan Parkoff
or pointer. How can I create pointer array instead long (dword) array? I
do not have to convert from "unsigned long" to "char*".
It should look like *A[0], *A[1], *A[2].....
If it is not the option what C/C++ Compiler has, I will be forced to use
struct keyword. If I have to use struct array that would be 100 structs in
one array, how can struct be initialized at dynamic memory instead of static
memory using new keyword?
Please advise and look at my code below.
char *name1 = "Bryan";
char *name2 = "Jon";
char *name3 = "Daniel";
unsigned long* A = new unsigned long[0x1000];
A[0] = (unsigned long)name1;
A[1] = (unsigned long)name2;
A[2] = (unsigned long)name3;
char *name4 = (char*)A[0];
Bryan Parkoff