I wrote a program to pass a large string to make passing it a point, since passing a number or two isnt really pointer worthy so instead i decided on passing a huge string, so is this how i would use a pointer? After reading one of these books I understand pointers pretty good, but I cant ask the book questions so I want to make sure i'm doing this right. I'm pretty positive i did though.
ok cool, and yeah i know i could have used the pass by reference operator, but i just wanted to familiarize myself with pointers. A better example that i should have used is something like an image in use with a graphics library which i did once. But even then I could pass the image using the address of operator right?
You can always pass by reference instead of pointer except if you want to allow a null pointer to be passed to the function.
In your code it's a bit unnecessary to create the pointer as a variable. You could just pass the pointer that you get from the & operator to the function directly. DisplayText(&text);