I am creating a class called SelectionPage. Which essentially is a set of menues.
However, when i compile the code, the compiler gives me the following error:
g++ C_Main.cpp C_HomePage.cpp C_SelectionPage.cpp C_MemberManagement.cpp -o Project
C_SelectionPage.cpp:9:104: error: expected initializer before ‘SelectionPage’
make: *** [Project] Error 1
Here is The first few lines of C_SelectionPage.cpp:
#include "H_SelectionPage.h"
//Constructor for the SelectionPage class
//It assigns "managing" which decides if the user
//is a manager or not.
SelectionPage::SelectionPage(
int newPoints,
string newManager,
string newLoginName,
string MemberFile)
SelectionPage(
int newPoints,
string newManager,
string newLoginName,
string MemberFile)
{
points = newPoints;
manager = newManager;
loginName = newLoginName;
flatMemberList.clear();
//Create Object Governing Flat Members.
memberList = MemberManagement temp(MemberFile);
}
And here is the declaration of the constructor in the header file:
SelectionPage(
int newPoints,
string newManager,
string newLoginName,
string MemberFile);
Could someone please explain to me why i am getting an error?
Thanks in advance.