2 I mean, not that I became a C *pointer* either.
source | link

My "aha!" moment came in this tutorial:

A Tutorial on Pointers and Arrays in C

To be exact, it came in this chapter: Chapter 3: Pointers and Strings

To be even more precise, it came with this sentence:

The parameter passed to puts() is a pointer, that is the value of a pointer (since all parameters in C are passed by value), and the value of a pointer is the address to which it points, or, simply, an address.

When I read that, the clouds parted and angels blew trumpet fanfares.

For, you see, every C tutorial or book I'd read prior to that had asserted that C could pass by value or by reference, a nefarious lie. The truth is that C always passes by value, but sometimes the value passed happens to be an address. Within the method, a copy is made of that address, just like a copy would be made of an int passed in. A copy is not made of the value to which the pointer points. Thus by using the pointer within the method you can access the original value and change it.

I never became a C pointerprogrammer, but I became a .NET programmer, and objects and object references work the same way; the reference to the object is passed by value (and thus copied), but the object itself isn't copied. I've worked around many programmers who don't understand this because they never learned pointers.

My "aha!" moment came in this tutorial:

A Tutorial on Pointers and Arrays in C

To be exact, it came in this chapter: Chapter 3: Pointers and Strings

To be even more precise, it came with this sentence:

The parameter passed to puts() is a pointer, that is the value of a pointer (since all parameters in C are passed by value), and the value of a pointer is the address to which it points, or, simply, an address.

When I read that, the clouds parted and angels blew trumpet fanfares.

For, you see, every C tutorial or book I'd read prior to that had asserted that C could pass by value or by reference, a nefarious lie. The truth is that C always passes by value, but sometimes the value passed happens to be an address. Within the method, a copy is made of that address, just like a copy would be made of an int passed in. A copy is not made of the value to which the pointer points. Thus by using the pointer within the method you can access the original value and change it.

I never became a C pointer, but I became a .NET programmer, and objects and object references work the same way; the reference to the object is passed by value (and thus copied), but the object itself isn't copied. I've worked around many programmers who don't understand this because they never learned pointers.

My "aha!" moment came in this tutorial:

A Tutorial on Pointers and Arrays in C

To be exact, it came in this chapter: Chapter 3: Pointers and Strings

To be even more precise, it came with this sentence:

The parameter passed to puts() is a pointer, that is the value of a pointer (since all parameters in C are passed by value), and the value of a pointer is the address to which it points, or, simply, an address.

When I read that, the clouds parted and angels blew trumpet fanfares.

For, you see, every C tutorial or book I'd read prior to that had asserted that C could pass by value or by reference, a nefarious lie. The truth is that C always passes by value, but sometimes the value passed happens to be an address. Within the method, a copy is made of that address, just like a copy would be made of an int passed in. A copy is not made of the value to which the pointer points. Thus by using the pointer within the method you can access the original value and change it.

I never became a C programmer, but I became a .NET programmer, and objects and object references work the same way; the reference to the object is passed by value (and thus copied), but the object itself isn't copied. I've worked around many programmers who don't understand this because they never learned pointers.

1
source | link

My "aha!" moment came in this tutorial:

A Tutorial on Pointers and Arrays in C

To be exact, it came in this chapter: Chapter 3: Pointers and Strings

To be even more precise, it came with this sentence:

The parameter passed to puts() is a pointer, that is the value of a pointer (since all parameters in C are passed by value), and the value of a pointer is the address to which it points, or, simply, an address.

When I read that, the clouds parted and angels blew trumpet fanfares.

For, you see, every C tutorial or book I'd read prior to that had asserted that C could pass by value or by reference, a nefarious lie. The truth is that C always passes by value, but sometimes the value passed happens to be an address. Within the method, a copy is made of that address, just like a copy would be made of an int passed in. A copy is not made of the value to which the pointer points. Thus by using the pointer within the method you can access the original value and change it.

I never became a C pointer, but I became a .NET programmer, and objects and object references work the same way; the reference to the object is passed by value (and thus copied), but the object itself isn't copied. I've worked around many programmers who don't understand this because they never learned pointers.