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 trialJohn Krueger
1,996 PointsWill not print
My program will compile fine but nothing prints on console. supposed to be True then False
John Krueger
1,996 PointsMap map = new Map(8,5);
Point point = new Point(4,2);
''' bool isOnMap= map.OnMap(point);
Console.WriteLine(isOnMap);
point = new Point(8,5);
isOnMap = map.OnMap(point);
Console.WriteLine(isOnMap);'''
Khaleel Ahmed
270 PointsI too have a same problem
3 Answers
markmneimneh
14,132 PointsHello
doe you mean console ... note the lower case c
Shawn Mathes
490 Pointsdid you make sure to include the system namespace?
using System;
namespace TreehouseDefense
{
class Game
{
public static void Main()
{
Map map = new Map(8, 5);
Point point = new Point(4,2);
bool isOnMap = map.OnMap(point);
Console.WriteLine(isOnMap);
point = new Point(8,5);
isOnMap = map.OnMap(point);
Console.WriteLine(isOnMap);
}
}
}
hhhg xhjc
758 PointsHave same problem.. :///
andren
28,558 Pointsandren
28,558 PointsYou will have to include the code in question in your post if you wish for us to help figure out the problem. Without seeing the code it's impossible to give any real suggestions as to what is wrong.
Also please use Code markdown when pasting your code as described below:
Doing so will make your code appear with proper highlighting and line breaks which makes it easier to study.