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

About compilation.
Posted by Matvey Kazakov 4 May 2001 23:36
Dear sir/madam,
Could you, please, point out what compilers do you use?
It's very important.
On problem 1054 I received compilation error on the first
attempt (#32413), although my VC++6.0 compiler did not find
any mistakes.
the problem was the following:
--- error ---
    for (long i = 0; i < n; i++) cin >> d[i];
    for (i = 1; i < 31; i++) st2[i] = 2*st2[i-1]; <<
here you said "temp\32413(28) : error C2065: 'i' :
undeclared identifier"
--- I corrected it -------
    long i;
    for (i = 0; i < n; i++) cin >> d[i];
    for (i = 1; i < 31; i++) st2[i] = 2*st2[i-1];
--------------------------
In second case I received Accepted :(.
I suppose, the first case was correct too if we say about
C++.
Please, give some explanations.

Thank you in advance, Matvey Kazakov
(kazakov@green.ifmo.ru).
Re: About compilation.
Posted by Marat Bakirov 5 May 2001 01:21
There is an option in cl.exe (though i don't remember it
exactly, that disables microsoft extensions and leaves only
ANSI C++ limitations. I am not familiar with ANSI C++
standard. But you can look. )