This is a modified version of my 3 files program, but seem it stil not working...
the erros messages are:
Error 1 error LNK2005: "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > * dayName" (?dayName@@3PAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@A) already defined in main.obj C:\Users\...\implementation.obj
Error 2 error LNK1169: one or more multiply defined symbols found C:\Users\...\Debug\S2012hw2simple.exe 1
#include <iostream>
#include <string>
#include "dayType.h"
usingnamespace std;
void printDay(int day);
void getDay (int day);
void printNextDay (int day);
void printPreviousDay (int day);
int main()
{
//initialization
dayType runday;
int todayDay;
char Go;
while (true)
{
cout <<"Please input today's Day (0=Sunday, 1=Monday..etc):"<<endl;
cin >>todayDay;
cout << "inputed todayDay is :"<< todayDay<<endl;
runday.printDay (todayDay);
runday.printNextDay (todayDay);
runday. printPreviousDay ( todayDay);
cout<<"Enter a number then I will get you the exact day after the days you specified: ";
cin >> todayDay;
runday. forcastGetDay( todayDay);
cout <<"Do You Want More Calculations? (y/n): "<<endl;
cin >> Go;
if (Go=='n')
{
system("PAUSE");
return 0;
}
}
}