LNK 2019 LNK 1120 error

I keep getting a LNK 2019 error and a 1120 error and I can't figure out why. I have created other projects, new source files, and retyped it, but I can't fix it. I'm using visual studio 2013

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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#include<iostream>
#include<fstream>
using namespace std;

void read(int[], ifstream&);
void push(int[], int);
int pop(int[]);

int top = -1;

int main()
{
	int myStk[100];
	ifstream inFile;
	inFile.open("postFix.txt");
	read(myStk, inFile);



	return 0;
}

void read(int myStk[], ifstream &inFile, int &i)
{
	int num;
	char hold;
	int total = 0;

	inFile >> num;
	push(myStk, num);

	inFile.get(hold);

	while (hold != '\n')
	{
		if (hold == ' ')
		{

		}
		else if (hold == '*')
		{
			total = total + (pop(myStk)*pop(myStk));
		}
		else if (hold == '+')
		{
			total = total + (pop(myStk) + pop(myStk));
		}
		else if (hold == '-')
		{
			total = total + (pop(myStk) - pop(myStk));
		}


		inFile >> num;
		push(myStk, num);

		inFile.get(hold);
	}
}

void push(int myStk[], int v)
{
	top = top + 1;		//increment top to the next available location in the array.the first push top will be 0.
	myStk[top] = v;		// this puts the value on the stack
	return;
}

int pop(int myStk[])
{
	int  temp;
	temp = myStk[top];
	top--;
	return temp;
}
Do your function prototypes, function calls, and function implementations all have the same parameters?
I just seen my error thanks for the help
Topic archived. No new replies allowed.