In-place reversal of a singly linked list
You don't use delete after allocating nodes with new, resulting in a memory leak.  As a general rule, delete should be used in the same way new was used.

In this case, have an identical for loop and use delete on each node:

for (int i=0; i&lt;10; i++) {
    delete n;
}


With these two loops, you might as well have a constant to hold the number of nodes to use, so that you can make sure the same number is used.
You don't need to have return 0 at the end of main().  Reaching the end implies successful completion, and the compiler will insert this return for you.