Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdlib>
- #include <iostream>
- #include <stdlib.h>
- #include <string.h>
- using namespace std;
- int Compare (string a, string b, int c)
- {
- int i, n, j=0;
- n = a.size();
- for (i=0;i<n;i++)
- {
- if (a[i] == b[c+i])
- j++;
- }
- if (j == n)
- return 1;
- else
- return 0;
- }
- int main()
- {
- int i=0, j=0, n=0, k=0;
- string input;
- input = "imagine a really really big string here";
- n = input.size();
- string Map[200];
- for (i=0;i<n;i++)
- {
- if (Compare("Competitive", input, i) == 1)
- {
- j++;
- i = i + 11;
- while (Compare("GMT", input, i) == 0)
- {
- Map[j][i] = input[i];
- i++;
- }
- }
- }
- cout << Map[1];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement