In the Windows command prompt, I can type notepad helloworld.cpp
which will then create a .cpp file with the name helloworld and open up Notepad for me.
Is there a similar function for Mac Terminal, preferably with Textmate or Textedit?
I'm running Mac OS X Lion 10.7, with Xcode developers tool.
There are plenty of ways. Try:
vi <filename you want to save or open.cpp>
,pico
,Open /Applications/TextEdit.app <filename>
.