Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 676 Bytes

fatal-error-c1311.md

File metadata and controls

22 lines (17 loc) · 676 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Fatal Error C1311
Fatal Error C1311
11/04/2016
C1311
C1311
6590a06c-ce9d-4f17-8f62-c809343143b8

Fatal Error C1311

COFF format cannot statically initialize 'var' with number byte(s) of an address

An address whose value is not known at compile time cannot be statically assigned to a variable whose type has storage of less than four bytes.

This error can occur on code that is otherwise valid C++.

The following example shows one condition that might cause C1311.

char c = (char)"Hello, world";   // C1311
char *d = (char*)"Hello, world";   // OK