Judge's annoying compiler

Write here if you have problems with your C++ source code

Moderator: Board moderators

Post Reply
4l1
New poster
Posts: 2
Joined: Tue Mar 13, 2007 6:19 pm

Judge's annoying compiler

Post by 4l1 »

Hi,

would someone authoritative please let me know what compiler and settings does the judge use? It took me an hour to pin down the specific problem that judge will refuse the following C++ code with compiler error:

Code: Select all

#include <iostream>
#include <iomanip>
#include <algorithm>

using namespace std;

int main()
{
    cout << fixed << 3.00;
    return 0;
}
I've tried it on various versions of GCC and VC++ with all the warnings etc. enabled and none complained. I really wonder how does judge manage to refuse it.

Thanks.
rjhadley
Learning poster
Posts: 73
Joined: Mon Oct 14, 2002 7:15 am
Location: United States

Post by rjhadley »

gcc 2.95.3

Have you tried something like ios::fixed? of using cout.setf(ios:fixed)?
Post Reply

Return to “C++”