Executable statements must be inside a function; executable statements outside of a function are not allowed!

Those five lines of executable code between the declaration of st1 and the main() function are not in a function. Either create a function for them or place them in the main() function.

Also:
Use code tags!

You are implicitly declaring main to return int, but then you do not return anything. Declare main as:int main()
and then make the last statement in main():return 0;
That tells the operating system that your program ran successfully. If you need to exit the program because an error kept it from running successfully, then return an non-zero value. That is how things work.

Executable statements must be inside a function; executable statements outside of a function are not allowed!

Those five lines of executable code between the declaration of st1 and the main() function are not in a function. Either create a function for them or place them in the main() function.

Also:
Use code tags!

You are implicitly declaring main to return int, but then you do not return anything. Declare main as:int main()
and then make the last statement in main():return 0;
That tells the operating system that your program ran successfully. If you need to exit the program because an error kept it from running successfully, then return an non-zero value. That is how things work.