Facebook
From Putrid Curlew, 1 Year ago, written in C.
">

A PHP Error was encountered

Severity: Notice

Message: Trying to access array offset on value of type bool

Filename: view/view.php

Line Number: 33

from

A PHP Error was encountered

Severity: Notice

Message: Trying to access array offset on value of type bool

Filename: view/view.php

Line Number: 33

- view diff
Embed
Download Paste or View Raw
Hits: 106
  1. #include <stdio.h>
  2. #include <ctype.h>
  3. #include <string.h>
  4.  
  5.  
  6. int main(void){
  7.     char s[100];
  8.     char s2[10];
  9.  
  10.     printf("Wprowadz tekst: ");
  11.     gets(s);
  12.  
  13.     printf("Wprowadz fraze: ");
  14.     gets(s2);
  15.  
  16.     char *search_ptr = strstr(s, s2);
  17.  
  18.     while(search_ptr){
  19.         printf("%s\n", search_ptr);
  20.         search_ptr = strstr(search_ptr+1, s2);
  21.     }
  22.  
  23.     return 0;
  24. }
  25.  
  26.  
  27.