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 trialJonathan Bowman
481 PointsObj C Declaring Char not working
In the challenge task asking me to create two char variables, alpha and bravo, I keep getting errors. I've tried typing it several ways, declaring and assigning the variables on the same line vs separate lines, but I'm not sure what's wrong here:
char alpha = "a"; char bravo = "b";
1 Answer
Stone Preston
42,016 Pointsthe problem is your double quotes. chars use single quotes, not double quotes.
char alpha = 'a';
char bravo = 'b';
Jonathan Bowman
481 PointsJonathan Bowman
481 PointsAh ha; tricky! Thank you for the quick reply.