Compiler Error C2289
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Compiler Error C2289

Error Message

same type qualifier used more than once

A type declaration or definition uses a type qualifier (const, volatile, signed, or unsigned) more than once, causing an error under ANSI compatibility (/Za).

The following sample generates C2286:

// C2289.cpp
// compile with: /Za /c
volatile volatile int i;   // C2289
volatile int j;   // OK
© 2015 Microsoft