ok ive tryed everything and read the error code and i dont get it could you help me ok heres my code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
// old test.cpp : main project file.
#include "stdafx.h"
#include <iostream>
using namespace std;
Findage(unsigned momage - unsigned urage)
int main()
{
unsigned age;
unsigned momage;
unsigned urage;
unsigned total;
cout << "how old are you?\n";
cout << ":";
cin >> age;
if (age > 30)
cout << "wow your soo old!\n";
if (age < 18)
cout << "wow your young\n";
if (age > 18)
cout << "wow if your a female i want to tap you =)";
cout << "okay now lets subtract ages from ur mom";
cin >> momage;
cout << "how old are you?";
cin >> urage;
total = Findage(momage, - urage)
cin.get();
cin.get();
return 0;
}
Findage(unsigned momage, - unsigned urage)
{
cin.get();
unsigned momage, - unsigned urage;
}
|
ERROR CODE:
------ Build started: Project: old test, Configuration: Debug Win32 ------
old test.cpp
old test.cpp(7): error C2143: syntax error : missing ',' before '-'
old test.cpp(9): error C2144: syntax error : 'int' should be preceded by ';'
old test.cpp(9): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
old test.cpp(40): warning C4146: unary minus operator applied to unsigned type, result still unsigned
old test.cpp(40): error C2660: 'Findage' : function does not take 2 arguments
old test.cpp(42): error C2146: syntax error : missing ';' before identifier 'cin'
old test.cpp(47): error C2059: syntax error : '-'
old test.cpp(49): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
old test.cpp(52): error C2082: redefinition of formal parameter 'momage'
old test.cpp(52): error C2059: syntax error : '-'
old test.cpp(55): warning C4508: 'Findage' : function should return a value; 'void' return type assumed
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========