What does an asterisk(*) do?

Dec 2, 2013 at 11:19pm
Kind of a noob at programming, but what does it do exactly, same thing with MAX_PATH and &. Also, I have never really found a good use for char, mostly because I don't really know what its for. While I am at it, might as well learn what strn from the <cstring> header file for?
Last edited on Dec 2, 2013 at 11:22pm
Dec 2, 2013 at 11:26pm
Dec 3, 2013 at 12:16am
Asterisk has three roles:
1) Pointer declaration.
2) Dereference.
3) Multiplication.
Dec 3, 2013 at 12:59am
O yeah, I knew what the multiplication one was. I am not a complete begginer (i didnt start a week ago), I have about half a year's experience, so I know my way around the basics. I just find it SO hard to learn the more intermediate to advanced stuff.
Dec 3, 2013 at 9:29am
If you want to learn, you must learn by doing.
That is to say, if you don't use the knowledge you gained, your brain will discard it.

And when you get stuck, post here for help.

In fact, if you're a beginner, you should post even if you don't get stuck, asking for tips for improving your code.
Dec 3, 2013 at 9:34am
I think you want to read this:
http://www.cplusplus.com/doc/tutorial/pointers/
Topic archived. No new replies allowed.