Hello, I have read various pointer tutorials but I still don't understand the concept of using them.

I am using Dev-C++ as my compiler.

If it would be possible could someone point my into the right direction by providing an example of how a pointer is used correctly.

I collected this code from a website using pointers.

Code:
#include <iostream>
using namespace std;
int main()
{
 int myval = 7;
 int* p_myval = &myval;
 *p_myval = 6;
 cout << myval;
 cin.get();
}
This outputs 6.

Why cannot I just do this?
Code:
#include <iostream>
using namespace std;
int main()
{
 int myval = 7;
 myval = 6;
 cout << myval;
 cin.get();
}
This also outputs 6.

So I cannot understand the use of pointers, if someone can briefly explain this that would be awesome.