so i wrote this code and test it on Visual studio and it did work, but when i try to test it on the codewars's ide it brings up the following errors:
main.cpp:9:5: error: conflicting types for 'main'
int main(int, const char *[]) {
^
./solution.cpp:3:5: note: previous definition is here
int main()
^
1 error generated.
Can you please help me, it is something about the syntax or else?
#include <iostream>
using namespace std;
int main()
{
int x = 1;
int u = 0, g = 0, c = 0;
cout << "quanti anni ha l'uomo? (alla donna non si chiede)" << endl;
cin >> u;
while (x <= u)
{
if (x == 1)
{
g = 15;
c = 15;
}
if (x == 2) {
g += 9;
c += 9;
}
if (x >= 3) {
g += 4;
c += 5;
}
x++;
}
cout << "cane " << c << endl;
cout << "gatto " << g;
return 0;
}
// TODO: Replace examples and use TDD by writing your own tests
Describe(any_group_name_you_want)
{
It(should_do_something)
{
Assert::That("some value", Equals("another value"));
}
};