Error: Return Statement with no value, in function returning 'int' (-fpermissive)

Hey Guys

I have started coding a simple game but when compiling after a bit of coding but I keep getting the error: Return Statement with no value, in function returning 'int' (-fpermissive)

Here is my code so far:
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
#include <iostream>
#include <string>


using namespace std;

bool running = 1;

int userInput = 0;

int playerInfo[2];

void titleFunc();

int main()
{
    void titleFunc(); {
    cout << "\t\t\t\t---Xeon---\n\n\n";
    cout << "\t\t\t\t   1: Play\n";

    cin >> userInput;
    if(userInput == 1) {
            void newGameFunc(); {
            cout << "Welcome to Xeon! An unexlored world full of adventurous paths and dangerous creatures!\n";
            cout << "I am Zolo... The DragonBorn!\n";
            cout << "Since you are a new comer to Xeon... could you please tell me a little about yourself?\n";
            cout << "Are you a boy or a girl?\n 1: Boy\n 2: Girl\n";
            cin >> userInput;
            playerInfo[0] = userInput;

            cout << "And what kind of person are you?\n 1: Warrior\n 2: Archer\n 3: Thief\n 4: Scout\n 5: Mist\n";

    cin >> userInput;

    playerInfo[1] = userInput;

            }

    }
    else {
        running = 0;
    }
     return;
}

    while (running) {

    }
    return 0;
}


Please help me!
Here

1
2
3
4
    else {
        running = 0;
    }
     return;


place any value in the return statement.
Topic archived. No new replies allowed.