Compiling a Single C or C++ File

See Also 

Select the file in the Projects window, Files window, or Editor window, and press F9 or choose Run > Compile File.

See also
C and C++ Building Tasks: Quick Reference
Building a C or C++ Project

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.