Description: 1, substring statistics
[Problem Description]
Given a non-empty string and it s a substring, requested to prepare a program, statistics and output the substring sub in string appears
Number. Requirements: string allows, including letters, spaces, including arbitrary ASCII code number, is case-sensitive can not use any string
Library functions.
[Input data]
1.txt input data from the given file format: The first line is a non-empty string the second line is the non-empty string.
[Output data]
2.txt output data from the given file format: The first line is the number of occurrences of substring (not present output to 0).
[Sample Input]
abadef Aba34aBa56abab adhfgaba
aba
[Prompt] to achieve
This title examines the skilled use of pointers, requiring statistical process directly on the original string, that program can not redistribute another space.
To Search:
File list (Check if you may need any files):
mass.cpp