Hi
i am trying to get a pointer to output text if it is possible but i dont understand where i am going wrong
this is the code i have come up with so far
when i do run the program i get some weird symbol. is this because it is just pointing to the memory address location?Code:#include <iostream> using namespace std; int main() { char name[10]; char *ptr; ptr = &name[40]; cin>>name; cin.ignore(); cout<< *ptr <<"\n"; cin.get(); }
Thanks