ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Common Board

iostream and STL cause compilation error in C++
Posted by Tsuyoshi Ito 8 Oct 2001 12:35
Hello,
I'm new to this Online Judge system at Ural State
University.

It seems some include files are installed inproperly in C++
judge environment.

The following program should solve Problem 1000, but I got
compile error.

/* TIMUS @JUDGE_ID: 13100FM 1000 C++ */
#include <iostream>
using namespace std;
int main()
{
    int a, b;
    cin >> a >> b;
    cout << (a + b) << endl;
    return 0;
}

The output from the compiler:
e:\judge\include\streambuf(9) : fatal error C1083: Cannot
open include file: 'xlocnum': No such file or directory

The program above compiles successfully on my environment
(Solaris 8 on Sparc processors, with GCC 2.95.3).   I tried
``g++ -ansi -pedantic -Wall'' on it and it still compiles
without any warnings.

I modified
#include <iostream>
to
#include <iostream.h>
then I got Accepted response.

Besides, including <vector> in STL also seems to cause
compile error:
e:\judge\include\memory(9) : fatal error C1083: Cannot open
include file: 'xmemory': No such file or directory

Have I done something wrong? Or is this a known issue?

Thank you.
Not all standard inludes are available
Posted by Marat Bakirov 8 Oct 2001 18:54
List of available includes:

algorithm
ASSERT.H
BITSET
CASSERT
CCTYPE
CERRNO
CFLOAT
CISO646
CLIMITS
CLOCALE
CMATH
COMPLEX
CSETJMP
CSIGNAL
CSTDARG
CSTDDEF
CSTDIO
CSTDLIB
CSTRING
CTIME
CTYPE.H
CWCHAR
CWCTYPE
DEQUE
EH.H
ERRNO.H
exception
FCNTL.H
FLOAT.H
FSTREAM
FSTREAM.H
functional
IOMANIP
IOMANIP.H
IOS
IOS.H
IOSFWD
IOSTREAM
IOSTREAM.H
ISO646.H
ISTREAM
ISTREAM.H
ITERATOR
LIMITS
LIMITS.H
LIST
LOCALE
LOCALE.H
MAP
MATH.H
MEMORY
MEMORY.H
NUMERIC
OSTREAM
OSTREAM.H
QUEUE
SET
SETJMP.H
SIGNAL.H
SSTREAM
STACK
STDARG.H
STDDEF.H
stdexcept
STDIO.H
STDLIB.H
STREAMB.H
streambuf
STRING
STRING.H
STRSTREA.H
strstream
TIME.H
USEOLDIO.H
UTILITY
VALARRAY
VECTOR
WCHAR.H
WCTYPE.H
I cannot use vector, either
Posted by Tsuyoshi Ito 11 Oct 2001 22:09
Then I wonder why the following program gets compilation
error, too:

/* TIMUS @JUDGE_ID: 13100FM 1000 C++ */
#include <iostream.h>
#include <vector>
int main()
{
    int i,j;
    cin >> i >> j;
    cout << i+j;
    return 0;
}

(I know that in the code above, including <vector> is
unnecessary; it's just an example. Actually I want to use
<vector> and other STL stuff in more complex problems.)

Note that the two include files <iostream.h> and <vector>
are in the "List of available includes."

The error returned is:
e:\judge\include\memory(9) : fatal error C1083: Cannot open
include file: 'xmemory': No such file or directory

I'm still afraid that some include files are missing or
improperly installed.

I hope this will help.  Thank you.