+ (plus sign)

Applies to C++

Purpose

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

Syntax


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 References

Compiler Command Line Options
sourcetype IBM Copyright 2003