Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Objective-C Basics Introduction to Operators and Conditionals Review Arithmetic Operators and Precendence

Confused about the error I'm getting on the first two questions...

Hi!

This is seemingly a dumb question, but isn't the "asterisk symbol" used to multiply two numbers together in Objective-C, and the "slash symbol" is used to divide a number by another number? Are there other names for these symbols that I missed somehow? The quiz keeps saying, "bummer."

Thanks! Jo

1 Answer

Nathan Tallack
Nathan Tallack
22,159 Points

Yeah, there are. When declaring a new value the asterix is used. The treehouse blog has a great article that you might want to spend time reading. You can find it here and part the way down the page you will find this tidbit. :)

The * symbol is actually an operator that is used to de-reference a pointer. De-what a what now? Pointers are pretty much what they sound like. They β€œpoint” to a location in memory where the actual data is stored. That location in memory is the true container that holds the data. Pointers are a part of regular C and are used because they are more efficient. When we use pointers in our programs, we only need to store and copy a simple pointer, which is really just an address for a space in memory. It’s a relatively small piece of data. If we instead had to store and copy the data being pointed to, we might very quickly run into problems of not having enough memory. For example, it’s much more efficient to simply point to the location for a large video file and use that pointer multiple times in code than to actually have to use all the data of that large video file every time we access it in code. Okay, so back to the asterisk: what does it mean to de-reference a pointer? It simply means that we obtain the value stored in the memory where the pointer is pointing to.

Thanks so much for your answer!! Have you taken this quiz though? Nothing will get me passed the first two questions. I've tried everything I can find.

I emailed the instructor and got it cleared up! The question wanted the symbols themselves, not the words for the symbols! How did I not think to try that!? Thanks for your answer!