As the name suggested. I would like to have something like:
sublime ./My_project/my_example.cpp
Then it opens the my_example.cpp in SublimeText for me.
Everything is explained here.
Basically you just need to create a symbolic link (ln -s) somewhere in your path and make it point to the "subl" (not "sublime") executable.
I'm not sure what SublimeText is, but if it is an app bundle you can do:
$ open -a SublimeText.app ./My_project/my_example.cpp
You can do a few other things if you really want it to be exactly the syntax you suggested:
$ alias sublime='open -a SublimeText.app'
enter that in a terminal, or add it to your ~/.profile.
If you install Sublime Text 3 via homebrew (cask, as explained here) then it will create sublime symlink for you automatically.