In this Problem, we are going to learn how to write partial judge problem.
We will use Code::Blocks to demonstrate
First, create a new project (go to File->New->Project)
Select Console Application and go
Select a language you should be using
Name the project, and select where to store it
Usually you do not need to change anything here, just click Finish
Now you have create a project
Now we have to add files into the project, to let codeblocks know which files to compile
Choose Add files... in the Project tab
Add the files you downloaded from the Online Judge (remember to rename header file to function.h)
And OK
And you should see the files in their respective folders in the bar on the left hand side (main.cpp is the default file created when you created a project)
Search for the functions you have to write (usually in function.h).
For example, in this problem, you will have to implement these 4 functions: setScore(int), setName(string), getScore(), getName()
IMPORTANT: Do not implement the functions in header, or copy the whole header to another file (you will see why later)
Instead, create a new cpp file, and write the implementation there. Remember to #include "function.h"
For example, writing a class function, the format should be [type] [class]::[function name]
After you finished, you can press build and run as usual, and it should work
To submit the code to Online Judge, just select all the code you wrote in the cpp files, and copy-paste it to the Submit section (no deleting or commenting needed)
To open a project that is already created, select File->Open...
Find the .cbp file, it should be at the place you chose when you were naming the project
Another way
1. copy the h file to the cpp file
2. write until the cpp can work
3. copy the upper part from the top until the original c++ part
4. Submit
Given an integer, then a string
Output a string, then an integer