Pagini recente » Cod sursa (job #1199190) | Cod sursa (job #2375873) | Cod sursa (job #1647420) | Cod sursa (job #67973) | Cod sursa (job #1349185)
//============================================================================
// Name : ConvertorCPP.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
int main() {
ifstream fin;
ofstream fout;
fin.open("convertor.in");
fout.open("convertor.out");
char linie[2048];
int lungime, counting;
char aux;
lungime = 0;
counting = 0;
int i;
fin.get(aux);//aux = getchar();
while(!fin.eof()){//aux != EOF){
if(aux == '{' && counting == 0){
lungime = 0;
counting = 1;
}
if(aux != '\n' && counting == 1){
linie[lungime] = aux;
lungime++;
}
if(aux =='}' && counting == 1){
counting = 0;
cout<<linie<<endl;
for(i = 0; i < 2048; i++)
linie[i] = '\0';
}
fin.get(aux);//aux = fin.getchar();
}
//cout<<"mere";
fin.close();
fout.close();
return 0;
}