Posted by Bo0mer Sat 20th Jan 2007 14:39 - Syntax is PHP - 18 viewsRun this post in the PHP shell
Download | New Post | Modify | Diff | Hide line numbers
PHP parser reported the following syntax error in this post:
Parse error: syntax error, unexpected T_STRING in post on line 3
  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. }
  31.        

PermaLink to this entry https://pastebin.co.uk/9364

The following amendments have been posted:

  1. Bo0mer (Sat 20th Jan 2007 14:39)
Posted by Bo0mer Sat 20th Jan 2007 14:39 - Syntax is PHP - 18 viewsRun this post in the PHP shell
Download | New Post | Modify | Diff | Hide line numbers