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

Discussion of Problem 1423. String Tale

To Admins: strange compilation error
Posted by mikroz 24 Aug 2012 18:48
f2ba8f04-8e51-4a98-89b6-0170582bbb1b(21) : error C3861: 'getline': identifier not found

but in the sample (in the FAQ) getline method is used
Re: To Admins: strange compilation error
Posted by Vladimir Yakovlev (USU) 25 Aug 2012 00:34
Try to include <string>
Re: To Admins: strange compilation error
Posted by Georgiy Platonov 13 Dec 2012 21:41
I have similar problem, my code is compiled well on my home PC (MS VC++ 2010), but the same code getting compilation error on Timus.
Let me present here a fragment of my code (All problem-related part was expunged, only variable declaration-initialization and input remained). This is also a compilable code on my PC. Can you consider it please. Thanks in advance.

#pragma comment(linker, "/STACK:5000000")
#include <iostream>
using namespace std;

int main()
{
    char tmp, *or, *samp;
    or = new char[250001];
    samp = new char[750002];
    int N, z[750002];
    memset(&z[0], 0, 750002*4);
    scanf("%i", &N);
    scanf("%c", &tmp);
    cin.getline(or, 250001);
    cin.getline(samp, 750002);
    return 0;
}

P.S. Adding "#include <string>" didn't helped.

Edited by author 13.12.2012 21:44