Aimless walker program help Programming Software Development by yznk … assignment is to modify the program so that the aimless walker stumbles around in a 2-dimensional grid, such as the… and columns in the 2-d grid. Again, have the walker start in the middle of the grid, then have him… we lose a good and nice man paul walker Community Center Geeks' Lounge by alone88 Hi freinds how are ? we lose a garte man paul walker i m so sad tel me about some paul walker plz Re: we lose a good and nice man paul walker Community Center Geeks' Lounge by vegaseat A Porsche is made for speed, not all drivers can handle it. I feel sorry for Mister Walker since he was the innocent passenger. Re: we lose a good and nice man paul walker Community Center Geeks' Lounge by G_Waddell … it shouldn't be your everyday car. As for Paul Walker, didn't know the man but did see a series… Unique Walker with os.walk Programming Software Development by jimmy19 I am trying to create a walker that goes through directories. Here are the inputs and outputs … Re: Aimless walker program help Programming Software Development by Clinton Portis [quote]Your program should prompt the user to enter the number of rows and columns in the 2-d grid.[/quote] since you will have the user define the dimensions of your 2d array, you should use a dynamic 2d array: [CODE] int rows = 0; int cols = 0; cout << "Enter rows: "; cin >> rows; cout << "Enter cols… Re: Aimless walker program help Programming Software Development by jonsca street is not declared as an array. However, even if you were to declare it as such, you must declare the rows and columns at compile time. Some compilers may allow you to declare street on line 33 (technically after the time when row and column should have values) but this is a non-standard behavior The alternative is to allocate the array … Re: Aimless walker program help Programming Software Development by yznk I fixed up my code some and now the program runs, but it crashes after entering the rows and columns. Im not sure why, why is it crashing and not finding the number of steps? [CODE]#include <iostream> #include <ctime> #include <cstdlib> using namespace std; void display(char grid[]); int rowSize; int colSize; int … Re: Aimless walker program help Programming Software Development by WaltP [QUOTE=yznk;1141985]I fixed up my code some and now the program runs, but it crashes after entering the rows and columns. Im not sure why, why is it crashing and not finding the number of steps?[/quote] It crashes? Then it doesn't run, does it? :icon_wink: You should know by now that details are important -- what kind of crash? [CODE]void … Re: Aimless walker program help Programming Software Development by yznk My teacher told us that we had to reference newRow and newCol and so i did. But then the program wont run. A windows dialog box appears saying the program must end now. However when i remove the references the program does not crash, but it also doesnt simulate the drunk walking or count the steps. Re: Aimless walker program help Programming Software Development by jonsca Put some cout statements in strategic places and figure out exactly where it is crashing. Also, reread what WaltP has written about going out of bounds on your array. I would pull in those variables from global scope on 8-13 and work them into main. Global scope causes too much confusion for that to be helpful. Pass what you need to between … Re: we lose a good and nice man paul walker Community Center Geeks' Lounge by stultuske never met him, so I won't start on whether he's "good" or "nice". sure had some talent as an actor, even though the Fast & Furious series he was most known for, aren't really the type of 'great acting' movies. liked him in Timeline, though. Re: we lose a good and nice man paul walker Community Center Geeks' Lounge by jaymista I wonder if they will find out what really caused this accident. It seems stupid that a couple of guys had to die for nothing ... just getting from A to B ... yesterday we had an accident in my area where 4 teens died in a car accident caused by speeding. I think there should be more speed controls imbedded in a car's computer. Re: we lose a good and nice man paul walker Community Center Geeks' Lounge by <M/> It is sad how he died but it is kind of ironic on how he died... fast & furious star dies in car accident... Re: we lose a good and nice man paul walker Community Center Geeks' Lounge by kamila.be1 Tragic, really tragic... Re: we lose a good and nice man paul walker Community Center Geeks' Lounge by alone88 yes kamila its very big tragic :( Re: we lose a good and nice man paul walker Community Center Geeks' Lounge by alone88 HAPPY NEW YEAR ADMIN AND FRIENDS GOD BLESS YOU Re: we lose a good and nice man paul walker Community Center Geeks' Lounge by mace windu hey this is Warrens80 im sorry Re: we lose a good and nice man paul walker Community Center Geeks' Lounge by alone88 mace windu way you say sorry ? Re: we lose a good and nice man paul walker Community Center Geeks' Lounge by happygeek He trolled DaniWeb forums using another account, which is banned for three months as a result. The mace_windu account is also banned, permanently, as it was an attempt to get around the other account ban which is something we do not allow. Re: we lose a good and nice man paul walker Community Center Geeks' Lounge by ZZucker The news just reported that the Porsche these dummkopfs were driving went over 100 miles/hour in a residential area. Re: Unique Walker with os.walk Programming Software Development by TrustyTony why you should use object hierarchy? Tell the reason for the code. The form looks fitting for recursive algorithm if you realy must do it this way. The names are not unique look for example doc directories or readme files. Re: Unique Walker with os.walk Programming Software Development by jimmy19 Thank you for replying. I am trying to get a better understanding of python, OOP and data structures. It is somewhat of a self made challenge I set myself. I wanted to see how to use __getattr__ and assign dynamic attributes in this scenario. Re: Unique Walker with os.walk Programming Software Development by TrustyTony Maybe you could take some inspiration of my file search? [url]www.daniweb.com/software-development/python/code/316585[/url] Re: Unique Walker with os.walk Programming Software Development by TrustyTony Here one short interactive experiment: [CODE]>>> import os >>> class directory_lister(list): def __init__(self, path): self.path = os.path.realpath(path) if os.path.isdir(path): for directory in os.listdir(path): if os.path.isdir(directory): self.append(directory_lister(os.path.join(path, directory))) def … Re: Unique Walker with os.walk Programming Software Development by jimmy19 Thank you, this was very helpful but is it possible to make the it go one level down. As in I wanted to view the files in say G:\\\\test\\build\\, which is the problem area for me, do I have to generate it as an attribute, as in do build, Errors... etc become attributes using the __setattr__ overloader but which gives the problem of going down a … Re: Unique Walker with os.walk Programming Software Development by TrustyTony I do not understand it goes down until only files remain. List is it's parent so you could for example put in list filename, first line tuples in case of files, now it does nothing for files. Re: Unique Walker with os.walk Programming Software Development by jimmy19 What I meant was that if you have a directory tree like [CODE]testdir/ a/ j b/ d/ p m c/ k[/CODE] m,k and j are files. With the code above I can get to a,b,c (level 1) but how do I get to testdir/b/d/ (level 2) using the same directory_lister class. I can do a dynamic attribute for… Re: Unique Walker with os.walk Programming Software Development by TrustyTony The directory was without path. Here the class compared with os.walk [CODE]import os class DirectoryLister(list): def __init__(self, path): self.path = os.path.realpath(path) #print self.path for fileobject in os.listdir(path): fileobject = os.path.join(self.path, fileobject) self.append(… errors in code Programming Software Development by chubbywubba …) break; else if ((*walker)->key > key) walker = &((*walker)->left); else walker = &((*walker)->right); } return walker; // Note: if *walker is NULL, key…