这是一个赋值我的问题是函数moneyCount()但是当构建或试图用主程序运行它时,它说的是一个Unidentified引用。这是money.cpp文件。
#include <iostream>
#include "money.h"
double ones =1.00;
double fives=5.00;
double tens=10.00;
double twentys=20.00;
double quarter=0.25;
double total_bills_1=400.00;
double total_bills_5=300.00;
double total_bills_10= 200.00;
double total_bills_20= 50.00;
double total_bills_quarters=500.00;
double total_ones = total_bills_1*ones;
double total_fives= total_bills_5*fives;
double total_tens=total_bills_10*tens;
double total_20=total_bills_20*twentys;
double total_quarters= total_bills_quarters*quarter;
double total_bills= total_ones+total_fives+total_tens+total_20+total_quarters;
void moneyCount(){
std::cout<<" 1 : One Dollar : "<<total_bills_1<<" : "<<total_ones<<"\n"
<<" 2 : Five Dollar : "<<total_bills_5<<" : "<<total_fives<<"\n"
<<" 3 : Ten Dollar : "<<total_bills_10<<" : "<<total_tens<<"\n"
<<" 4 : Twenty Dollar : "<<total_bills_20<<" : "<<total_20<<"\n"
<<" 5 :Quarter : "<<total_bills_quarters<<" : "<<total_quarters<<"\n";
}