Posted by Bo0mer Sat 20th Jan 2007 14:39 - Syntax is C++ - 30 views
Modification of posting from Bo0mer Sat 20th Jan 2007 14:39
Download | New Post | Modify | Diff | Hide line numbers
  1. #include
  2. #include
  3. using namespace std;
  4. int index(char from[32767], int code, int startpos)
  5. {
  6.     int i, j = 0;
  7.     if (startpos != 0)
  8.         int k = startpos;
  9.     for (i = 0; i < strlen(from); i++)
  10.     {
  11.         if ((int)from[i] == code)
  12.         {
  13.             i = j; break;
  14.         }
  15.     }
  16. return j;
  17. }
  18.  
  19. int main()
  20. {
  21.     char from[32767];
  22.     char find[1];
  23.     cin >> from;
  24.     cin >> find;
  25.     int startpos = 0;
  26.     //cin >> startpos;
  27.     cout << index(from, (int)find[0], startpos);
  28.  
  29. return 0;
  30. }

PermaLink to this entry https://pastebin.co.uk/9365
Posted by Bo0mer Sat 20th Jan 2007 14:39 - Syntax is C++ - 30 views
Modification of posting from Bo0mer Sat 20th Jan 2007 14:39
Download | New Post | Modify | Diff | Hide line numbers