| | |
Looking for help with C++ game of life program. Will pay or make donation for tutor.
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Dec 2006
Posts: 18
Reputation:
Solved Threads: 0
Looking for help with C++ game of life program. Will pay or make donation for tutor.
0
#1 Dec 15th, 2006
Hi all,
I looking for somebody to help me through a final class program. I would be happy to pay somebody to tutor me through this or make a donation. I am not looking for somebody to just give me the answer, but I DEFINITELY need help. It is due on Monday. Only two people in the entire class have had any success with it. I'm pretty lost. If someone can help me, please let me know. I have all the info pertaining to the assignment. Thanks alot.
I looking for somebody to help me through a final class program. I would be happy to pay somebody to tutor me through this or make a donation. I am not looking for somebody to just give me the answer, but I DEFINITELY need help. It is due on Monday. Only two people in the entire class have had any success with it. I'm pretty lost. If someone can help me, please let me know. I have all the info pertaining to the assignment. Thanks alot.
Re: Looking for help with C++ game of life program. Will pay or make donation for tutor.
0
#2 Dec 15th, 2006
•
•
Join Date: Dec 2006
Posts: 18
Reputation:
Solved Threads: 0
Re: Looking for help with C++ game of life program. Will pay or make donation for tut
0
#3 Dec 15th, 2006
THe actual assignment is 3 pages long with requirements, so I'll just give you the cut and dry version:
Write a program that plays the game of life. Create a class with the name "boolMatrix" for storing and processing a two dimensional array of bool values. We need to read in a dat file that basically contains a pair of coordinates representing the row / col of the locations containing the true values (live cells). the array must be 20 by 20 to start. We need 8 member functions.
This is basically it, with a bunch more specs about whether a cell lives in the future generations and such... The problem is that this is the first time we have used either classes or 2 d arrays and I'm having a terrible time using them together.
Write a program that plays the game of life. Create a class with the name "boolMatrix" for storing and processing a two dimensional array of bool values. We need to read in a dat file that basically contains a pair of coordinates representing the row / col of the locations containing the true values (live cells). the array must be 20 by 20 to start. We need 8 member functions.
This is basically it, with a bunch more specs about whether a cell lives in the future generations and such... The problem is that this is the first time we have used either classes or 2 d arrays and I'm having a terrible time using them together.
Re: Looking for help with C++ game of life program. Will pay or make donation for tutor.
0
#4 Dec 15th, 2006
1. Plan what you think you need to do on paper, i.e NO CODE
2. Draw a flow chart, how does your program go from start to finish?
3. Play with 2d arrays, filling and printing them out.
4. Learn how a basic class can be built.
5. Think about what methods your class will have.
2. Draw a flow chart, how does your program go from start to finish?
3. Play with 2d arrays, filling and printing them out.
4. Learn how a basic class can be built.
5. Think about what methods your class will have.
*Voted best profile in the world*
Re: Looking for help with C++ game of life program. Will pay or make donation for tutor.
0
#5 Dec 15th, 2006
•
•
Join Date: Dec 2006
Posts: 18
Reputation:
Solved Threads: 0
Re: Looking for help with C++ game of life program. Will pay or make donation for tutor.
0
#6 Dec 15th, 2006
Well I have spent quite a bit of time working on this... I just don't really understand it and the class is online and the teacher is never available for help. Which is probably why 22 people have dropped. Here's what I've come up with so far. It's not much and I truthfully don't understand exactly where I'm going with it.
Is there a way to attach the entire assgnment?
Is there a way to attach the entire assgnment?
C++ Syntax (Toggle Plain Text)
#include <iostream> #include <fstream> #include "boolMatrix.h" using namespace std; const int num_rows = 20; const int num_cols = 20; boolMatrix booleanMatrix[row_num][col_num]; int row = 0; int col = 0; boolMatrix::boolMatrix() { for(int row = 0; row < num_rows; row++){ for(int col = 0; col < num_cols; col++){ return false; } } } boolMatrix boolMatrix::get( boolMatrix booleanMatrix)const { return booleanMatrix (row, col); } void boolmatrix::set (boolMatrix booleanMatrix) { ifstream infile("location_alive.dat"); int row, col; while(infile){ infile >> row >> col; booleanMatrix.set(row,col,"TRUE"); } }
Last edited by ~s.o.s~; Dec 15th, 2006 at 9:47 pm. Reason: Added code tags learn to use them yourself.
Re: Looking for help with C++ game of life program. Will pay or make donation for tutor.
0
#7 Dec 15th, 2006
Re: Looking for help with C++ game of life program. Will pay or make donation for tutor.
0
#8 Dec 15th, 2006
At the bottom of the "Advanced reply", you can attach a number of different types of files. And if you do post the code right in your post, please use Code tags. (More info in my sig)
Just a note: you're not allowed to return anything in a class's constructor, which is what you're trying to do in boolMatrix::boolMatrix()
Can't see any more until you post the other files... but it looks good.
Just a note: you're not allowed to return anything in a class's constructor, which is what you're trying to do in boolMatrix::boolMatrix()
Can't see any more until you post the other files... but it looks good.
"Technological progress is like an axe in the hands of a pathological criminal."
All my posts may be freely redistributed under the terms of the MIT license.
All my posts may be freely redistributed under the terms of the MIT license.
Re: Looking for help with C++ game of life program. Will pay or make donation for tutor.
0
#9 Dec 15th, 2006
Also what does BoolMatrix.h look like?
What does your dat file look like.
Post an example please and use code tags.
[edit]I need sleep, I'll be back in the morning.[/edit]
Remember plan it first before you do any coding!
What does your dat file look like.
Post an example please and use code tags.
[edit]I need sleep, I'll be back in the morning.[/edit]
Remember plan it first before you do any coding!
Last edited by iamthwee; Dec 15th, 2006 at 8:01 pm.
*Voted best profile in the world*
•
•
Join Date: Dec 2006
Posts: 18
Reputation:
Solved Threads: 0
Re: Looking for help with C++ game of life program. Will pay or make donation for tut
0
#10 Dec 15th, 2006
Hi ProgrammerJoe,
I uploaded the file, I hope it worked. Please let me know. Inside the main assignment are links to the input file. I'm not sure if they were cut out when I attached though.
I'm not sure what "tags" are. I haven't used them thus far in C++ other CSS HTML and ASP yes, but C++ not sure what they are.
I'm basically stuck at this point.
I uploaded the file, I hope it worked. Please let me know. Inside the main assignment are links to the input file. I'm not sure if they were cut out when I attached though.
I'm not sure what "tags" are. I haven't used them thus far in C++ other CSS HTML and ASP yes, but C++ not sure what they are.
I'm basically stuck at this point.
![]() |
Similar Threads
- conway's game of life (C++)
Other Threads in the C++ Forum
- Previous Thread: win32 window painting fails
- Next Thread: is this matrix code working?
| Thread Tools | Search this Thread |
api array based beginner binary bitmap c++ c/c++ calculator char char* class classes coding compile compiler console conversion convert count data database delete desktop developer directshow dll dynamiccharacterarray email encryption error file forms fstream function functions game getline google graph homeworkhelper iamthwee ifstream input int integer java lib linkedlist linux list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct template templates test text tree unix url vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






