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 (Retired) Pointers and Memory Pointers

Brandon Fallin
PLUS
Brandon Fallin
Courses Plus Student 4,055 Points

I can't seem to figure out the problem.

I am having problems with Challenge task 2 of 3 in the "Pointers and Memory" section. The challenge tells me to "Declare a 'char' variable named 'alpha' and initialize it to 'k'." so I wrote the following. (the first line is from the previous challenge task) char *pointy; char alpha = "k"; but it gives me the error "Bummer! Did you declare 'alpha' as a "char" and initialize it to 'k'?". The only thing I could think of is that "initialize" does not mean "set to".

1 Answer

Hi Brandon,

You're so close. Just replace the double quotes with single quotes ( char alpha = 'k') It's seeing your "k" as a string not as a character 'k'

Brandon Fallin
Brandon Fallin
Courses Plus Student 4,055 Points

Thanks! that worked great, I was on the brink of pulling my hair out. I guess my JavaScript background is to blame lol.