C++ almost done

//my first programming project
#include <iostream>
#include <string>
using namespace std;

int main ()
{
string thanos, ultron;
int rogers, stark, logan, i;
rogers = 0;
stark = 0;
logan = 0;
i = 0;

do
{
cout << "please enter the first string: ";
cin >> thanos;
for (i = 0; thanos [i] != '\0'; i++)
rogers++;
cout << "the length of the first string is: " << rogers << endl;
cout << "please enter the second string: ";
cin >> ultron;
for (i = 0; ultron [i] != '\0'; i++)
stark++;
cout << "the length of the second string is: " << stark << endl;
; }
while (stark > rogers);

if(thanos[i]==ultron[logan])
cout<<"Substring found at position: ";
else
cout<<"Substring not found";

return 0;
}


Ive done this so far and im not sure what else to do. What i have to do towards the end is :

This step will require you to compute the lengths of both string. Your should do it yourself. You are NOT allowed to use build-in tools for finding string length (like strlen() )

6) Output the line "The occurances were found in the following positions: " and then from the new string you list all the positions separated by space. If nothing was found then instead of list of positions message "Required substring was not found".

7) If at least one occurance of short string was found in the long string output the total number of occurances in the following format on the separate line

"Total number of occurances is #number_of_occurances"

Thanks!
Topic archived. No new replies allowed.