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
Gabriel E
8,916 PointsWhat might be that matter with this code?
I'm following a little tutorial, and I keep getting this error: http://imgur.com/a/ree1M I feel like I followed everything pretty good so far, but I'm not sure. I'm using Eclipse IDE in case anyone needs to know. Thanks, G
2 Answers
Seth Kroger
56,416 PointsThe function is returning a boolean but the constant you're comparing it to is in int. Perhaps a better way to to handle it returning false is:
if (!glfwInit()) {
// ... handle the initialization failing here
}
Naveed Sarwar
Courses Plus Student 1,081 PointsPlease, check the variable name. There seems to be an issue with the Camel Casing. It is not necessary but it may be different from the declaration.
Gabriel E
8,916 PointsGabriel E
8,916 PointsThanks a ton Seth! And I don't need that italicized GL_TRUE that's in blue anymore?
Seth Kroger
56,416 PointsSeth Kroger
56,416 PointsNo, not in that if statement. It looks like a constant defined by the library that could be used elsewhere, but not right here.