Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8196995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:38:47+00:00 2026-06-07T05:38:47+00:00

Interesting issue with my code… running in debug mode (Eclipse/CDT)… all of my tiles

  • 0

Interesting issue with my code… running in debug mode (Eclipse/CDT)… all of my tiles seem to have their wall bool set to true? Anyone know wtf is going on?

Code, fully MVC and almost proper OO (I think), here:

main.cpp http://pastebin.com/f14kmfap

gridworld.h http://pastebin.com/vCmzxzrj

gridworld.cpp http://pastebin.com/jKKRFE9V

I suspect it has to do with this snippet here:

Tile::Tile(bool w) {
        wall = w;
        event = false;
        eventText = "";
}

And how I use it to generate the map:

map[1][2] = new Tile(false);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:38:48+00:00Added an answer on June 7, 2026 at 5:38 am

    First, the Tile map[8][8];, will have the tiles default constructed. with the bool wall set to true.

    In the Map constructor you are using Map::map[r][c] = new Tile() the right hand side is a Tile*, the left hand side is a Tile.
    The proper syntax for assigning to map would be map[r][c] = Tile();, or map[6][4]=Tile(false);

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an interesting issue :/ I use CodeIgniter and the code below is
I met an interesting issue about C#. I have code like below. List<Func<int>> actions
I ran across an interesting issue today. We have an application that utilizes Zend
I have an interesting issue with HTTPS ports not being handled properly. It is
I have a rather interesting issue with SVG animation. I am animating along a
I have ran into an interesting issue while trying to create a more usable
Someone please help. I have an interesting issue. I am trying to implement an
So, essentially, I'm running into an interesting issue where, when the call to the
I have an issue with importing the scipy.special package. It isn't harmful, just annoying/interesting.
I ran into a interesting issue today. Check out this pseudo-code: void Loop() {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.