Skip to main content
deleted 2 characters in body
Source Link
nneonneo
  • 12.6k
  • 8
  • 31
  • 52
In file included from /usr/include/c++/4.9/iosfwd:39:0, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/c++/4.9/bits/stringfwd.h:62:33: error: aggregate ‘std::basic_string<char> std::string’ has incomplete type and cannot be defined typedef basic_string<char> string; ^ /usr/include/c++/4.9/bits/stringfwd.h:68:33: error: aggregate ‘std::basic_string<wchar_t> std::wstring’ has incomplete type and cannot be defined typedef basic_string<wchar_t> wstring; ^ /usr/include/c++/4.9/bits/stringfwd.h:78:34: error: aggregate ‘std::basic_string<char16_t> std::u16string’ has incomplete type and cannot be defined typedef basic_string<char16_t> u16string; ^ /usr/include/c++/4.9/bits/stringfwd.h:81:34: error: aggregate ‘std::basic_string<char32_t> std::u32string’ has incomplete type and cannot be defined typedef basic_string<char32_t> u32string; ^ In file included from /usr/include/wchar.h:36:0, from /usr/include/c++/4.9/cwchar:44, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/stdio.h:48:25: error: aggregate ‘_IO_FILE FILE’ has incomplete type and cannot be defined typedef struct _IO_FILE FILE; ^ /usr/include/stdio.h:64:25: error: aggregate ‘_IO_FILE __FILE’ has incomplete type and cannot be defined typedef struct _IO_FILE __FILE; ^ In file included from /usr/include/c++/4.9/cwchar:44:0, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/wchar.h:106:9: error: ‘__mbstate_t’ does not name a type typedef __mbstate_t mbstate_t; ^ /usr/include/wchar.h:151:38: error: ‘size_t’ is not a type const wchar_t *__restrict __src, size_t __n) ^ /usr/include/wchar.h:159:38: error: ‘size_t’ is not a type const wchar_t *__restrict __src, size_t __n) ^ /usr/include/wchar.h:166:63: error: ‘size_t’ is not a type extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) ^ /usr/include/wchar.h:176:4: error: ‘size_t’ is not a type size_t __n) __THROW; ^ In file included from /usr/include/wchar.h:180:0, from /usr/include/c++/4.9/cwchar:44, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/xlocale.h:42:9: error: ‘__locale_t’ does not name a type typedef __locale_t locale_t; ^ In file included from /usr/include/c++/4.9/cwchar:44:0, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/wchar.h:183:5: error: ‘__locale_t’ is not a type __locale_t __loc) __THROW; ^ /usr/include/wchar.h:186:6: error: ‘size_t’ is not a type size_t __n, __locale_t __loc) __THROW; ^ /usr/include/wchar.h:186:18: error: ‘__locale_t’ is not a type size_t __n, __locale_t __loc) __THROW; ^ /usr/include/wchar.h:196:8: error: ‘size_t’ does not name a type extern size_t wcsxfrm (wchar_t *__restrict __s1, ^ /usr/include/wchar.h:207:9: error: ‘__locale_t’ is not a type __locale_t __loc) __THROW; ^ /usr/include/wchar.h:212:8: error: ‘size_t’ does not name a type extern size_t wcsxfrm_l (wchar_t *__s1, const wchar_t *__s2, ^ /usr/include/wchar.h:252:8: error: ‘size_t’ does not name a type extern size_t wcscspn (const wchar_t *__wcs, const wchar_t *__reject) ^ /usr/include/wchar.h:256:8: error: ‘size_t’ does not name a type extern size_t wcsspn (const wchar_t *__wcs, const wchar_t *__accept) ^ /usr/include/wchar.h:287:8: error: ‘size_t’ does not name a type extern size_t wcslen (const wchar_t *__s) __THROW __attribute_pure__; ^ /usr/include/wchar.h:306:8: error: ‘size_t’ does not name a type extern size_t wcsnlen (const wchar_t *__s, size_t __maxlen) ^ [SNIP] 

[SNIP]

/usr/include/c++/4.9/bits/fstream.tcc:934:35: error: ‘cur’ is not a member of ‘std::ios_base’ __testvalid = this->seekoff(0, ios_base::cur, _M_mode) ^ /usr/include/c++/4.9/bits/fstream.tcc:934:50: error: ‘_M_mode’ was not declared in this scope __testvalid = this->seekoff(0, ios_base::cur, _M_mode) ^ /usr/include/c++/4.9/bits/fstream.tcc:941:25: error: ‘_M_state_last’ was not declared in this scope + _M_codecvt->length(_M_state_last, _M_ext_buf, ^ /usr/include/c++/4.9/bits/fstream.tcc:944:15: error: ‘streamsize’ does not name a type const streamsize __remainder = _M_ext_end - _M_ext_next; ^ /usr/include/c++/4.9/bits/fstream.tcc:945:13: error: ‘__remainder’ was not declared in this scope if (__remainder) ^ /usr/include/c++/4.9/bits/fstream.tcc:949:35: error: ‘__remainder’ was not declared in this scope _M_ext_end = _M_ext_buf + __remainder; ^ /usr/include/c++/4.9/bits/fstream.tcc:951:25: error: ‘_M_state_cur’ was not declared in this scope _M_state_last = _M_state_cur = _M_state_beg; ^ /usr/include/c++/4.9/bits/fstream.tcc:951:40: error: ‘_M_state_beg’ was not declared in this scope _M_state_last = _M_state_cur = _M_state_beg; ^ /usr/include/c++/4.9/bits/fstream.tcc:960:2: error: ‘_M_codecvt’ was not declared in this scope _M_codecvt = _M_codecvt_tmp; ^ /usr/include/c++/4.9/bits/fstream.tcc:960:15: error: ‘_M_codecvt_tmp’ was not declared in this scope _M_codecvt = _M_codecvt_tmp; ^ /usr/include/c++/4.9/bits/fstream.tcc:962:2: error: ‘_M_codecvt’ was not declared in this scope _M_codecvt = 0; ^ 
In file included from /usr/include/c++/4.9/iosfwd:39:0, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/c++/4.9/bits/stringfwd.h:62:33: error: aggregate ‘std::basic_string<char> std::string’ has incomplete type and cannot be defined typedef basic_string<char> string; ^ /usr/include/c++/4.9/bits/stringfwd.h:68:33: error: aggregate ‘std::basic_string<wchar_t> std::wstring’ has incomplete type and cannot be defined typedef basic_string<wchar_t> wstring; ^ /usr/include/c++/4.9/bits/stringfwd.h:78:34: error: aggregate ‘std::basic_string<char16_t> std::u16string’ has incomplete type and cannot be defined typedef basic_string<char16_t> u16string; ^ /usr/include/c++/4.9/bits/stringfwd.h:81:34: error: aggregate ‘std::basic_string<char32_t> std::u32string’ has incomplete type and cannot be defined typedef basic_string<char32_t> u32string; ^ In file included from /usr/include/wchar.h:36:0, from /usr/include/c++/4.9/cwchar:44, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/stdio.h:48:25: error: aggregate ‘_IO_FILE FILE’ has incomplete type and cannot be defined typedef struct _IO_FILE FILE; ^ /usr/include/stdio.h:64:25: error: aggregate ‘_IO_FILE __FILE’ has incomplete type and cannot be defined typedef struct _IO_FILE __FILE; ^ In file included from /usr/include/c++/4.9/cwchar:44:0, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/wchar.h:106:9: error: ‘__mbstate_t’ does not name a type typedef __mbstate_t mbstate_t; ^ /usr/include/wchar.h:151:38: error: ‘size_t’ is not a type const wchar_t *__restrict __src, size_t __n) ^ /usr/include/wchar.h:159:38: error: ‘size_t’ is not a type const wchar_t *__restrict __src, size_t __n) ^ /usr/include/wchar.h:166:63: error: ‘size_t’ is not a type extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) ^ /usr/include/wchar.h:176:4: error: ‘size_t’ is not a type size_t __n) __THROW; ^ In file included from /usr/include/wchar.h:180:0, from /usr/include/c++/4.9/cwchar:44, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/xlocale.h:42:9: error: ‘__locale_t’ does not name a type typedef __locale_t locale_t; ^ In file included from /usr/include/c++/4.9/cwchar:44:0, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/wchar.h:183:5: error: ‘__locale_t’ is not a type __locale_t __loc) __THROW; ^ /usr/include/wchar.h:186:6: error: ‘size_t’ is not a type size_t __n, __locale_t __loc) __THROW; ^ /usr/include/wchar.h:186:18: error: ‘__locale_t’ is not a type size_t __n, __locale_t __loc) __THROW; ^ /usr/include/wchar.h:196:8: error: ‘size_t’ does not name a type extern size_t wcsxfrm (wchar_t *__restrict __s1, ^ /usr/include/wchar.h:207:9: error: ‘__locale_t’ is not a type __locale_t __loc) __THROW; ^ /usr/include/wchar.h:212:8: error: ‘size_t’ does not name a type extern size_t wcsxfrm_l (wchar_t *__s1, const wchar_t *__s2, ^ /usr/include/wchar.h:252:8: error: ‘size_t’ does not name a type extern size_t wcscspn (const wchar_t *__wcs, const wchar_t *__reject) ^ /usr/include/wchar.h:256:8: error: ‘size_t’ does not name a type extern size_t wcsspn (const wchar_t *__wcs, const wchar_t *__accept) ^ /usr/include/wchar.h:287:8: error: ‘size_t’ does not name a type extern size_t wcslen (const wchar_t *__s) __THROW __attribute_pure__; ^ /usr/include/wchar.h:306:8: error: ‘size_t’ does not name a type extern size_t wcsnlen (const wchar_t *__s, size_t __maxlen) ^ [SNIP] /usr/include/c++/4.9/bits/fstream.tcc:934:35: error: ‘cur’ is not a member of ‘std::ios_base’ __testvalid = this->seekoff(0, ios_base::cur, _M_mode) ^ /usr/include/c++/4.9/bits/fstream.tcc:934:50: error: ‘_M_mode’ was not declared in this scope __testvalid = this->seekoff(0, ios_base::cur, _M_mode) ^ /usr/include/c++/4.9/bits/fstream.tcc:941:25: error: ‘_M_state_last’ was not declared in this scope + _M_codecvt->length(_M_state_last, _M_ext_buf, ^ /usr/include/c++/4.9/bits/fstream.tcc:944:15: error: ‘streamsize’ does not name a type const streamsize __remainder = _M_ext_end - _M_ext_next; ^ /usr/include/c++/4.9/bits/fstream.tcc:945:13: error: ‘__remainder’ was not declared in this scope if (__remainder) ^ /usr/include/c++/4.9/bits/fstream.tcc:949:35: error: ‘__remainder’ was not declared in this scope _M_ext_end = _M_ext_buf + __remainder; ^ /usr/include/c++/4.9/bits/fstream.tcc:951:25: error: ‘_M_state_cur’ was not declared in this scope _M_state_last = _M_state_cur = _M_state_beg; ^ /usr/include/c++/4.9/bits/fstream.tcc:951:40: error: ‘_M_state_beg’ was not declared in this scope _M_state_last = _M_state_cur = _M_state_beg; ^ /usr/include/c++/4.9/bits/fstream.tcc:960:2: error: ‘_M_codecvt’ was not declared in this scope _M_codecvt = _M_codecvt_tmp; ^ /usr/include/c++/4.9/bits/fstream.tcc:960:15: error: ‘_M_codecvt_tmp’ was not declared in this scope _M_codecvt = _M_codecvt_tmp; ^ /usr/include/c++/4.9/bits/fstream.tcc:962:2: error: ‘_M_codecvt’ was not declared in this scope _M_codecvt = 0; ^ 
In file included from /usr/include/c++/4.9/iosfwd:39:0, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/c++/4.9/bits/stringfwd.h:62:33: error: aggregate ‘std::basic_string<char> std::string’ has incomplete type and cannot be defined typedef basic_string<char> string; ^ /usr/include/c++/4.9/bits/stringfwd.h:68:33: error: aggregate ‘std::basic_string<wchar_t> std::wstring’ has incomplete type and cannot be defined typedef basic_string<wchar_t> wstring; ^ /usr/include/c++/4.9/bits/stringfwd.h:78:34: error: aggregate ‘std::basic_string<char16_t> std::u16string’ has incomplete type and cannot be defined typedef basic_string<char16_t> u16string; ^ /usr/include/c++/4.9/bits/stringfwd.h:81:34: error: aggregate ‘std::basic_string<char32_t> std::u32string’ has incomplete type and cannot be defined typedef basic_string<char32_t> u32string; ^ In file included from /usr/include/wchar.h:36:0, from /usr/include/c++/4.9/cwchar:44, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/stdio.h:48:25: error: aggregate ‘_IO_FILE FILE’ has incomplete type and cannot be defined typedef struct _IO_FILE FILE; ^ /usr/include/stdio.h:64:25: error: aggregate ‘_IO_FILE __FILE’ has incomplete type and cannot be defined typedef struct _IO_FILE __FILE; ^ In file included from /usr/include/c++/4.9/cwchar:44:0, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/wchar.h:106:9: error: ‘__mbstate_t’ does not name a type typedef __mbstate_t mbstate_t; ^ /usr/include/wchar.h:151:38: error: ‘size_t’ is not a type const wchar_t *__restrict __src, size_t __n) ^ /usr/include/wchar.h:159:38: error: ‘size_t’ is not a type const wchar_t *__restrict __src, size_t __n) ^ /usr/include/wchar.h:166:63: error: ‘size_t’ is not a type extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) ^ /usr/include/wchar.h:176:4: error: ‘size_t’ is not a type size_t __n) __THROW; ^ In file included from /usr/include/wchar.h:180:0, from /usr/include/c++/4.9/cwchar:44, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/xlocale.h:42:9: error: ‘__locale_t’ does not name a type typedef __locale_t locale_t; ^ In file included from /usr/include/c++/4.9/cwchar:44:0, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/wchar.h:183:5: error: ‘__locale_t’ is not a type __locale_t __loc) __THROW; ^ /usr/include/wchar.h:186:6: error: ‘size_t’ is not a type size_t __n, __locale_t __loc) __THROW; ^ /usr/include/wchar.h:186:18: error: ‘__locale_t’ is not a type size_t __n, __locale_t __loc) __THROW; ^ /usr/include/wchar.h:196:8: error: ‘size_t’ does not name a type extern size_t wcsxfrm (wchar_t *__restrict __s1, ^ /usr/include/wchar.h:207:9: error: ‘__locale_t’ is not a type __locale_t __loc) __THROW; ^ /usr/include/wchar.h:212:8: error: ‘size_t’ does not name a type extern size_t wcsxfrm_l (wchar_t *__s1, const wchar_t *__s2, ^ /usr/include/wchar.h:252:8: error: ‘size_t’ does not name a type extern size_t wcscspn (const wchar_t *__wcs, const wchar_t *__reject) ^ /usr/include/wchar.h:256:8: error: ‘size_t’ does not name a type extern size_t wcsspn (const wchar_t *__wcs, const wchar_t *__accept) ^ /usr/include/wchar.h:287:8: error: ‘size_t’ does not name a type extern size_t wcslen (const wchar_t *__s) __THROW __attribute_pure__; ^ /usr/include/wchar.h:306:8: error: ‘size_t’ does not name a type extern size_t wcsnlen (const wchar_t *__s, size_t __maxlen) ^ 

[SNIP]

/usr/include/c++/4.9/bits/fstream.tcc:934:35: error: ‘cur’ is not a member of ‘std::ios_base’ __testvalid = this->seekoff(0, ios_base::cur, _M_mode) ^ /usr/include/c++/4.9/bits/fstream.tcc:934:50: error: ‘_M_mode’ was not declared in this scope __testvalid = this->seekoff(0, ios_base::cur, _M_mode) ^ /usr/include/c++/4.9/bits/fstream.tcc:941:25: error: ‘_M_state_last’ was not declared in this scope + _M_codecvt->length(_M_state_last, _M_ext_buf, ^ /usr/include/c++/4.9/bits/fstream.tcc:944:15: error: ‘streamsize’ does not name a type const streamsize __remainder = _M_ext_end - _M_ext_next; ^ /usr/include/c++/4.9/bits/fstream.tcc:945:13: error: ‘__remainder’ was not declared in this scope if (__remainder) ^ /usr/include/c++/4.9/bits/fstream.tcc:949:35: error: ‘__remainder’ was not declared in this scope _M_ext_end = _M_ext_buf + __remainder; ^ /usr/include/c++/4.9/bits/fstream.tcc:951:25: error: ‘_M_state_cur’ was not declared in this scope _M_state_last = _M_state_cur = _M_state_beg; ^ /usr/include/c++/4.9/bits/fstream.tcc:951:40: error: ‘_M_state_beg’ was not declared in this scope _M_state_last = _M_state_cur = _M_state_beg; ^ /usr/include/c++/4.9/bits/fstream.tcc:960:2: error: ‘_M_codecvt’ was not declared in this scope _M_codecvt = _M_codecvt_tmp; ^ /usr/include/c++/4.9/bits/fstream.tcc:960:15: error: ‘_M_codecvt_tmp’ was not declared in this scope _M_codecvt = _M_codecvt_tmp; ^ /usr/include/c++/4.9/bits/fstream.tcc:962:2: error: ‘_M_codecvt’ was not declared in this scope _M_codecvt = 0; ^ 
everything's better with C++11
Source Link
nneonneo
  • 12.6k
  • 8
  • 31
  • 52

911,105126.4495 9,105.44 2,359.37 1,645.94 266.88 points

In file included from /usr/include/c++/4.9/iosfwd:39:0, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/c++/4.9/bits/stringfwd.h:62:33: error: aggregate ‘std::basic_string<char> std::string’ has incomplete type and cannot be defined typedef basic_string<char> string; ^ /usr/include/c++/4.9/bits/stringfwd.h:68:33: error: aggregate ‘std::basic_string<wchar_t> std::wstring’ has incomplete type and cannot be defined typedef basic_string<wchar_t> wstring; ^ /usr/include/c++/4.9/bits/stringfwd.h:78:34: error: aggregate ‘std::basic_string<char16_t> std::u16string’ has incomplete type and cannot be defined typedef basic_string<char16_t> u16string; ^ /usr/include/c++/4.9/bits/stringfwd.h:81:34: error: aggregate ‘std::basic_string<char32_t> std::u32string’ has incomplete type and cannot be defined typedef basic_string<char32_t> u32string; ^ In file included from /usr/include/wchar.h:36:0, from /usr/include/c++/4.9/cwchar:44, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/stdio.h:48:25: error: aggregate ‘_IO_FILE FILE’ has incomplete type and cannot be defined typedef struct _IO_FILE FILE; ^ /usr/include/stdio.h:64:25: error: aggregate ‘_IO_FILE __FILE’ has incomplete type and cannot be defined typedef struct _IO_FILE __FILE; ^ In file included from /usr/include/c++/4.9/cwchar:44:0, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/wchar.h:106:9: error: ‘__mbstate_t’ does not name a type typedef __mbstate_t mbstate_t; ^ /usr/include/wchar.h:151:38: error: ‘size_t’ is not a type const wchar_t *__restrict __src, size_t __n) ^ /usr/include/wchar.h:159:38: error: ‘size_t’ is not a type const wchar_t *__restrict __src, size_t __n) ^ /usr/include/wchar.h:166:63: error: ‘size_t’ is not a type extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) ^ /usr/include/wchar.h:176:4: error: ‘size_t’ is not a type size_t __n) __THROW; ^ In file included from /usr/include/wchar.h:180:0, from /usr/include/c++/4.9/cwchar:44, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/xlocale.h:42:9: error: ‘__locale_t’ does not name a type typedef __locale_t locale_t; ^ In file included from /usr/include/c++/4.9/cwchar:44:0, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/wchar.h:183:5: error: ‘__locale_t’ is not a type __locale_t __loc) __THROW; ^ [SNIP...] /usr/include/c++/4wchar.9h:186:6: error: ‘size_t’ is not a type size_t __n, __locale_t __loc) __THROW; ^ /bitsusr/fstreaminclude/wchar.tcch:903186:818: error: ‘traits_type’‘__locale_t’ is not a classtype  or namespace size_t __n, __locale_t __loc) __THROW; if (traits_type ^ /usr/include/wchar.h:196:8:eq_int_type(__tmp, traits_type:error:eof ‘size_t’ does not name a type extern size_t wcsxfrm ()))wchar_t *__restrict __s1, ^ /usr/include/c++/4.9/bits/fstreamwchar.tcc:903:33: error: ‘__tmp’ was not declared in this scope if (traits_type::eq_int_type(__tmp, traits_typeh:207:eof())) ^ /usr/include/c++/4.9/bits/fstream.tcc:903:40: error: ‘traits_type’‘__locale_t’ is not a class or namespace  if (traits_type::eq_int_type(__tmp, traits_type::eof()))type   __locale_t __loc) __THROW;  ^ /usr/include/c++/4.9/bits/fstream.tcc: In member function ‘virtual void std::basic_filebuf<_CharT, _Traits>::imbue(const std::locale&)’: /usr/include/c++/4.9/bits/fstreamwchar.tcch:916212:138: error: ‘__codecvt_type’‘size_t’ does not name a type   extern size_t wcsxfrm_l (wchar_t *__s1, const __codecvt_type* _M_codecvt_tmp =wchar_t 0;*__s2,   ^ /usr/include/c++/4.9/bits/fstreamwchar.tcch:917252:388: error: ‘std::basic_filebuf<_CharT, _Traits>::__codecvt_type’‘size_t’ cannotdoes appearnot inname a constant-expressiontype extern size_t wcscspn (const wchar_t *__wcs, ifconst (__builtin_expect(has_facet<__codecvt_type>(__loc),wchar_t true)*__reject)   ^ /usr/include/c++/4.9/bits/fstreamwchar.tcch:918256:28: error: ‘_M_codecvt_tmp’‘size_t’ wasdoes not declared inname thisa scopetype extern _M_codecvt_tmpsize_t =wcsspn &use_facet<__codecvt_type>(__loc); ^ /usr/include/c++/4.9/bits/fstream.tcc:918:30:const error:wchar_t ‘std::basic_filebuf<_CharT*__wcs, _Traits>::__codecvt_type’ cannot appear in a constant-expression _M_codecvt_tmpconst =wchar_t &use_facet<__codecvt_type>(__loc*__accept);   ^ /usr/include/c++/4.9/bits/fstreamwchar.tcch:924287:258: error: ‘_M_codecvt’‘size_t’ wasdoes not declared inname thisa scopetype   extern size_t &&wcslen __check_facet(_M_codecvt).encoding()const ==wchar_t -1*__s)  __THROW __attribute_pure__;  ^ /usr/include/c++/4.9/bits/fstreamwchar.tcch:932306:138: error: ‘_M_codecvt_tmp’‘size_t’ wasdoes not declared inname thisa scopetype   extern size_t ifwcsnlen (_M_codecvt_tmp const wchar_t *__s, size_t __maxlen)  ^ [SNIP] /usr/include/c++/4.9/bits/fstream.tcc:934:35: error: ‘cur’ is not a member of ‘std::ios_base’ __testvalid = this->seekoff(0, ios_base::cur, _M_mode) ^ /usr/include/c++/4.9/bits/fstream.tcc:934:50: error: ‘_M_mode’ was not declared in this scope __testvalid = this->seekoff(0, ios_base::cur, _M_mode) ^ /usr/include/c++/4.9/bits/fstream.tcc:941:25: error: ‘_M_state_last’ was not declared in this scope + _M_codecvt->length(_M_state_last, _M_ext_buf, ^ /usr/include/c++/4.9/bits/fstream.tcc:944:15: error: ‘streamsize’ does not name a type const streamsize __remainder = _M_ext_end - _M_ext_next; ^ /usr/include/c++/4.9/bits/fstream.tcc:945:13: error: ‘__remainder’ was not declared in this scope if (__remainder) ^ /usr/include/c++/4.9/bits/fstream.tcc:949:35: error: ‘__remainder’ was not declared in this scope _M_ext_end = _M_ext_buf + __remainder; ^ /usr/include/c++/4.9/bits/fstream.tcc:951:25: error: ‘_M_state_cur’ was not declared in this scope _M_state_last = _M_state_cur = _M_state_beg; ^ /usr/include/c++/4.9/bits/fstream.tcc:951:40: error: ‘_M_state_beg’ was not declared in this scope _M_state_last = _M_state_cur = _M_state_beg; ^ /usr/include/c++/4.9/bits/fstream.tcc:960:2: error: ‘_M_codecvt’ was not declared in this scope _M_codecvt = _M_codecvt_tmp; ^ /usr/include/c++/4.9/bits/fstream.tcc:960:15: error: ‘_M_codecvt_tmp’ was not declared in this scope _M_codecvt = _M_codecvt_tmp; ^ /usr/include/c++/4.9/bits/fstream.tcc:962:2: error: ‘_M_codecvt’ was not declared in this scope _M_codecvt = 0; ^ 

On my Ubuntu machine, g++-4.9, 901,439 glorious bytes of errors with a filename of g++-4.9 -std=c++11 -c a.C. Only 33 generates 1,101,568 glorious bytes of code (with typo)errors, for a score of 9014391101568/33/3 = 911,105126.4495.

9,105.44 2,359.37 1,645.94 266.88 points

In file included from /usr/include/c++/4.9/iosfwd:39:0, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/c++/4.9/bits/stringfwd.h:62:33: error: aggregate ‘std::basic_string<char> std::string’ has incomplete type and cannot be defined typedef basic_string<char> string; ^ /usr/include/c++/4.9/bits/stringfwd.h:68:33: error: aggregate ‘std::basic_string<wchar_t> std::wstring’ has incomplete type and cannot be defined typedef basic_string<wchar_t> wstring; ^ In file included from /usr/include/wchar.h:36:0, from /usr/include/c++/4.9/cwchar:44, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/stdio.h:48:25: error: aggregate ‘_IO_FILE FILE’ has incomplete type and cannot be defined typedef struct _IO_FILE FILE; ^ /usr/include/stdio.h:64:25: error: aggregate ‘_IO_FILE __FILE’ has incomplete type and cannot be defined typedef struct _IO_FILE __FILE; ^ In file included from /usr/include/c++/4.9/cwchar:44:0, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/wchar.h:106:9: error: ‘__mbstate_t’ does not name a type typedef __mbstate_t mbstate_t; ^ /usr/include/wchar.h:151:38: error: ‘size_t’ is not a type const wchar_t *__restrict __src, size_t __n) ^ /usr/include/wchar.h:159:38: error: ‘size_t’ is not a type const wchar_t *__restrict __src, size_t __n) ^ /usr/include/wchar.h:166:63: error: ‘size_t’ is not a type extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) ^ /usr/include/wchar.h:176:4: error: ‘size_t’ is not a type size_t __n) __THROW; ^ In file included from /usr/include/wchar.h:180:0, from /usr/include/c++/4.9/cwchar:44, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/xlocale.h:42:9: error: ‘__locale_t’ does not name a type typedef __locale_t locale_t; ^ In file included from /usr/include/c++/4.9/cwchar:44:0, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/wchar.h:183:5: error: ‘__locale_t’ is not a type __locale_t __loc) __THROW; ^ [SNIP...] /usr/include/c++/4.9/bits/fstream.tcc:903:8: error: ‘traits_type’ is not a class or namespace if (traits_type::eq_int_type(__tmp, traits_type::eof())) ^ /usr/include/c++/4.9/bits/fstream.tcc:903:33: error: ‘__tmp’ was not declared in this scope if (traits_type::eq_int_type(__tmp, traits_type::eof())) ^ /usr/include/c++/4.9/bits/fstream.tcc:903:40: error: ‘traits_type’ is not a class or namespace  if (traits_type::eq_int_type(__tmp, traits_type::eof()))   ^ /usr/include/c++/4.9/bits/fstream.tcc: In member function ‘virtual void std::basic_filebuf<_CharT, _Traits>::imbue(const std::locale&)’: /usr/include/c++/4.9/bits/fstream.tcc:916:13: error: ‘__codecvt_type’ does not name a type   const __codecvt_type* _M_codecvt_tmp = 0;   ^ /usr/include/c++/4.9/bits/fstream.tcc:917:38: error: ‘std::basic_filebuf<_CharT, _Traits>::__codecvt_type’ cannot appear in a constant-expression if (__builtin_expect(has_facet<__codecvt_type>(__loc), true))   ^ /usr/include/c++/4.9/bits/fstream.tcc:918:2: error: ‘_M_codecvt_tmp’ was not declared in this scope _M_codecvt_tmp = &use_facet<__codecvt_type>(__loc); ^ /usr/include/c++/4.9/bits/fstream.tcc:918:30: error: ‘std::basic_filebuf<_CharT, _Traits>::__codecvt_type’ cannot appear in a constant-expression _M_codecvt_tmp = &use_facet<__codecvt_type>(__loc);   ^ /usr/include/c++/4.9/bits/fstream.tcc:924:25: error: ‘_M_codecvt’ was not declared in this scope   && __check_facet(_M_codecvt).encoding() == -1)  ^ /usr/include/c++/4.9/bits/fstream.tcc:932:13: error: ‘_M_codecvt_tmp’ was not declared in this scope   if (_M_codecvt_tmp  ^ /usr/include/c++/4.9/bits/fstream.tcc:934:35: error: ‘cur’ is not a member of ‘std::ios_base’ __testvalid = this->seekoff(0, ios_base::cur, _M_mode) ^ /usr/include/c++/4.9/bits/fstream.tcc:934:50: error: ‘_M_mode’ was not declared in this scope __testvalid = this->seekoff(0, ios_base::cur, _M_mode) ^ /usr/include/c++/4.9/bits/fstream.tcc:941:25: error: ‘_M_state_last’ was not declared in this scope + _M_codecvt->length(_M_state_last, _M_ext_buf, ^ /usr/include/c++/4.9/bits/fstream.tcc:944:15: error: ‘streamsize’ does not name a type const streamsize __remainder = _M_ext_end - _M_ext_next; ^ /usr/include/c++/4.9/bits/fstream.tcc:945:13: error: ‘__remainder’ was not declared in this scope if (__remainder) ^ /usr/include/c++/4.9/bits/fstream.tcc:949:35: error: ‘__remainder’ was not declared in this scope _M_ext_end = _M_ext_buf + __remainder; ^ /usr/include/c++/4.9/bits/fstream.tcc:951:25: error: ‘_M_state_cur’ was not declared in this scope _M_state_last = _M_state_cur = _M_state_beg; ^ /usr/include/c++/4.9/bits/fstream.tcc:951:40: error: ‘_M_state_beg’ was not declared in this scope _M_state_last = _M_state_cur = _M_state_beg; ^ /usr/include/c++/4.9/bits/fstream.tcc:960:2: error: ‘_M_codecvt’ was not declared in this scope _M_codecvt = _M_codecvt_tmp; ^ /usr/include/c++/4.9/bits/fstream.tcc:960:15: error: ‘_M_codecvt_tmp’ was not declared in this scope _M_codecvt = _M_codecvt_tmp; ^ /usr/include/c++/4.9/bits/fstream.tcc:962:2: error: ‘_M_codecvt’ was not declared in this scope _M_codecvt = 0; ^ 

On my Ubuntu machine, g++-4.9, 901,439 glorious bytes of errors with a filename of a.C. Only 33 bytes of code (with typo), for a score of 901439/33/3 = 9,105.44.

11,126.95 9,105.44 2,359.37 1,645.94 266.88 points

In file included from /usr/include/c++/4.9/iosfwd:39:0, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/c++/4.9/bits/stringfwd.h:62:33: error: aggregate ‘std::basic_string<char> std::string’ has incomplete type and cannot be defined typedef basic_string<char> string; ^ /usr/include/c++/4.9/bits/stringfwd.h:68:33: error: aggregate ‘std::basic_string<wchar_t> std::wstring’ has incomplete type and cannot be defined typedef basic_string<wchar_t> wstring; ^ /usr/include/c++/4.9/bits/stringfwd.h:78:34: error: aggregate ‘std::basic_string<char16_t> std::u16string’ has incomplete type and cannot be defined typedef basic_string<char16_t> u16string; ^ /usr/include/c++/4.9/bits/stringfwd.h:81:34: error: aggregate ‘std::basic_string<char32_t> std::u32string’ has incomplete type and cannot be defined typedef basic_string<char32_t> u32string; ^ In file included from /usr/include/wchar.h:36:0, from /usr/include/c++/4.9/cwchar:44, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/stdio.h:48:25: error: aggregate ‘_IO_FILE FILE’ has incomplete type and cannot be defined typedef struct _IO_FILE FILE; ^ /usr/include/stdio.h:64:25: error: aggregate ‘_IO_FILE __FILE’ has incomplete type and cannot be defined typedef struct _IO_FILE __FILE; ^ In file included from /usr/include/c++/4.9/cwchar:44:0, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/wchar.h:106:9: error: ‘__mbstate_t’ does not name a type typedef __mbstate_t mbstate_t; ^ /usr/include/wchar.h:151:38: error: ‘size_t’ is not a type const wchar_t *__restrict __src, size_t __n) ^ /usr/include/wchar.h:159:38: error: ‘size_t’ is not a type const wchar_t *__restrict __src, size_t __n) ^ /usr/include/wchar.h:166:63: error: ‘size_t’ is not a type extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) ^ /usr/include/wchar.h:176:4: error: ‘size_t’ is not a type size_t __n) __THROW; ^ In file included from /usr/include/wchar.h:180:0, from /usr/include/c++/4.9/cwchar:44, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/xlocale.h:42:9: error: ‘__locale_t’ does not name a type typedef __locale_t locale_t; ^ In file included from /usr/include/c++/4.9/cwchar:44:0, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/wchar.h:183:5: error: ‘__locale_t’ is not a type __locale_t __loc) __THROW; ^ /usr/include/wchar.h:186:6: error: ‘size_t’ is not a type size_t __n, __locale_t __loc) __THROW; ^ /usr/include/wchar.h:186:18: error: ‘__locale_t’ is not a type   size_t __n, __locale_t __loc) __THROW;  ^ /usr/include/wchar.h:196:8: error: ‘size_t’ does not name a type extern size_t wcsxfrm (wchar_t *__restrict __s1, ^ /usr/include/wchar.h:207:9: error: ‘__locale_t’ is not a type __locale_t __loc) __THROW;  ^ /usr/include/wchar.h:212:8: error: ‘size_t’ does not name a type extern size_t wcsxfrm_l (wchar_t *__s1, const wchar_t *__s2, ^ /usr/include/wchar.h:252:8: error: ‘size_t’ does not name a type extern size_t wcscspn (const wchar_t *__wcs, const wchar_t *__reject) ^ /usr/include/wchar.h:256:8: error: ‘size_t’ does not name a type extern size_t wcsspn (const wchar_t *__wcs, const wchar_t *__accept) ^ /usr/include/wchar.h:287:8: error: ‘size_t’ does not name a type extern size_t wcslen (const wchar_t *__s) __THROW __attribute_pure__;  ^ /usr/include/wchar.h:306:8: error: ‘size_t’ does not name a type extern size_t wcsnlen (const wchar_t *__s, size_t __maxlen)  ^ [SNIP] /usr/include/c++/4.9/bits/fstream.tcc:934:35: error: ‘cur’ is not a member of ‘std::ios_base’ __testvalid = this->seekoff(0, ios_base::cur, _M_mode) ^ /usr/include/c++/4.9/bits/fstream.tcc:934:50: error: ‘_M_mode’ was not declared in this scope __testvalid = this->seekoff(0, ios_base::cur, _M_mode) ^ /usr/include/c++/4.9/bits/fstream.tcc:941:25: error: ‘_M_state_last’ was not declared in this scope + _M_codecvt->length(_M_state_last, _M_ext_buf, ^ /usr/include/c++/4.9/bits/fstream.tcc:944:15: error: ‘streamsize’ does not name a type const streamsize __remainder = _M_ext_end - _M_ext_next; ^ /usr/include/c++/4.9/bits/fstream.tcc:945:13: error: ‘__remainder’ was not declared in this scope if (__remainder) ^ /usr/include/c++/4.9/bits/fstream.tcc:949:35: error: ‘__remainder’ was not declared in this scope _M_ext_end = _M_ext_buf + __remainder; ^ /usr/include/c++/4.9/bits/fstream.tcc:951:25: error: ‘_M_state_cur’ was not declared in this scope _M_state_last = _M_state_cur = _M_state_beg; ^ /usr/include/c++/4.9/bits/fstream.tcc:951:40: error: ‘_M_state_beg’ was not declared in this scope _M_state_last = _M_state_cur = _M_state_beg; ^ /usr/include/c++/4.9/bits/fstream.tcc:960:2: error: ‘_M_codecvt’ was not declared in this scope _M_codecvt = _M_codecvt_tmp; ^ /usr/include/c++/4.9/bits/fstream.tcc:960:15: error: ‘_M_codecvt_tmp’ was not declared in this scope _M_codecvt = _M_codecvt_tmp; ^ /usr/include/c++/4.9/bits/fstream.tcc:962:2: error: ‘_M_codecvt’ was not declared in this scope _M_codecvt = 0; ^ 

On my Ubuntu machine, g++-4.9 -std=c++11 -c a.C generates 1,101,568 glorious bytes of errors, for a score of 1101568/33/3 = 11,126.95.

aieeeeeeee
Source Link
nneonneo
  • 12.6k
  • 8
  • 31
  • 52

29,359105.3744 2,359.37 1,645.94 266.88 points

#define chatypedf #include<fstream> 
#define chartypedef #include<fstream> 
In file included from /usr/include/c++/4.9/iosfwd:39:0, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/c++/4.9/bits/stringfwd.h:59:37: error: wrong number of template arguments (0, should be 1) template<> struct char_traits<char>; ^ /usr/include/c++/4.9/bits/stringfwd.h:53:12: error: provided for ‘template<class _CharT> struct std::char_traits’ struct char_traits; ^ /usr/include/c++/4.9/bits/stringfwd.h:62:2833: error: wrong number of template arguments (0, should be 3) typedef basic_string<char> string; aggregate ^ /usr/include/c++/4.9/bits/stringfwd.h:57:11‘std: error: provided for ‘template<class _CharT, class _Traits, class _Alloc> classbasic_string<char> std::basic_string’ class basic_string; ^ /usr/include/c++/4.9/bits/stringfwd.h:62:39:string’ error:has invalidincomplete type in declarationand beforecannot ‘;’be tokendefined typedef basic_string<char> string; ^ /usr/include/c++/4.9/bits/stringfwd.h:68:33: error: aggregate ‘std::basic_string<wchar_t> std::wstring’ has incomplete type and cannot be defined typedef basic_string<wchar_t> wstring;  ^ In file included from /usr/include/wchar.h:36:0, from /usr/include/c++/4.9/cwchar:44:0, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/wcharstdio.h:9248:1025: error: ‘__wchb’aggregate does‘_IO_FILE notFILE’ namehas aincomplete type and cannot be defined typedef struct _IO_FILE FILE; char __wchb[4]; ^ /usr/include/stdio.h:64:25: error: aggregate ‘_IO_FILE __FILE’ has incomplete type and cannot be defined  typedef struct _IO_FILE __FILE;  ^ In file included from /usr/include/c++/4.9/cwchar:44:0, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38,  from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/wchar.h:370:30: error: expected primary-expression before ‘__restrict’ extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, ^ /usr/include/wchar.h:370:46: error: expected primary-expression before ‘wchar_t’ extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, ^ /usr/include/wchar.h:371:20: error: expected primary-expression before ‘*’ token mbstate_t *__restrict __ps) __THROW; ^ /usr/include/wchar.h:371:21: error: expected primary-expression before ‘__restrict’ mbstate_t *__restrict __ps) __THROW; ^ /usr/include/wchar.h:371:36: error: expression list treated as compound expression in initializer [-fpermissive] mbstate_t *__restrict __ps) __THROW; ^ [SNIP...] In file included from /usr/include/c++/4.9/ios:38:0,  from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/c++/4wchar.9/iosfwdh:111106:119: error: provided‘__mbstate_t’ fordoes ‘template<classnot _CharT,name classa _Traits>type  classtypedef std__mbstate_t mbstate_t; ^ /usr/include/wchar.h:151:basic_ifstream’38: error: ‘size_t’ is not a type classconst basic_ifstream;wchar_t *__restrict __src, size_t __n) ^ In file included from  ^ /usr/include/c++/4wchar.9/fstreamh:939159:038: error: ‘size_t’ is not a type const wchar_t *__restrict __src, size_t __n) from a.C:2: ^ /usr/include/c++/4.9/bits/fstreamwchar.tcch:970166:4463: error: wrong‘size_t’ numberis ofnot templatea argumentstype extern int wcsncmp (0const wchar_t *__s1, shouldconst bewchar_t 2*__s2, size_t __n) extern template class basic_ofstream<char>;   ^ /usr/include/wchar.h:176:4: error: ‘size_t’ is not a type size_t __n) __THROW; ^ In file included from /usr/include/wchar.h:180:0, from /usr/include/c++/4.9/cwchar:44, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38:0, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38,  from a.C:2: /usr/include/c++/4.9/iosfwd:114:11: error: provided for ‘template<class _CharT, class _Traits> class std::basic_ofstream’ class basic_ofstream; ^ In file included from /usr/include/c++/4.9/fstream:939:0,  from a.C:2: /usr/include/c++/4.9/bits/fstreamxlocale.tcch:97142:439: error: wrong‘__locale_t’ numberdoes ofnot templatename argumentsa (0,type  shouldtypedef be__locale_t 2)locale_t; extern template class basic_fstream<char>;  ^ In file included from /usr/include/c++/4.9/cwchar:44:0,  from /usr/include/c++/4.9/bits/postypes.h:40,  from ^/usr/include/c++/4.9/iosfwd:40, In file included  from /usr/include/c++/4.9/ios:38:0, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/wchar.h:183:5: error: ‘__locale_t’ is not a type __locale_t __loc) __THROW; ^ [SNIP...] /usr/include/c++/4.9/iosfwdbits/fstream.tcc:117903:118: error: provided‘traits_type’ foris ‘template<classnot _CharT,a class _Traits>or namespace if (traits_type::eq_int_type(__tmp, traits_type::eof())) ^ /usr/include/c++/4.9/bits/fstream.tcc:903:33: error: ‘__tmp’ was not declared in this scope if (traits_type::eq_int_type(__tmp, traits_type::eof())) ^ /usr/include/c++/4.9/bits/fstream.tcc:903:40: error: ‘traits_type’ is not a class or namespace if (traits_type::eq_int_type(__tmp, traits_type::eof())) ^ /usr/include/c++/4.9/bits/fstream.tcc: In member function ‘virtual void std::basic_fstream’basic_filebuf<_CharT, _Traits>::imbue(const std::locale&)’: /usr/include/c++/4.9/bits/fstream.tcc:916:13: error: ‘__codecvt_type’ does not classname basic_fstream;a type const __codecvt_type* _M_codecvt_tmp = 0; ^ /usr/include/c++/4.9/bits/fstream.tcc:917:38: error: ‘std::basic_filebuf<_CharT, _Traits>::__codecvt_type’ cannot appear in a constant-expression if (__builtin_expect(has_facet<__codecvt_type>(__loc), true))   ^ /usr/include/c++/4.9/bits/fstream.tcc:918:2: error: ‘_M_codecvt_tmp’ was not declared in this scope _M_codecvt_tmp = &use_facet<__codecvt_type>(__loc); ^ /usr/include/c++/4.9/bits/fstream.tcc:918:30: error: ‘std::basic_filebuf<_CharT, _Traits>::__codecvt_type’ cannot appear in a constant-expression _M_codecvt_tmp = &use_facet<__codecvt_type>(__loc);  ^ /usr/include/c++/4.9/bits/fstream.tcc:924:25: error: ‘_M_codecvt’ was not declared in this scope && __check_facet(_M_codecvt).encoding() == -1) ^ /usr/include/c++/4.9/bits/fstream.tcc:932:13: error: ‘_M_codecvt_tmp’ was not declared in this scope if (_M_codecvt_tmp ^ /usr/include/c++/4.9/bits/fstream.tcc:934:35: error: ‘cur’ is not a member of ‘std::ios_base’ __testvalid = this->seekoff(0, ios_base::cur, _M_mode) ^ /usr/include/c++/4.9/bits/fstream.tcc:934:50: error: ‘_M_mode’ was not declared in this scope __testvalid = this->seekoff(0, ios_base::cur, _M_mode) ^ /usr/include/c++/4.9/bits/fstream.tcc:941:25: error: ‘_M_state_last’ was not declared in this scope + _M_codecvt->length(_M_state_last, _M_ext_buf, ^ /usr/include/c++/4.9/bits/fstream.tcc:944:15: error: ‘streamsize’ does not name a type const streamsize __remainder = _M_ext_end - _M_ext_next; ^ /usr/include/c++/4.9/bits/fstream.tcc:945:13: error: ‘__remainder’ was not declared in this scope if (__remainder) ^ /usr/include/c++/4.9/bits/fstream.tcc:949:35: error: ‘__remainder’ was not declared in this scope _M_ext_end = _M_ext_buf + __remainder; ^ /usr/include/c++/4.9/bits/fstream.tcc:951:25: error: ‘_M_state_cur’ was not declared in this scope _M_state_last = _M_state_cur = _M_state_beg; ^ /usr/include/c++/4.9/bits/fstream.tcc:951:40: error: ‘_M_state_beg’ was not declared in this scope _M_state_last = _M_state_cur = _M_state_beg; ^ /usr/include/c++/4.9/bits/fstream.tcc:960:2: error: ‘_M_codecvt’ was not declared in this scope _M_codecvt = _M_codecvt_tmp; ^ /usr/include/c++/4.9/bits/fstream.tcc:960:15: error: ‘_M_codecvt_tmp’ was not declared in this scope _M_codecvt = _M_codecvt_tmp; ^ /usr/include/c++/4.9/bits/fstream.tcc:962:2: error: ‘_M_codecvt’ was not declared in this scope _M_codecvt = 0;  ^ 

On my Ubuntu machine, g++-4.9, 212901,343439 glorious bytes of errors with a filename of a.C. Only 3033 bytes of code (with typo), for a score of 212343901439/3033/3 = 29,359105.3744.

2,359.37 1,645.94 266.88 points

#define cha #include<fstream> 
#define char #include<fstream> 
In file included from /usr/include/c++/4.9/iosfwd:39:0, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/c++/4.9/bits/stringfwd.h:59:37: error: wrong number of template arguments (0, should be 1) template<> struct char_traits<char>; ^ /usr/include/c++/4.9/bits/stringfwd.h:53:12: error: provided for ‘template<class _CharT> struct std::char_traits’ struct char_traits; ^ /usr/include/c++/4.9/bits/stringfwd.h:62:28: error: wrong number of template arguments (0, should be 3) typedef basic_string<char> string;  ^ /usr/include/c++/4.9/bits/stringfwd.h:57:11: error: provided for ‘template<class _CharT, class _Traits, class _Alloc> class std::basic_string’ class basic_string; ^ /usr/include/c++/4.9/bits/stringfwd.h:62:39: error: invalid type in declaration before ‘;’ token typedef basic_string<char> string; ^ In file included from /usr/include/c++/4.9/cwchar:44:0, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/wchar.h:92:10: error: ‘__wchb’ does not name a type char __wchb[4]; ^ In file included from /usr/include/c++/4.9/cwchar:44:0, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38,  from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/wchar.h:370:30: error: expected primary-expression before ‘__restrict’ extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, ^ /usr/include/wchar.h:370:46: error: expected primary-expression before ‘wchar_t’ extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, ^ /usr/include/wchar.h:371:20: error: expected primary-expression before ‘*’ token mbstate_t *__restrict __ps) __THROW; ^ /usr/include/wchar.h:371:21: error: expected primary-expression before ‘__restrict’ mbstate_t *__restrict __ps) __THROW; ^ /usr/include/wchar.h:371:36: error: expression list treated as compound expression in initializer [-fpermissive] mbstate_t *__restrict __ps) __THROW; ^ [SNIP...] In file included from /usr/include/c++/4.9/ios:38:0,  from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/c++/4.9/iosfwd:111:11: error: provided for ‘template<class _CharT, class _Traits> class std::basic_ifstream’ class basic_ifstream; ^ In file included from /usr/include/c++/4.9/fstream:939:0, from a.C:2: /usr/include/c++/4.9/bits/fstream.tcc:970:44: error: wrong number of template arguments (0, should be 2) extern template class basic_ofstream<char>;  ^ In file included from /usr/include/c++/4.9/ios:38:0, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38,  from a.C:2: /usr/include/c++/4.9/iosfwd:114:11: error: provided for ‘template<class _CharT, class _Traits> class std::basic_ofstream’ class basic_ofstream; ^ In file included from /usr/include/c++/4.9/fstream:939:0,  from a.C:2: /usr/include/c++/4.9/bits/fstream.tcc:971:43: error: wrong number of template arguments (0, should be 2) extern template class basic_fstream<char>;  ^ In file included from /usr/include/c++/4.9/ios:38:0, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/c++/4.9/iosfwd:117:11: error: provided for ‘template<class _CharT, class _Traits> class std::basic_fstream’ class basic_fstream; ^ 

On my Ubuntu machine, g++-4.9, 212,343 glorious bytes of errors with a filename of a.C. Only 30 bytes of code (with typo), for a score of 212343/30/3 = 2,359.37.

9,105.44 2,359.37 1,645.94 266.88 points

#define typedf #include<fstream> 
#define typedef #include<fstream> 
In file included from /usr/include/c++/4.9/iosfwd:39:0, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/c++/4.9/bits/stringfwd.h:62:33: error: aggregate ‘std::basic_string<char> std::string’ has incomplete type and cannot be defined typedef basic_string<char> string; ^ /usr/include/c++/4.9/bits/stringfwd.h:68:33: error: aggregate ‘std::basic_string<wchar_t> std::wstring’ has incomplete type and cannot be defined typedef basic_string<wchar_t> wstring;  ^ In file included from /usr/include/wchar.h:36:0, from /usr/include/c++/4.9/cwchar:44, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/stdio.h:48:25: error: aggregate ‘_IO_FILE FILE’ has incomplete type and cannot be defined typedef struct _IO_FILE FILE;  ^ /usr/include/stdio.h:64:25: error: aggregate ‘_IO_FILE __FILE’ has incomplete type and cannot be defined  typedef struct _IO_FILE __FILE;  ^ In file included from /usr/include/c++/4.9/cwchar:44:0, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/wchar.h:106:9: error: ‘__mbstate_t’ does not name a type  typedef __mbstate_t mbstate_t; ^ /usr/include/wchar.h:151:38: error: ‘size_t’ is not a type const wchar_t *__restrict __src, size_t __n)   ^ /usr/include/wchar.h:159:38: error: ‘size_t’ is not a type const wchar_t *__restrict __src, size_t __n)  ^ /usr/include/wchar.h:166:63: error: ‘size_t’ is not a type extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n)   ^ /usr/include/wchar.h:176:4: error: ‘size_t’ is not a type size_t __n) __THROW; ^ In file included from /usr/include/wchar.h:180:0, from /usr/include/c++/4.9/cwchar:44, from /usr/include/c++/4.9/bits/postypes.h:40, from /usr/include/c++/4.9/iosfwd:40, from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/xlocale.h:42:9: error: ‘__locale_t’ does not name a type  typedef __locale_t locale_t; ^ In file included from /usr/include/c++/4.9/cwchar:44:0,  from /usr/include/c++/4.9/bits/postypes.h:40,  from /usr/include/c++/4.9/iosfwd:40,   from /usr/include/c++/4.9/ios:38, from /usr/include/c++/4.9/istream:38, from /usr/include/c++/4.9/fstream:38, from a.C:2: /usr/include/wchar.h:183:5: error: ‘__locale_t’ is not a type __locale_t __loc) __THROW; ^ [SNIP...] /usr/include/c++/4.9/bits/fstream.tcc:903:8: error: ‘traits_type’ is not a class or namespace if (traits_type::eq_int_type(__tmp, traits_type::eof())) ^ /usr/include/c++/4.9/bits/fstream.tcc:903:33: error: ‘__tmp’ was not declared in this scope if (traits_type::eq_int_type(__tmp, traits_type::eof())) ^ /usr/include/c++/4.9/bits/fstream.tcc:903:40: error: ‘traits_type’ is not a class or namespace if (traits_type::eq_int_type(__tmp, traits_type::eof())) ^ /usr/include/c++/4.9/bits/fstream.tcc: In member function ‘virtual void std::basic_filebuf<_CharT, _Traits>::imbue(const std::locale&)’: /usr/include/c++/4.9/bits/fstream.tcc:916:13: error: ‘__codecvt_type’ does not name a type const __codecvt_type* _M_codecvt_tmp = 0; ^ /usr/include/c++/4.9/bits/fstream.tcc:917:38: error: ‘std::basic_filebuf<_CharT, _Traits>::__codecvt_type’ cannot appear in a constant-expression if (__builtin_expect(has_facet<__codecvt_type>(__loc), true))   ^ /usr/include/c++/4.9/bits/fstream.tcc:918:2: error: ‘_M_codecvt_tmp’ was not declared in this scope _M_codecvt_tmp = &use_facet<__codecvt_type>(__loc); ^ /usr/include/c++/4.9/bits/fstream.tcc:918:30: error: ‘std::basic_filebuf<_CharT, _Traits>::__codecvt_type’ cannot appear in a constant-expression _M_codecvt_tmp = &use_facet<__codecvt_type>(__loc);  ^ /usr/include/c++/4.9/bits/fstream.tcc:924:25: error: ‘_M_codecvt’ was not declared in this scope && __check_facet(_M_codecvt).encoding() == -1) ^ /usr/include/c++/4.9/bits/fstream.tcc:932:13: error: ‘_M_codecvt_tmp’ was not declared in this scope if (_M_codecvt_tmp ^ /usr/include/c++/4.9/bits/fstream.tcc:934:35: error: ‘cur’ is not a member of ‘std::ios_base’ __testvalid = this->seekoff(0, ios_base::cur, _M_mode) ^ /usr/include/c++/4.9/bits/fstream.tcc:934:50: error: ‘_M_mode’ was not declared in this scope __testvalid = this->seekoff(0, ios_base::cur, _M_mode) ^ /usr/include/c++/4.9/bits/fstream.tcc:941:25: error: ‘_M_state_last’ was not declared in this scope + _M_codecvt->length(_M_state_last, _M_ext_buf, ^ /usr/include/c++/4.9/bits/fstream.tcc:944:15: error: ‘streamsize’ does not name a type const streamsize __remainder = _M_ext_end - _M_ext_next; ^ /usr/include/c++/4.9/bits/fstream.tcc:945:13: error: ‘__remainder’ was not declared in this scope if (__remainder) ^ /usr/include/c++/4.9/bits/fstream.tcc:949:35: error: ‘__remainder’ was not declared in this scope _M_ext_end = _M_ext_buf + __remainder; ^ /usr/include/c++/4.9/bits/fstream.tcc:951:25: error: ‘_M_state_cur’ was not declared in this scope _M_state_last = _M_state_cur = _M_state_beg; ^ /usr/include/c++/4.9/bits/fstream.tcc:951:40: error: ‘_M_state_beg’ was not declared in this scope _M_state_last = _M_state_cur = _M_state_beg; ^ /usr/include/c++/4.9/bits/fstream.tcc:960:2: error: ‘_M_codecvt’ was not declared in this scope _M_codecvt = _M_codecvt_tmp; ^ /usr/include/c++/4.9/bits/fstream.tcc:960:15: error: ‘_M_codecvt_tmp’ was not declared in this scope _M_codecvt = _M_codecvt_tmp; ^ /usr/include/c++/4.9/bits/fstream.tcc:962:2: error: ‘_M_codecvt’ was not declared in this scope _M_codecvt = 0;  ^ 

On my Ubuntu machine, g++-4.9, 901,439 glorious bytes of errors with a filename of a.C. Only 33 bytes of code (with typo), for a score of 901439/33/3 = 9,105.44.

added 3980 characters in body
Source Link
nneonneo
  • 12.6k
  • 8
  • 31
  • 52
Loading
Source Link
nneonneo
  • 12.6k
  • 8
  • 31
  • 52
Loading