-+ (plus sign)

C++ only

Description

Compiles any file, filename.nnn, as a C++ language file, where nnn is any suffix other than .a, .o, .so, .Sor .s.

Syntax

Read syntax diagramSkip visual syntax diagram>>- -+ --------------------------------------------------------><

Notes

If you do not use the -+ option, files must have a suffix of .C (uppercase C), .cc, .cp, .cpp, .cxx, or .c++ to be compiled as a C++ file. If you compile files with suffix .c (lowercase c) without specifying -+, the files are compiled as a C language file.

The -+ option should not be used together with the -qsourcetype option.

Example

To compile the file myprogram.cplspls as a C++ source file, enter:

 xlc++ -+ myprogram.cplspls 

Related information