EXTREME BEGINNER, PROJECT HELP, STRUGGLING

Hey guys, I'm still very new to c++ so when receiving this project, I was pretty lost, the lab we did seem simple, but when he assign this project, i had no idea how to start. I understand the basic of it, but not alot to put it together when writting the program. So the assignment is to develop a manhunt simulator. The manhunt simulator will have two people. The investigator who will be demarked with an “I” and a target who will be demarked with a “T”. The target will not be directly visible on the map though.

https://flic.kr/p/SjfPCA << i took a picture of how he wanted the program to function, it seems simple at first but i was completely lost with loading a text file, the map, and finding the target

https://www.flickr.com/photos/31706893@N03/? << the rest of the screenshot I took is the input and output samples he provided which help me visually understand what he meant, but I still cant figure out how to write it, i know how to open file and create arrays, but putting it together is still tricky, especially moving the 'I' and turning the underscore to asterisk

I really appreciate any sort of help or tips to help me get started!
Hello betchapon,

Do not think about the whole program at once. Break down the instructions into parts s thy are written.

Here is an idea to get you started:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//  Include files as per instructions. All may not be needed in main.
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cmath>
#include <cstdlib>
#include <string>

using namespace std;  // Not recomended, but if you have to.


char MainMenu();
char Menu_2();

int main()
{
	char menuChoice{ ' ' };

	// clear screeen?
	menuChoice = MainMenu();
}

//  You could also put this in a separate file.
char MainMenu()
{
	char choice{ ' ' };

	//print out menu

	return choice;
}


You could also work on the code to read a file. It does not have to completely work in the beginning. Just be able to open and read the file and maybe print out what you have rad for now. Later you can incorporate it into the program.

You can also think about how you want to deal with information for each point of the matrix. Use a "struct" or a "class" or just a 2D array or a combination of both.

It is much easier too work on the program in small pieces. You can always draw out the program on a piece of paper or make a flow chart for the program to work from. The screen shots that you have provided will give you a good idea of what th code should do and how to do it.

Hope that helps,

Andy
Topic archived. No new replies allowed.