function does not take one arguments

I have a function,

MapRefresh(char d)

But when I call it when putting in the char variable

MapRefresh(Dir)

It gives the error in the title. I haven't really set up many functions that needed variables passed into them, so I may be doing something wrong here. I don't know if this matters, but here is the function body.

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
32
33
34
35
36
37
void MapRefresh(char d)
{

	for(int col=0;col<11;col++)
	{

		for(int row=0;row<11;row++)
    {
		if(col==CoordX && row==CoordY)
		{
			cout << "X";
		}
		else
		{
			cout << Map[col][row];
		}
	}
		cout << endl;
    }

	if(d=='n')
	{
		CoordY++;
	}
	if(d=='e')
	{
		CoordX++;
	}
	if(d=='s')
	{
		CoordY--;
	}
	if(d=='w')
	{
		CoordX--;
	}
}
You are going to have to provide more information on the exact errors you are getting.
Well, the title is the error. It exactly would be

c:\documents and settings\CPlusPlus\my documents\visual studio 2010\projects\Program\Program\Program.cpp(82): error C2660: 'MapRefresh' : function does not take 1 arguments
There's nothing wrong with your MapRefresh function.

Possible problems are:

1) Your MapRefresh prototype is incorrect. Make sure that takes a char parameter also.

2) 'Dir' is not a char when you call it.

3) MapRefresh is not declared prior to you calling it.
Forgot the prototype. -.- I hate it when I come to you guys for such simple things and waste your time. XD Thanks though.
Topic archived. No new replies allowed.