View Code of Problem 1007

<span style="font-size:18px;">#include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <cmath>
#include <queue>
#include <set>

using namespace std;

//#define WIN
#ifdef WIN
typedef __int64 LL;
#define iform "%I64d"
#define oform "%I64d\n"
#else
typedef long long LL;
#define iform "%lld"
#define oform "%lld\n"
#endif

#define SI(a) scanf("%d", &(a))
#define SDI(a, b) scanf("%d%d", &(a), &(b))
#define S64I(a) scanf(iform, &(a))
#define SS(a) scanf("%s", (a))
#define SDS(a, b) scanf("%s%s", (a), (b))
#define SC(a) scanf("%c", &(a))
#define PI(a) printf("%d\n", (a))
#define PS(a) puts(a)
#define P64I(a) printf(oform, (a))
#define Max(a, b) ((a) > (b) ? (a) : (b))
#define Min(a, b) ((a) < (b) ? (a) : (b))
#define MSET(a, b) (memset((a), (b), sizeof(a)))
#define Mid(L, R) ((L) + ((R) - (L))/2)
#define Abs(a) ((a) >= 0 ? (a) : -(a))
#define REP(i, n) for(int (i)=0; (i) < (n); (i)++)
#define FOR(i, a, n) for(int (i)=(a); (i) <= (n); (i)++)
const int INF = 0x3f3f3f3f;
const double eps = 10e-9;

const int maxn = 1000 + 20;

int main() {
    int a, b, c, d, e, f;

    while(scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f) != EOF 
            && a && b && c && d && e &&f) {
        int ans = INF;
        int ta, tb;
        ta = a * c;
        tb = b * d;
        if(ta<=e && tb<=f) {
            int tans = 0;
            if(ta < e) tans += 1;
            if(tb < f) tans += 1;
            tans += a * b - 1;
            ans = min(ans, tans);
        }
        if(ta<=f && tb<=e) {
            int tans = 0;
            if(ta < f) tans += 1;
            if(tb < e) tans += 1;
            tans += a * b - 1;
            ans = min(ans, tans);
        }
        ta = a * d;
        tb = b * c;
        if(ta<=e && tb<=f) {
            int tans = 0;
            if(ta < e) tans += 1;
            if(tb < f) tans += 1;
            tans += a * b - 1;
            ans = min(ans, tans);
        }
        if(ta<=f && tb<=e) {
            int tans = 0;
            if(ta < f) tans += 1;
            if(tb < e) tans += 1;
            tans += a * b - 1;
            ans = min(ans, tans);
        }
        if(ans == INF) {
            printf("The paper is too small.\n"); 
        } else {
            printf("The minimum number of cuts is %d.\n", ans);
        }
    }


    return 0;
}


</span>
/*
F:\temp\16139557.54574\Main.cc:2: error: stray '#' in program
F:\temp\16139557.54574\Main.cc:2: error: expected unqualified-id before '<' token
In file included from ios:39,
                 from ostream:40,
                 from iostream:40,
                 from F:\temp\16139557.54574\Main.cc:3:
iosfwd:46: error: expected type-specifier before 'char_traits'
iosfwd:46: error: expected '>' before 'char_traits'
iosfwd:49: error: expected type-specifier before 'char_traits'
iosfwd:49: error: expected '>' before 'char_traits'
iosfwd:52: error: expected type-specifier before 'char_traits'
iosfwd:52: error: expected '>' before 'char_traits'
iosfwd:55: error: expected type-specifier before 'char_traits'
iosfwd:55: error: expected '>' before 'char_traits'
iosfwd:58: error: expected type-specifier before 'char_traits'
iosfwd:58: error: expected '>' before 'char_traits'
iosfwd:61: error: expected type-specifier before 'char_traits'
iosfwd:61: error: expected '>' before 'char_traits'
iosfwd:65: error: expected type-specifier before 'char_traits'
iosfwd:65: error: expected '>' before 'char_traits'
iosfwd:69: error: expected type-specifier before 'char_traits'
iosfwd:69: error: expected '>' before 'char_traits'
iosfwd:73: error: expected type-specifier before 'char_traits'
iosfwd:73: error: expected '>' before 'char_traits'
iosfwd:77: error: expected type-specifier before 'char_traits'
iosfwd:77: error: expected '>' before 'char_traits'
iosfwd:80: error: expected type-specifier before 'char_traits'
iosfwd:80: error: expected '>' before 'char_traits'
iosfwd:83: error: expected type-specifier before 'char_traits'
iosfwd:83: error: expected '>' before 'char_traits'
iosfwd:86: error: expected type-specifier before 'char_traits'
iosfwd:86: error: expected '>' before 'char_traits'
iosfwd:89: error: expected type-specifier before 'char_traits'
iosfwd:89: error: expected '>' before 'char_traits'
iosfwd:92: error: expected type-specifier before 'char_traits'
iosfwd:92: error: expected '>' before 'char_traits'
iosfwd:127: error: template argument 2 is invalid
iosfwd:127: error: invalid type in declaration before ';' token
iosfwd:128: error: template argument 2 is invalid
iosfwd:128: error: invalid type in declaration before ';' token
iosfwd:129: error: template argument 2 is invalid
iosfwd:129: error: invalid type in declaration before ';' token
iosfwd:130: error: template argument 2 is invalid
iosfwd:130: error: invalid type in declaration before ';' token
iosfwd:131: error: template argument 2 is invalid
iosfwd:131: error: invalid type in declaration before ';' token
iosfwd:132: error: template argument 2 is invalid
iosfwd:132: error: invalid type in declaration before ';' token
iosfwd:133: error: template argument 2 is invalid
iosfwd:133: error: invalid type in declaration before ';' token
iosfwd:134: error: template argument 2 is invalid
iosfwd:134: error: invalid type in declaration before ';' token
iosfwd:135: error: template argument 2 is invalid
iosfwd:135: error: invalid type in declaration before ';' token
iosfwd:136: error: template argument 2 is invalid
iosfwd:136: error: invalid type in declaration before ';' token
iosfwd:137: error: template argument 2 is invalid
iosfwd:137: error: invalid type in declaration before ';' token
iosfwd:138: error: template argument 2 is invalid
iosfwd:138: error: invalid type in declaration before ';' token
iosfwd:139: error: template argument 2 is invalid
iosfwd:139: error: invalid type in declaration before ';' token
iosfwd:142: error: template argument 2 is invalid
iosfwd:142: error: invalid type in declaration before ';' token
iosfwd:143: error: template argument 2 is invalid
iosfwd:143: error: invalid type in declaration before ';' token
iosfwd:144: error: template argument 2 is invalid
iosfwd:144: error: invalid type in declaration before ';' token
iosfwd:145: error: template argument 2 is invalid
iosfwd:145: error: invalid type in declaration before ';' token
iosfwd:146: error: template argument 2 is invalid
iosfwd:146: error: invalid type in declaration before ';' token
iosfwd:147: error: template argument 2 is invalid
iosfwd:147: error: invalid type in declaration before ';' token
iosfwd:148: error: template argument 2 is invalid
iosfwd:148: error: invalid type in declaration before ';' token
iosfwd:149: error: template argument 2 is invalid
iosfwd:149: error: invalid type in declaration before ';' token
iosfwd:150: error: template argument 2 is invalid
iosfwd:150: error: invalid type in declaration before ';' token
iosfwd:151: error: template argument 2 is invalid
iosfwd:151: error: invalid type in declaration before ';' token
iosfwd:152: error: template argument 2 is invalid
iosfwd:152: error: invalid type in declaration before ';' token
iosfwd:153: error: template argument 2 is invalid
iosfwd:153: error: invalid type in declaration before ';' token
iosfwd:154: error: template argument 2 is invalid
iosfwd:154: error: invalid type in declaration before ';' token
In file included from ios:42,
                 from ostream:40,
                 from iostream:40,
                 from F:\temp\16139557.54574\Main.cc:3:
localefwd.h:136: error: template argument 2 is invalid
localefwd.h:138: error: template argument 2 is invalid
localefwd.h:152: error: template argument 2 is invalid
localefwd.h:154: error: template argument 2 is invalid
localefwd.h:156: error: template argument 2 is invalid
localefwd.h:158: error: template argument 2 is invalid
localefwd.h:164: error: template argument 2 is invalid
localefwd.h:166: error: template argument 2 is invalid
In file included from string:46,
                 from locale_classes.h:42,
                 from ios_base.h:43,
                 from ios:43,
                 from ostream:40,
                 from iostream:40,
                 from F:\temp\16139557.54574\Main.cc:3:
ostream_insert.h:117: error: template-id '__ostream_insert<>' for 'std::ostream& std::__ostream_insert(std::ostream&, const char*, std::streamsize)' does not match any template declaration
ostream_insert.h:120: error: template-id '__ostream_insert<>' for 'std::wostream& std::__ostream_insert(std::wostream&, const wchar_t*, std::streamsize)' does not match any template declaration
In file included from string:53,
                 from locale_classes.h:42,
                 from ios_base.h:43,
                 from ios:43,
                 from ostream:40,
                 from iostream:40,
                 from F:\temp\16139557.54574\Main.cc:3:
basic_string.h:2242: error: wrong number of template arguments (1, should be 3)
basic_string.h:104: error: provided for 'template<class _CharT, class _Traits, class _Alloc> class std::basic_string'
basic_string.h:2243: error: wrong number of template arguments (1, should be 3)
basic_string.h:104: error: provided for 'template<class _CharT, class _Traits, class _Alloc> class std::basic_string'
basic_string.h:2243: error: 'typename __gnu_cxx::__enable_if<std::__is_char::__value, bool>::__type std::operator==(const int&, const int&)' must have an argument of class or enumerated type
basic_string.h:2487: error: template argument 2 is invalid
basic_string.h:2488: error: template argument 2 is invalid
basic_string.h:2488: error: wrong number of template arguments (1, should be 3)
basic_string.h:104: error: provided for 'template<class _CharT, class _Traits, class _Alloc> class std::basic_string'
basic_string.h:2488: error: invalid type in declaration before ';' token
basic_string.h:2488: error: 'int& std::operator>>(int&, int&)' must have an argument of class or enumerated type
basic_string.h:2546: error: template argument 2 is invalid
basic_string.h:2547: error: template argument 2 is invalid
basic_string.h:2547: error: wrong number of template arguments (1, should be 3)
basic_string.h:104: error: provided for 'template<class _CharT, class _Traits, class _Alloc> class std::basic_string'
basic_string.h:2548: error: invalid type in declaration before ';' token
basic_string.h:2547: error: template-id 'getline<>' for 'int& std::getline(int&, int&, char)' does not match any template declaration
basic_string.h:2552: error: template argument 2 is invalid
basic_string.h:2553: error: template argument 2 is invalid
basic_string.h:2553: error: wrong number of template arguments (1, should be 3)
basic_string.h:104: error: provided for 'template<class _CharT, class _Traits, class _Alloc> class std::basic_string'
basic_string.h:2554: error: invalid type in declaration before ';' token
basic_string.h:2553: error: template-id 'getline<>' for 'int& std::getline(int&, int&, wchar_t)' does not match any template declaration
In file included from string:56,
                 from locale_classes.h:42,
                 from ios_base.h:43,
                 from ios:43,
                 from ostream:40,
                 from iostream:40,
                 from F:\temp\16139557.54574\Main.cc:3:
basic_string.tcc:1111: error: wrong number of template arguments (1, should be 3)
basic_string.h:104: error: provided for 'template<class _CharT, class _Traits, class _Alloc> class std::basic_string'
basic_string.tcc:1113: error: template argument 2 is invalid
basic_string.tcc:1114: error: template argument 2 is invalid
basic_string.tcc:1114: error: 'string' has not been declared
basic_string.tcc:1114: error: 'int& std::operator>>(int&, int&)' must have an argument of class or enumerated type
basic_string.tcc:1116: error: template argument 2 is invalid
basic_string.tcc:1117: error: template argument 2 is invalid
basic_string.tcc:1117: error: expected ',' or '...' before '&' token
basic_string.tcc:1117: error: 'int& std::operator<<(int&, int)' must have an argument of class or enumerated type
basic_string.tcc:1119: error: template argument 2 is invalid
basic_string.tcc:1120: error: template argument 2 is invalid
basic_string.tcc:1120: error: 'string' has not been declared
basic_string.tcc:1120: error: template-id 'getline<>' for 'int& std::getline(int&, int&, char)' does not match any template declaration
basic_string.tcc:1122: error: template argument 2 is invalid
basic_string.tcc:1123: error: template argument 2 is invalid
basic_string.tcc:1123: error: 'string' has not been declared
basic_string.tcc:1123: error: template-id 'getline<>' for 'int& std::getline(int&, int&)' does not match any template declaration
basic_string.tcc:1126: error: wrong number of template arguments (1, should be 3)
basic_string.h:104: error: provided for 'template<class _CharT, class _Traits, class _Alloc> class std::basic_string'
basic_string.tcc:1128: error: template argument 2 is invalid
basic_string.tcc:1129: error: template argument 2 is invalid
basic_string.tcc:1129: error: 'wstring' has not been declared
basic_string.tcc:1129: error: 'int& std::operator>>(int&, int&)' must have an argument of class or enumerated type
basic_string.tcc:1131: error: template argument 2 is invalid
basic_string.tcc:1132: error: template argument 2 is invalid
basic_string.tcc:1132: error: expected ',' or '...' before '&' token
basic_string.tcc:1132: error: 'int& std::operator<<(int&, int)' must have an argument of class or enumerated type
basic_string.tcc:1134: error: template argument 2 is invalid
basic_string.tcc:1135: error: template argument 2 is invalid
basic_string.tcc:1135: error: 'wstring' has not been declared
basic_string.tcc:1135: error: template-id 'getline<>' for 'int& std::getline(int&, int&, wchar_t)' does not match any template declaration
basic_string.tcc:1137: error: template argument 2 is invalid
basic_string.tcc:1138: error: template argument 2 is invalid
basic_string.tcc:1138: error: 'wstring' has not been declared
basic_string.tcc:1138: error: template-id 'getline<>' for 'int& std::getline(int&, int&)' does not match any template declaration
In file included from ios_base.h:43,
                 from ios:43,
                 from ostream:40,
                 from iostream:40,
                 from F:\temp\16139557.54574\Main.cc:3:
locale_classes.h:213: error: 'string' does not name a type
locale_classes.h:611: error: wrong number of template arguments (1, should be 3)
basic_string.h:104: error: provided for 'template<class _CharT, class _Traits, class _Alloc> class std::basic_string'
locale_classes.h:786: error: wrong number of template arguments (1, should be 3)
basic_string.h:104: error: provided for 'template<class _CharT, class _Traits, class _Alloc> class std::basic_string'
In file included from locale_classes.h:809,
                 from ios_base.h:43,
                 from ios:43,
                 from ostream:40,
                 from iostream:40,
                 from F:\temp\16139557.54574\Main.cc:3:
locale_classes.tcc: In member function 'virtual int std::collate<_CharT>::do_compare(const _CharT*, const _CharT*, const _CharT*, const _CharT*) const':
locale_classes.tcc:142: error: request for member 'c_str' in '__one', which is of non-class type 'const int'
locale_classes.tcc:143: error: request for member 'data' in '__one', which is of non-class type 'const int'
locale_classes.tcc:143: error: request for member 'length' in '__one', which is of non-class type 'const int'
locale_classes.tcc:144: error: request for member 'c_str' in '__two', which is of non-class type 'const int'
locale_classes.tcc:145: error: request for member 'data' in '__two', which is of non-class type 'const int'
locale_classes.tcc:145: error: request for member 'length' in '__two', which is of non-class type 'const int'
locale_classes.tcc: In member function 'virtual int std::collate<_CharT>::do_transform(const _CharT*, const _CharT*) const':
locale_classes.tcc:180: error: request for member 'c_str' in '__str', which is of non-class type 'const int'
locale_classes.tcc:181: error: request for member 'data' in '__str', which is of non-class type 'const int'
locale_classes.tcc:181: error: request for member 'length' in '__str', which is of non-class type 'const int'
locale_classes.tcc:206: error: request for member 'append' in '__ret', which is of non-class type 'int'
locale_classes.tcc:212: error: request for member 'push_back' in '__ret', which is of non-class type 'int'
In file included from ios:43,
                 from ostream:40,
                 from iostream:40,
                 from F:\temp\16139557.54574\Main.cc:3:
ios_base.h: At global scope:
ios_base.h:223: error: expected ',' or '...' before '&' token
ios_base.h:234: error: 'string' does not name a type
In file included from ios:44,
                 from ostream:40,
                 from iostream:40,
                 from F:\temp\16139557.54574\Main.cc:3:
streambuf:147: error: template argument 2 is invalid
streambuf:148: error: template argument 2 is invalid
streambuf:152: error: template argument 2 is invalid
streambuf:152: error: template argument 2 is invalid
streambuf:153: error: template argument 2 is invalid
streambuf:153: error: template argument 2 is invalid
streambuf:154: error: invalid type in declaration before ';' token
streambuf:784: error: template argument 2 is invalid
streambuf:785: error: template argument 2 is invalid
streambuf:784: error: template-id '__copy_streambufs_eof<>' for 'std::streamsize std::__copy_streambufs_eof(int*, int*, bool&)' does not match any template declaration
streambuf:789: error: template argument 2 is invalid
streambuf:790: error: template argument 2 is invalid
streambuf:789: error: template-id '__copy_streambufs_eof<>' for 'std::streamsize std::__copy_streambufs_eof(int*, int*, bool&)' does not match any template declaration
In file included from streambuf:796,
                 from ios:44,
                 from ostream:40,
                 from iostream:40,
                 from F:\temp\16139557.54574\Main.cc:3:
streambuf.tcc:149: error: template argument 2 is invalid
streambuf.tcc:152: error: template argument 2 is invalid
streambuf.tcc:153: error: template argument 2 is invalid
streambuf.tcc:152: error: template-id '__copy_streambufs<>' for 'std::streamsize std::__copy_streambufs(int*, int*)' does not match any template declaration
streambuf.tcc:156: error: template argument 2 is invalid
streambuf.tcc:157: error: template argument 2 is invalid
streambuf.tcc:156: error: template-id '__copy_streambufs_eof<>' for 'std::streamsize std::__copy_streambufs_eof(int*, int*, bool&)' does not match any template declaration
streambuf.tcc:160: error: template argument 2 is invalid
streambuf.tcc:163: error: template argument 2 is invalid
streambuf.tcc:164: error: template argument 2 is invalid
streambuf.tcc:163: error: template-id '__copy_streambufs<>' for 'std::streamsize std::__copy_streambufs(int*, int*)' does not match any template declaration
streambuf.tcc:167: error: template argument 2 is invalid
streambuf.tcc:168: error: template argument 2 is invalid
streambuf.tcc:167: error: template-id '__copy_streambufs_eof<>' for 'std::streamsize std::__copy_streambufs_eof(int*, int*, bool&)' does not match any template declaration
In file included from locale_facets.h:50,
                 from basic_ios.h:39,
                 from ios:45,
                 from ostream:40,
                 from iostream:40,
                 from F:\temp\16139557.54574\Main.cc:3:
streambuf_iterator.h:62: error: template argument 2 is invalid
streambuf_iterator.h:62: error: template argument 2 is invalid
streambuf_iterator.h:63: error: template argument 2 is invalid
streambuf_iterator.h:63: error: template argument 2 is invalid
streambuf_iterator.h:64: error: template argument 2 is invalid
streambuf_iterator.h:64: error: invalid type in declaration before ';' token
streambuf_iterator.h:69: error: template argument 2 is invalid
streambuf_iterator.h:70: error: template argument 2 is invalid
streambuf_iterator.h:74: error: template argument 2 is invalid
streambuf_iterator.h:74: error: template argument 2 is invalid
streambuf_iterator.h:75: error: template argument 2 is invalid
streambuf_iterator.h:75: error: template argument 2 is invalid
streambuf_iterator.h:76: error: invalid type in declaration before ';' token
streambuf_iterator.h:214: error: template argument 2 is invalid
streambuf_iterator.h:214: error: template argument 2 is invalid
streambuf_iterator.h:215: error: template argument 2 is invalid
streambuf_iterator.h:215: error: template argument 2 is invalid
streambuf_iterator.h:216: error: template argument 2 is invalid
streambuf_iterator.h:216: error: invalid type in declaration before ';' token
streambuf_iterator.h:275: error: template argument 2 is invalid
streambuf_iterator.h:275: error: template argument 2 is invalid
streambuf_iterator.h:276: error: template argument 2 is invalid
streambuf_iterator.h:277: error: template argument 2 is invalid
streambuf_iterator.h:278: error: template argument 2 is invalid
streambuf_iterator.h: In function 'int std::copy(int, int, int)':
streambuf_iterator.h:280: error: request for member '_M_sbuf' in '__first', which is of non-class type 'int'
streambuf_iterator.h:280: error: request for member '_M_sbuf' in '__last', which is of non-class type 'int'
streambuf_iterator.h:280: error: request for member '_M_failed' in '__result', which is of non-class type 'int'
streambuf_iterator.h:283: error: request for member '_M_sbuf' in '__first', which is of non-class type 'int'
streambuf_iterator.h:283: error: request for member '_M_sbuf' in '__result', which is of non-class type 'int'
streambuf_iterator.h:285: error: request for member '_M_failed' in '__result', which is of non-class type 'int'
streambuf_iterator.h: At global scope:
streambuf_iterator.h:292: error: template argument 2 is invalid
streambuf_iterator.h:292: error: template argument 2 is invalid
streambuf_iterator.h:294: error: template argument 2 is invalid
streambuf_iterator.h: In function 'int std::__copy_move_a2(_CharT*, _CharT*, int)':
streambuf_iterator.h:298: error: request for member '_M_put' in '__result', which is of non-class type 'int'
streambuf_iterator.h: At global scope:
streambuf_iterator.h:304: error: template argument 2 is invalid
streambuf_iterator.h:304: error: template argument 2 is invalid
streambuf_iterator.h:306: error: template argument 2 is invalid
streambuf_iterator.h: In function 'int std::__copy_move_a2(const _CharT*, const _CharT*, int)':
streambuf_iterator.h:310: error: request for member '_M_put' in '__result', which is of non-class type 'int'
streambuf_iterator.h: At global scope:
streambuf_iterator.h:317: error: template argument 2 is invalid
streambuf_iterator.h:318: error: template argument 2 is invalid
streambuf_iterator.h: In function 'typename __gnu_cxx::__enable_if<std::__is_char::__value, _CharT*>::__type std::__copy_move_a2(int, int, _CharT*)':
streambuf_iterator.h:320: error: template argument 2 is invalid
streambuf_iterator.h:320: error: invalid type in declaration before ';' token
streambuf_iterator.h:321: error: '__is_iterator_type' is not a class or namespace
streambuf_iterator.h:321: error: invalid type in declaration before ';' token
streambuf_iterator.h:322: error: '__is_iterator_type' is not a class or namespace
streambuf_iterator.h:322: error: invalid type in declaration before ';' token
streambuf_iterator.h:323: error: 'traits_type' is not a class or namespace
streambuf_iterator.h:323: error: invalid type in declaration before ';' token
streambuf_iterator.h:325: error: request for member '_M_sbuf' in '__first', which is of non-class type 'int'
streambuf_iterator.h:325: error: request for member '_M_sbuf' in '__last', which is of non-class type 'int'
streambuf_iterator.h:327: error: request for member '_M_sbuf' in '__first', which is of non-class type 'int'
streambuf_iterator.h:328: error: request for member 'sgetc' in '__sb->', which is of non-class type 'streambuf_type'
streambuf_iterator.h:329: error: 'traits_type' is not a class or namespace
streambuf_iterator.h:329: error: 'traits_type' is not a class or namespace
streambuf_iterator.h:331: error: request for member 'egptr' in '__sb->', which is of non-class type 'streambuf_type'
streambuf_iterator.h:331: error: request for member 'gptr' in '__sb->', which is of non-class type 'streambuf_type'
streambuf_iterator.h:334: error: invalid use of qualified-name '::copy'
streambuf_iterator.h:334: error: request for member 'gptr' in '__sb->', which is of non-class type 'streambuf_type'
streambuf_iterator.h:335: error: request for member 'gbump' in '__sb->', which is of non-class type 'streambuf_type'
streambuf_iterator.h:337: error: request for member 'underflow' in '__sb->', which is of non-class type 'streambuf_type'
streambuf_iterator.h:341: error: 'traits_type' is not a class or namespace
streambuf_iterator.h:342: error: request for member 'snextc' in '__sb->', which is of non-class type 'streambuf_type'
streambuf_iterator.h: At global scope:
streambuf_iterator.h:351: error: template argument 2 is invalid
streambuf_iterator.h:351: error: template argument 2 is invalid
streambuf_iterator.h:352: error: template argument 2 is invalid
streambuf_iterator.h:353: error: template argument 2 is invalid
streambuf_iterator.h: In function 'int std::find(int, int, const _CharT&)':
streambuf_iterator.h:355: error: template argument 2 is invalid
streambuf_iterator.h:355: error: invalid type in declaration before ';' token
streambuf_iterator.h:356: error: '__is_iterator_type' is not a class or namespace
streambuf_iterator.h:356: error: invalid type in declaration before ';' token
streambuf_iterator.h:357: error: '__is_iterator_type' is not a class or namespace
streambuf_iterator.h:357: error: invalid type in declaration before ';' token
streambuf_iterator.h:358: error: 'traits_type' is not a class or namespace
streambuf_iterator.h:358: error: invalid type in declaration before ';' token
streambuf_iterator.h:360: error: request for member '_M_sbuf' in '__first', which is of non-class type 'int'
streambuf_iterator.h:360: error: request for member '_M_sbuf' in '__last', which is of non-class type 'int'
streambuf_iterator.h:362: error: 'traits_type' is not a class or namespace
streambuf_iterator.h:363: error: request for member '_M_sbuf' in '__first', which is of non-class type 'int'
streambuf_iterator.h:364: error: request for member 'sgetc' in '__sb->', which is of non-class type 'streambuf_type'
streambuf_iterator.h:365: error: 'traits_type' is not a class or namespace
streambuf_iterator.h:365: error: 'traits_type' is not a class or namespace
streambuf_iterator.h:366: error: 'traits_type' is not a class or namespace
streambuf_iterator.h:368: error: request for member 'egptr' in '__sb->', which is of non-class type 'streambuf_type'
streambuf_iterator.h:368: error: request for member 'gptr' in '__sb->', which is of non-class type 'streambuf_type'
streambuf_iterator.h:371: error: 'traits_type' is not a class or namespace
streambuf_iterator.h:371: error: request for member 'gptr' in '__sb->', which is of non-class type 'streambuf_type'
streambuf_iterator.h:374: error: request for member 'gptr' in '__sb->', which is of non-class type 'streambuf_type'
streambuf_iterator.h:375: error: request for member 'gbump' in '__sb->', which is of non-class type 'streambuf_type'
streambuf_iterator.h:376: error: request for member 'sgetc' in '__sb->', which is of non-class type 'streambuf_type'
streambuf_iterator.h:379: error: request for member 'snextc' in '__sb->', which is of non-class type 'streambuf_type'
streambuf_iterator.h:382: error: 'traits_type' is not a class or namespace
streambuf_iterator.h:382: error: 'traits_type' is not a class or namespace
streambuf_iterator.h:383: error: request for member '_M_c' in '__first', which is of non-class type 'int'
streambuf_iterator.h:385: error: request for member '_M_sbuf' in '__first', which is of non-class type 'int'
In file included from basic_ios.h:39,
                 from ios:45,
                 from ostream:40,
                 from iostream:40,
                 from F:\temp\16139557.54574\Main.cc:3:
locale_facets.h: At global scope:
locale_facets.h:111: error: template argument 2 is invalid
locale_facets.h:112: error: template argument 2 is invalid
locale_facets.h: In function 'int std::__write(int, const _CharT*, int)':
locale_facets.h:114: error: request for member '_M_put' in '__s', which is of non-class type 'int'
In file included from basic_ios.h:39,
                 from ios:45,
                 from ostream:40,
                 from iostream:40,
                 from F:\temp\16139557.54574\Main.cc:3:
locale_facets.h: At global scope:
locale_facets.h:1643: error: wrong number of template arguments (1, should be 3)
basic_string.h:104: error: provided for 'template<class _CharT, class _Traits, class _Alloc> class std::basic_string'
locale_facets.h:1744: error: 'string' does not name a type
locale_facets.h:1812: error: 'string' does not name a type
locale_facets.h:1872: error: wrong number of template arguments (1, should be 3)
basic_string.h:104: error: provided for 'template<class _CharT, class _Traits, class _Alloc> class std::basic_string'
locale_facets.h:2102: error: 'string' has not been declared
In file included from locale_facets.h:2599,
                 from basic_ios.h:39,
                 from ios:45,
                 from ostream:40,
                 from iostream:40,
                 from F:\temp\16139557.54574\Main.cc:3:
locale_facets.tcc:123: error: expected ',' or '...' before '&' token
locale_facets.tcc:131: error: 'string' has not been declared
locale_facets.tcc: In member function '_InIter std::num_get<_CharT, _InIter>::_M_extract_float(_InIter, _InIter, std::ios_base&, std::_Ios_Iostate&, int&) const':
locale_facets.tcc:190: error: 'string' was not declared in this scope
locale_facets.tcc:190: error: expected ';' before '__found_grouping'
locale_facets.tcc:192: error: '__found_grouping' was not declared in this scope
locale_facets.tcc:256: error: '__found_grouping' was not declared in this scope
locale_facets.tcc:263: error: request for member 'clear' in '__xtrc', which is of non-class type 'int'
locale_facets.tcc:277: error: '__found_grouping' was not declared in this scope
locale_facets.tcc:300: error: '__found_grouping' was not declared in this scope
locale_facets.tcc:336: error: '__found_grouping' was not declared in this scope
locale_facets.tcc: In member function '_InIter std::num_get<_CharT, _InIter>::_M_extract_int(_InIter, _InIter, std::ios_base&, std::_Ios_Iostate&, _ValueT&) const':
locale_facets.tcc:447: error: 'string' was not declared in this scope
locale_facets.tcc:447: error: expected ';' before '__found_grouping'
locale_facets.tcc:449: error: '__found_grouping' was not declared in this scope
locale_facets.tcc:494: error: '__found_grouping' was not declared in this scope
locale_facets.tcc:534: error: '__found_grouping' was not declared in this scope
locale_facets.tcc:547: error: '__found_grouping' was not declared in this scope
locale_facets.tcc: In member function 'virtual _InIter std::num_get<_CharT, _InIter>::do_get(_InIter, _InIter, std::ios_base&, std::_Ios_Iostate&, float&) const':
locale_facets.tcc:673: error: 'string' was not declared in this scope
locale_facets.tcc:673: error: expected ';' before '__xtrc'
locale_facets.tcc:674: error: '__xtrc' was not declared in this scope
locale_facets.tcc: In member function 'virtual _InIter std::num_get<_CharT, _InIter>::do_get(_InIter, _InIter, std::ios_base&, std::_Ios_Iostate&, double&) const':
locale_facets.tcc:688: error: 'string' was not declared in this scope
locale_facets.tcc:688: error: expected ';' before '__xtrc'
locale_facets.tcc:689: error: '__xtrc' was not declared in this scope
locale_facets.tcc: In member function 'virtual _InIter std::num_get<_CharT, _InIter>::do_get(_InIter, _InIter, std::ios_base&, std::_Ios_Iostate&, long double&) const':
locale_facets.tcc:720: error: 'string' was not declared in this scope
locale_facets.tcc:720: error: expected ';' before '__xtrc'
locale_facets.tcc:721: error: '__xtrc' was not declared in this scope
locale_facets.tcc: At global scope:
locale_facets.tcc:1265: error: template argument 2 is invalid
locale_facets.tcc:1266: error: template argument 2 is invalid
locale_facets.tcc:1278: error: template argument 2 is invalid
locale_facets.tcc:1279: error: template argument 2 is invalid
locale_facets.tcc:1279: error: template-id 'use_facet<<expression error> >' for 'const int& std::use_facet(const std::locale&)' does not match any template declaration
locale_facets.tcc:1282: error: template argument 2 is invalid
locale_facets.tcc:1283: error: template argument 2 is invalid
locale_facets.tcc:1283: error: template-id 'use_facet<<expression error> >' for 'const int& std::use_facet(const std::locale&)' does not match any template declaration
locale_facets.tcc:1295: error: template argument 2 is invalid
locale_facets.tcc:1295: error: template-id 'has_facet<<expression error> >' for 'bool std::has_facet(const std::locale&)' does not match any template declaration
locale_facets.tcc:1299: error: template argument 2 is invalid
locale_facets.tcc:1299: error: template-id 'has_facet<<expression error> >' for 'bool std::has_facet(const std::locale&)' does not match any template declaration
locale_facets.tcc:1304: error: template argument 2 is invalid
locale_facets.tcc:1305: error: template argument 2 is invalid
locale_facets.tcc:1317: error: template argument 2 is invalid
locale_facets.tcc:1318: error: template argument 2 is invalid
locale_facets.tcc:1318: error: template-id 'use_facet<<expression error> >' for 'const int& std::use_facet(const std::locale&)' does not match any template declaration
locale_facets.tcc:1321: error: template argument 2 is invalid
locale_facets.tcc:1322: error: template argument 2 is invalid
locale_facets.tcc:1322: error: template-id 'use_facet<<expression error> >' for 'const int& std::use_facet(const std::locale&)' does not match any template declaration
locale_facets.tcc:1334: error: template argument 2 is invalid
locale_facets.tcc:1334: error: template-id 'has_facet<<expression error> >' for 'bool std::has_facet(const std::locale&)' does not match any template declaration
locale_facets.tcc:1338: error: template argument 2 is invalid
locale_facets.tcc:1338: error: template-id 'has_facet<<expression error> >' for 'bool std::has_facet(const std::locale&)' does not match any template declaration
In file included from basic_ios.h:471,
                 from ios:45,
                 from ostream:40,
                 from iostream:40,
                 from F:\temp\16139557.54574\Main.cc:3:
basic_ios.tcc:178: error: template argument 2 is invalid
basic_ios.tcc:181: error: template argument 2 is invalid
In file included from ostream:565,
                 from iostream:40,
                 from F:\temp\16139557.54574\Main.cc:3:
ostream.tcc:360: error: template argument 2 is invalid
ostream.tcc:361: error: template-id 'endl<>' for 'std::ostream& std::endl(std::ostream&)' does not match any template declaration
ostream.tcc:362: error: template-id 'ends<>' for 'std::ostream& std::ends(std::ostream&)' does not match any template declaration
ostream.tcc:363: error: template-id 'flush<>' for 'std::ostream& std::flush(std::ostream&)' does not match any template declaration
ostream.tcc:364: error: 'std::ostream& std::operator<<(std::ostream&, char)' must have an argument of class or enumerated type
ostream.tcc:365: error: 'std::ostream& std::operator<<(std::ostream&, unsigned char)' must have an argument of class or enumerated type
ostream.tcc:366: error: 'std::ostream& std::operator<<(std::ostream&, signed char)' must have an argument of class or enumerated type
ostream.tcc:367: error: 'std::ostream& std::operator<<(std::ostream&, const char*)' must have an argument of class or enumerated type
ostream.tcc:368: error: 'std::ostream& std::operator<<(std::ostream&, const unsigned char*)' must have an argument of class or enumerated type
ostream.tcc:369: error: 'std::ostream& std::operator<<(std::ostream&, const signed char*)' must have an argument of class or enumerated type
ostream.tcc:371: error: 'ostream' is not a class or namespace
ostream.tcc:371: error: '_M_insert' is not a template function
ostream.tcc:372: error: 'ostream' is not a class or namespace
ostream.tcc:372: error: '_M_insert' is not a template function
ostream.tcc:373: error: 'ostream' is not a class or namespace
ostream.tcc:373: error: '_M_insert' is not a template function
ostream.tcc:375: error: 'ostream' is not a class or namespace
ostream.tcc:375: error: '_M_insert' is not a template function
ostream.tcc:376: error: 'ostream' is not a class or namespace
ostream.tcc:376: error: '_M_insert' is not a template function
ostream.tcc:378: error: 'ostream' is not a class or namespace
ostream.tcc:378: error: '_M_insert' is not a template function
ostream.tcc:379: error: 'ostream' is not a class or namespace
ostream.tcc:379: error: '_M_insert' is not a template function
ostream.tcc:380: error: 'ostream' is not a class or namespace
ostream.tcc:380: error: '_M_insert' is not a template function
ostream.tcc:383: error: template argument 2 is invalid
ostream.tcc:384: error: template-id 'endl<>' for 'std::wostream& std::endl(std::wostream&)' does not match any template declaration
ostream.tcc:385: error: template-id 'ends<>' for 'std::wostream& std::ends(std::wostream&)' does not match any template declaration
ostream.tcc:386: error: template-id 'flush<>' for 'std::wostream& std::flush(std::wostream&)' does not match any template declaration
ostream.tcc:387: error: 'std::wostream& std::operator<<(std::wostream&, wchar_t)' must have an argument of class or enumerated type
ostream.tcc:388: error: 'std::wostream& std::operator<<(std::wostream&, char)' must have an argument of class or enumerated type
ostream.tcc:389: error: 'std::wostream& std::operator<<(std::wostream&, const wchar_t*)' must have an argument of class or enumerated type
ostream.tcc:390: error: 'std::wostream& std::operator<<(std::wostream&, const char*)' must have an argument of class or enumerated type
ostream.tcc:392: error: 'wostream' is not a class or namespace
ostream.tcc:392: error: '_M_insert' is not a template function
ostream.tcc:393: error: 'wostream' is not a class or namespace
ostream.tcc:393: error: '_M_insert' is not a template function
ostream.tcc:394: error: 'wostream' is not a class or namespace
ostream.tcc:394: error: '_M_insert' is not a template function
ostream.tcc:396: error: 'wostream' is not a class or namespace
ostream.tcc:396: error: '_M_insert' is not a template function
ostream.tcc:397: error: 'wostream' is not a class or namespace
ostream.tcc:397: error: '_M_insert' is not a template function
ostream.tcc:399: error: 'wostream' is not a class or namespace
ostream.tcc:399: error: '_M_insert' is not a template function
ostream.tcc:400: error: 'wostream' is not a class or namespace
ostream.tcc:400: error: '_M_insert' is not a template function
ostream.tcc:401: error: 'wostream' is not a class or namespace
ostream.tcc:401: error: '_M_insert' is not a template function
In file included from iostream:41,
                 from F:\temp\16139557.54574\Main.cc:3:
istream:592: error: template argument 2 is invalid
istream:593: error: template argument 2 is invalid
istream:594: error: invalid type in declaration before '(' token
istream:594: error: 'char_type' was not declared in this scope
istream:594: error: '__s' was not declared in this scope
istream:594: error: expected primary-expression before '__n'
istream:594: error: 'char_type' was not declared in this scope
istream:594: error: initializer expression list treated as compound expression
istream:597: error: template argument 2 is invalid
istream:598: error: template argument 2 is invalid
istream:599: error: invalid type in declaration before ';' token
istream:599: error: 'ignore' is not a template function
istream:602: error: template argument 2 is invalid
istream:603: error: template argument 2 is invalid
istream:604: error: 'int_type' has not been declared
istream:604: error: invalid type in declaration before ';' token
istream:604: error: 'ignore' is not a template function
istream:608: error: template argument 2 is invalid
istream:609: error: template argument 2 is invalid
istream:610: error: invalid type in declaration before '(' token
istream:610: error: 'char_type' was not declared in this scope
istream:610: error: '__s' was not declared in this scope
istream:610: error: expected primary-expression before '__n'
istream:610: error: 'char_type' was not declared in this scope
istream:610: error: initializer expression list treated as compound expression
istream:613: error: template argument 2 is invalid
istream:614: error: template argument 2 is invalid
istream:615: error: invalid type in declaration before ';' token
istream:615: error: 'ignore' is not a template function
istream:618: error: template argument 2 is invalid
istream:619: error: template argument 2 is invalid
istream:620: error: 'int_type' has not been declared
istream:620: error: invalid type in declaration before ';' token
istream:620: error: 'ignore' is not a template function
istream:740: error: template argument 2 is invalid
istream:741: error: template argument 2 is invalid
istream:741: error: invalid type in declaration before ';' token
istream:741: error: 'int& std::operator>>(int&, char*)' must have an argument of class or enumerated type
In file included from istream:830,
                 from iostream:41,
                 from F:\temp\16139557.54574\Main.cc:3:
istream.tcc:971: error: template argument 2 is invalid
istream.tcc:972: error: template-id 'ws<>' for 'std::istream& std::ws(std::istream&)' does not match any template declaration
istream.tcc:973: error: 'std::istream& std::operator>>(std::istream&, char&)' must have an argument of class or enumerated type
istream.tcc:974: error: 'std::istream& std::operator>>(std::istream&, char*)' must have an argument of class or enumerated type
istream.tcc:975: error: 'std::istream& std::operator>>(std::istream&, unsigned char&)' must have an argument of class or enumerated type
istream.tcc:976: error: 'std::istream& std::operator>>(std::istream&, signed char&)' must have an argument of class or enumerated type
istream.tcc:977: error: 'std::istream& std::operator>>(std::istream&, unsigned char*)' must have an argument of class or enumerated type
istream.tcc:978: error: 'std::istream& std::operator>>(std::istream&, signed char*)' must have an argument of class or enumerated type
istream.tcc:980: error: 'istream' is not a class or namespace
istream.tcc:980: error: '_M_extract' is not a template function
istream.tcc:981: error: 'istream' is not a class or namespace
istream.tcc:981: error: '_M_extract' is not a template function
istream.tcc:982: error: 'istream' is not a class or namespace
istream.tcc:982: error: '_M_extract' is not a template function
istream.tcc:983: error: 'istream' is not a class or namespace
istream.tcc:983: error: '_M_extract' is not a template function
istream.tcc:984: error: 'istream' is not a class or namespace
istream.tcc:984: error: '_M_extract' is not a template function
istream.tcc:986: error: 'istream' is not a class or namespace
istream.tcc:986: error: '_M_extract' is not a template function
istream.tcc:987: error: 'istream' is not a class or namespace
istream.tcc:987: error: '_M_extract' is not a template function
istream.tcc:989: error: 'istream' is not a class or namespace
istream.tcc:989: error: '_M_extract' is not a template function
istream.tcc:990: error: 'istream' is not a class or namespace
istream.tcc:990: error: '_M_extract' is not a template function
istream.tcc:991: error: 'istream' is not a class or namespace
istream.tcc:991: error: '_M_extract' is not a template function
istream.tcc:992: error: 'istream' is not a class or namespace
istream.tcc:992: error: '_M_extract' is not a template function
istream.tcc:994: error: template argument 2 is invalid
istream.tcc:997: error: template argument 2 is invalid
istream.tcc:998: error: template-id 'ws<>' for 'std::wistream& std::ws(std::wistream&)' does not match any template declaration
istream.tcc:999: error: 'std::wistream& std::operator>>(std::wistream&, wchar_t&)' must have an argument of class or enumerated type
istream.tcc:1000: error: 'std::wistream& std::operator>>(std::wistream&, wchar_t*)' must have an argument of class or enumerated type
istream.tcc:1002: error: 'wistream' is not a class or namespace
istream.tcc:1002: error: '_M_extract' is not a template function
istream.tcc:1003: error: 'wistream' is not a class or namespace
istream.tcc:1003: error: '_M_extract' is not a template function
istream.tcc:1004: error: 'wistream' is not a class or namespace
istream.tcc:1004: error: '_M_extract' is not a template function
istream.tcc:1005: error: 'wistream' is not a class or namespace
istream.tcc:1005: error: '_M_extract' is not a template function
istream.tcc:1006: error: 'wistream' is not a class or namespace
istream.tcc:1006: error: '_M_extract' is not a template function
istream.tcc:1008: error: 'wistream' is not a class or namespace
istream.tcc:1008: error: '_M_extract' is not a template function
istream.tcc:1009: error: 'wistream' is not a class or namespace
istream.tcc:1009: error: '_M_extract' is not a template function
istream.tcc:1011: error: 'wistream' is not a class or namespace
istream.tcc:1011: error: '_M_extract' is not a template function
istream.tcc:1012: error: 'wistream' is not a class or namespace
istream.tcc:1012: error: '_M_extract' is not a template function
istream.tcc:1013: error: 'wistream' is not a class or namespace
istream.tcc:1013: error: '_M_extract' is not a template function
istream.tcc:1014: error: 'wistream' is not a class or namespace
istream.tcc:1014: error: '_M_extract' is not a template function
istream.tcc:1016: error: template argument 2 is invalid
F:\temp\16139557.54574\Main.cc: In function 'int main()':
F:\temp\16139557.54574\Main.cc:48: error: expected primary-expression before '?' token
F:\temp\16139557.54574\Main.cc:48: error: expected primary-expression before '?' token
F:\temp\16139557.54574\Main.cc:48: error: expected primary-expression before '?' token
F:\temp\16139557.54574\Main.cc:48: error: expected primary-expression before 'int'
F:\temp\16139557.54574\Main.cc:48: error: expected ':' before 'int'
F:\temp\16139557.54574\Main.cc:48: error: expected primary-expression before 'int'
F:\temp\16139557.54574\Main.cc:48: error: expected ':' before 'int'
F:\temp\16139557.54574\Main.cc:48: error: expected primary-expression before 'int'
F:\temp\16139557.54574\Main.cc:48: error: expected ':' before 'int'
F:\temp\16139557.54574\Main.cc:48: error: expected primary-expression before 'int'
F:\temp\16139557.54574\Main.cc:48: error: expected ';' before 'int'
F:\temp\16139557.54574\Main.cc:50: error: expected primary-expression before '?' token
F:\temp\16139557.54574\Main.cc:50: error: expected primary-expression before '?' token
F:\temp\16139557.54574\Main.cc:50: error: expected primary-expression before '?' token
F:\temp\16139557.54574\Main.cc:50: error: expected primary-expression before 'while'
F:\temp\16139557.54574\Main.cc:50: error: expected ':' before 'while'
F:\temp\16139557.54574\Main.cc:50: error: expected primary-expression before 'while'
F:\temp\16139557.54574\Main.cc:50: error: expected ':' before 'while'
F:\temp\16139557.54574\Main.cc:50: error: expected primary-expression before 'while'
F:\temp\16139557.54574\Main.cc:50: error: expected ':' before 'while'
F:\temp\16139557.54574\Main.cc:50: error: expected primary-expression before 'while'
F:\temp\16139557.54574\Main.cc:50: error: expected ';' before 'while'
F:\temp\16139557.54574\Main.cc:98: error: expected '}' at end of input
*/

Double click to view unformatted code.


Back to problem 1007