| | |
Need help with recursion and arrays
Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
![]() |
Ahh! But if you look above that loop, you will realize that the first row and the first column of the matrix are populated each in their own individual loops, therefore taking care of [1][y] and [x][1]
Dani the Computer Science Gal 
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds

Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
true for distance[][] but not path[][].
Or am I smoking too much crack again?
path[x][starty] is set to, er, well, see, it's like this....
Or am I smoking too much crack again?
C++ Syntax (Toggle Plain Text)
for (x=startx+1; x<=endx; x++) { distance[x][starty] = distance[x-1][starty] + r[x-1][starty]; cout << "We went right to get to (" << x << "," << starty << ") in " << distance[x][starty] << " units" << endl; }
path[x][starty] is set to, er, well, see, it's like this....
![]() |
Similar Threads
- help with recursion (C++)
Other Threads in the C++ Forum
- Previous Thread: Program for tollbooth simulation needed
- Next Thread: Tower Of Hanoi
Views: 4574 | Replies: 11
| Thread Tools | Search this Thread |
Tag cloud for C++
6 add api array arrays beginner binary bitmap c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete desktop directshow dll encryption error file forms fstream function functions game getline givemetehcodez google graph homeworkhelper iamthwee ifstream input int integer java lazy lib linkedlist linux loop looping loops map math matrix memory microsoft newbie news node number output parameter pointer problem program programming project proxy python random read recursion recursive reference return sort string strings struct studio system template templates test text tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






