BUT when i run it , it gives me this error --> redefinition of 'int main()' what does this mean and what do i have to fix?
Expand|Select|Wrap|Line Numbers
- #include <iostream>
- using namespace std;
- int myNumbers(int a)
- {
- return a % 7;
- }
- void myFuction(string);
- int main()
- {
- int a;
- cout << "give a number between 0-6: \n";
- cin >> a;
- cout << "the result is " << myNumbers(a);
- }
- int main()
- {
- myFuction("sunday");
- myFuction("monday");
- myFuction("tuesday");
- myFuction("thursady");
- myFuction("wendsday");
- myFuction("friday");
- myFuction("saturday");
- return 0;
- cout << "then day is:" << myFunction();
- }