Kyusaku,
I looked at your program and there are several reasons why you getting errors. Your path to your file is incorrect needs to be "C:\\hardware.txt" Use "\\" to specify a single "\" in a string. Your read in a string from a file and then you are trying to perform calculations using that string. On way to handle this is to convert the the strings to floats using the atof function. I tried to keep as close to your original program as possible but realize you will learn better ways to handle such reading from a file, manipulating data and writing to a file. The code below will accomplish all that I think you set out to do.
HTH,
JC
#include <iostream.h>
#include <fstream.h>
#include <iomanip.h> //need for setw
#include <string.h>
#include <stdlib.h> //need for atof
double Pricing (char* sQty, char* sPrice);
void main()
{
char sName[15], sCode[15], sQty[15], sPrice[15];
double dTotalPrice, dTax;
ifstream infile ("c:\\hardware.txt"

;
ofstream outp("c:\\outfile.txt"

;
infile >> sName >> sCode >> sQty >> sPrice;
cout << setw(15) << sName << setw(15) << sCode << setw(15)
<< "Cost" << setw(10) << "Tax" << setw(10) << "Total"
<< endl;
outp << setw(15) << sName << setw(15) << sCode << setw(15)
<< "Cost" << setw(10) << "Tax" << setw(10)<< "Total"
<< endl;
while (!infile.eof())
{
infile >> sName >> sCode >> sQty >> sPrice;
dTotalPrice = Pricing(sQty, sPrice);
dTax = dTotalPrice * 0.05;
cout << setw(15) << sName << setw(15) << sCode
<< setw(15) << dTotalPrice << setw(10) << dTax
<< setw(10) << dTotalPrice + dTax << endl;
outp << setw(15) << sName << setw(15) << sCode
<< setw(15) << dTotalPrice << setw(10) << dTax
<< setw(10) << dTotalPrice + dTax << endl;
}
}
double Pricing (char* sQty, char* sPrice)
{
return (atof(sQty) * atof(sPrice));
}