The normal situation is to have the class declaration in a header file, all the class function definitions in a .cpp file, then a file containing main(). This better than having 100's of lines of code in one file
If you are using an IDE, you can use the class wizard to create the files, it creates skeleton of the code also.
The IDE should be able to create function stubs in the .cpp file when you declare in the header file.
I'm not going to read 340 lines of code, but to answer your original question:
1 2 3 4 5 6
int* SomeFunc() // Just use the int* type as your return type.
{
int* MyPointer = newint[ArraySize];
// Do something with MyPointer;
return MyPointer; // Just remember to delete the array somewhere else.
}
Wait... reading through some of the 340 lines of code I see that x is not a pointer or array. You've defined it as a plain old int on line 19. You need to define it as int* if you want it to be an array. A change like that will require some work for you to change all of the instances of x, to an array.
In the constructor, allocate the arraysize for x with the new[] keyword.