Originally Posted by
arjunajay
I just made a program which searches for subtrings from a char* the hard way.
Really? Did you write it in C or C++?
Code:
C++ Code
//good ole i/o streams
cout << "Substring !";
Code:
C Code
//strange boolean enumeration
enum Bool{false, true};
Code:
Bad C++ Code
//.h headers are deprecated
//use <iostream> and the std namespace
#include<iostream.h>
Code:
Bad C Code
//use fgets
gets(a);
Code:
Just Plain Wrong Code
//use int main
void main()
Originally Posted by
arjunajay
This code is like noodles; Even I can't make out the head or tail of it now.
If you wrote it, surely you remember the logic of what you did. Explain to us the logic of your algorithm.