Jump to content
  • Advertisement
Sign in to follow this  
rubsnick

Cannot Find Symbol constructor?

This topic is 2835 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I keep getting this error at line 29. I'm basing this off of my professors code and modifying it to suit my needs but my professor has the same thing going on and I can't seem to find why it's not working.... so I need some help.

http://pastebin.com/sWxfic1z

Share this post


Link to post
Share on other sites
Advertisement
Hi! I think you are getting that error because of the way you define your constructor:

public void Coordinates2D(int dimension)

Constructors don't have return types. So the correct way of defining the constructor of the Coordinates2D class would be:

public Coordinates2D(int dimension)

Hope it helps

Share this post


Link to post
Share on other sites

Hi! I think you are getting that error because of the way you define your constructor:

public void Coordinates2D(int dimension)

Constructors don't have return types. So the correct way of defining the constructor of the Coordinates2D class would be:

public Coordinates2D(int dimension)

Hope it helps




THANKS! It worked! Now it's working ... rather compiles I"m still not done. But I like to compile every so often to make sure that they are no erros. easier to one one by one then all at once. IMO. But thanks!

Share this post


Link to post
Share on other sites
... Why would you call the class "Coordinates2D" if it apparently represents coordinates for any number of dimensions?

Share this post


Link to post
Share on other sites

... Why would you call the class "Coordinates2D" if it apparently represents coordinates for any number of dimensions?


Cuz I'm a bad programmer?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!