Nie wiem czy w tym dziale ale mam problem dot. spoj Flamaster. a mianowicie kod oparłem na getche () i potrzebuje biblioteke conio.h a sędzia wywala mi coś takiego:
“prog.cpp:2:19: fatal error: conio.h: No such file or directory
#include <conio.h>
^
compilation terminated.”
kod wygląda tak:
#include <iostream>
#include <conio.h>
using namespace std;
int main()
{
char ciag[200] ;
int i=0,ileprob=0;
cin>>ileprob;
for (ileprob;ileprob>0;ileprob--)
{
for (i=0;i<200;i++)
ciag[i]=' ';
i=0;
do
{i=i+1;
ciag[i] = getche();
}
while (isspace(ciag[i])==false);
int h=1;
cout<<endl;
for (int j=1;j<i;j++)
{if (ciag[j]==ciag[j+1])
h=h+1;
else
{
switch(h)
{case 1:
{cout<<ciag[j];h=1;break;}
case 2:
{cout<<ciag[j]<<ciag[j];h=1;break;}
default:
{cout<<ciag[j]<<h;
h=1;break;}
}}}}
return 0;
}
Muszę zrezygnować z getche () czy mogę to jakoś przepchnąć.
Proszę o wyrozumiałość jestem b. początkujący