It will compile, and run for a split second- but then it quits itself.
I've had three people look at it, but no one can see the problem.
#include<iostream>
#include<conio.h>
#include<iomanip>
using namespace std;
void getRaise(double pay[], int size)
{
for(int x=0; x <size, ++x;)
pay[x] *=1.05;
}
int main ()
{
const int SIZE=5;
double wage[SIZE] = {14.95, 17.75, 19.59, 12.9, 7.2};
cout<<"The values stored are "<<endl;
for(int x=0; x<SIZE;++x)
cout<<fixed<<setprecision(2)<<"$"<<wage[x]<<endl;
getRaise(wage, SIZE);
cout<<"The values with a 5% raise are "<<endl;
for(int x=0; x<SIZE;++x)
cout<<"$"<<wage[x]<<endl;
getch();
}
Thanks in advance. :)