|
-
Jun 22nd, 2002, 02:05 AM
#1
Thread Starter
Banned
Unresolved External Error
--------------------Configuration: Horses - Win32 Debug--------------------
Linking...
Horses.obj : error LNK2001: unresolved external symbol "void __cdecl dispStat(class ofstream,class ifstream,class apvector<int>)" (?dispStat@@YAXVofstream@@Vifstream@@V?$apvector@H@@@Z)
Debug/Horses.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Horses.exe - 2 error(s), 0 warning(s)
----------------------------------------------------------------------------------------
It compiles but does not build
#include "stdafx.h"
#include <apvector.h>
#include <fstream.h>
void dataFile(ofstream write, ifstream read, apvector<int> stats);
void dispStat(ofstream write, ifstream read, apvector<int> stats);
void main()
{
ofstream write;
ifstream read;
apvector<int> stats;
int choice;
dataFile(write,read,stats);
cout<<"< Menu > "<<endl<<endl;
cout<<"1. Reset Horse Statistics"<<endl;
cout<<"2. View Horse Statistics"<<endl;
cout<<"3. Hit the track"<<endl<<endl;
cout<<"\t. ";
cin>>choice;
switch (choice)
{
case 1 : break;
case 2 : dispStat(write,read,stats);
case 3 : break;
default : cout<<endl<<endl<<"\t.Please enter a correct choice."<<endl<<endl;
}
dispStat(write,read,stats);
}
void dataFile(ofstream write, ifstream read, apvector<int> stats)
{
read.open("stats.dat");
read>>stats[0];
read.close();
if (stats[0]==0)
{
write.open("stats.dat");
for (int x=0;x<8;x++)
write<<"0 ";
write.close();
}
}
void dispStats(ofstream write, ifstream read, apvector<int> stats)
{
read.open("stats.dat");
for (int x=0;x<stats.length()-1;x++)
{
stats.resize(stats.length()+1);
read>>stats[x];
}
read.close();
for (x=0;x<stats.length()-1;x++)
cout<<stats[x]<<" ";
}
Last edited by C Penis Plus; Jun 22nd, 2002 at 03:47 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|