I am writing a small program in C++ and I need some help.
#include "iostream"
#include "string.h"
using namespace std;
void main(){
string sman;
cout << "Are you there? \n \n";
cin >> sman;
if(sman == "yes" || sman == "Yes"){
cout << "Screw that! \n \n";
main();
}
if(sman == "no" || sman == "No"){
cout << "Then my name is Pancaker The Random. \n \n";
main();
}
}
I am using Xcode and get the following error when I compile:
error: '::main' must return 'int'
Location line 6