0
How program stores pointer?
if this code gives me an error so how program store pointers as variables? https://code.sololearn.com/c39C7ETHEPGT/?ref=app
5 odpowiedzi
+ 1
#include <iostream>
using namespace std;
int main() {
int number = 1800;
int *numAddress = &number;
int **adrAdr = &numAddress;
cout << number << endl;
cout << numAddress << endl;
cout << adrAdr << endl;
return 0;
}
+ 1
If you want to store pointer addresses you can create an array of size_t
size_t *my_pointers;
my_pointers = malloc(size of (size_t) * numberOfPointersToStore);
0
Line 11: you forgot an “e”
Line 7: You are trying to assign an address of a int pointer to a varibale that holds addresses to integers. If you want the address of the pointer, youll have to use an extra *
0
Raul Ramirez William Owens so I can get an address for pointer but that can leg me make endless numbers of pointers for pointers adress
0
thanks William Owens