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 Basic Data Types and Variables Numerical Variables

mark hengstebeck
mark hengstebeck
1,119 Points

how do I contact Gabe, the objective C instructor, directly? Mark

// // main.m // mark's experiment // // Created by mark on 11/11/16. // Copyright © 2016 mark. All rights reserved. //

import <Foundation/Foundation.h>

int main(int argc, const char * argv[]) { @autoreleasepool { // insert code here... NSLog(@"Hello, World!"); }

int size;
 size = 13; {
// insert code here...
NSLog(@"size is: %i", size);
 }

return 0;

}

When I run this on Xcode, the builder is successful. When I run it as my first project, it responds as a bummer.

When I attempt to remove, "hello, world!", on Xcode, the build is unsuccessful.

Is there an obvious reason for this?

Thanks, Mark

variable_assignment.mm
//
//  main.m
//  mark's experiment
//
//  Created by mark on 11/11/16.
//  Copyright © 2016 mark. All rights reserved.
//

#import <Foundation/Foundation.h>

 {
    @autoreleasepool {
        // insert code here...
        NSLog(@"Hello, World!");
    }

    int size;
    size = 13;

    NSLog(@"size is: %i", size);

   return 0;
}

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! Here's something important to note about challenges. They are testing for very specific things. It's important to try not to do anything the challenge doesn't explicitly ask for. Even if functional outside the challenge, it can still cause the challenge to fail . And you've gone way above and beyond what was required here. The entirety of the code that will pass both steps of this challenge is two lines.

Here's what it was looking for:

int size = 13;
float foodPrice = 3.50;

As for contacting Gabe directly, you could try tagging him here on the forums by using the @ sign and typing his name. A list should pop up with users connected to this forum that you can select from.

Hope this helps! :sparkles: