Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void wer( string s1, string *s2, int &i, int &t)
- {
- if( s1[i] == '{')
- {
- for( i; i !='}'; i++)
- {
- wer(s1,s2,i,t);
- s2[t]=s2[t]+s1[i];
- }
- s2[t]=s2[t]+s1[i];
- i++;
- return;
- }
- return;
- }
- void a(string s1, string *s2, int len, int& s2_sch)
- {
- int t=0,q=0;
- for(int i= 1; i<len; ++i)
- if(s1[i] == '}') q++;
- else{
- if(s1[i] =='{')
- {
- for(i; s1[i] != '}'; i++)
- {
- wer(s1, s2, i,t);
- if( s1[i] != '}')
- s2[t]=s2[t]+s1[i];
- i++;
- }
- }
- if(s1[i] == ',')
- {
- t++;
- s2_sch++;
- }
- else
- s2[t] = s2[t]+s1[i];
- }
- }
Add Comment
Please, Sign In to add comment