Dear all
This code first read a string then shows number of repetition of each character .
I wrote it by Borland 5.02 .

Good Luck !

//Number of each character repetition in a string
//programming by : Erfan Nasoori
//Email :
//Date of send : 2009/1/21

#include <iostream.h>
#include <conio.h>

void main()
 char *s;
 int n,i,j,flag[1000],c;


 s=new char[1000];

 cout<<"Please enter your string:"<<endl;

       	      if(flag[j]==0 && s[i]==s[j])

 	      if(s[i]!=' ')
 	         cout<<s[i]<<" : "<<c+1<<"\n";
 		 cout<<"Space: "<<c+1<<"\n";

Terrible snippet.

> <iostream.h> - use <iostream>
> void main - use int main
> s=new char[1000]; - you never freed that memory
> Badly formatted
> Inappropriate variable names used

hey William
< this code is not a grand program .
< when you use Borland <iostream> doesn't differ with <iostream.h>
< this dosen't need int main .
< would you like int main !?!
< also , its format just for you , what's your opinion ?!
please see user friendly information of student linked list .

have a good time !

int main() is not a choice, it's standard! Don't make people start ranting. Also iostream.h shouldn't be used either, there are a whole host of reasons....and Borland is out dated!

Also you really do need to free the memory! If you don't do it then people using the snippet wont unless they know exactly what is going on.

Hey freaky
you are very moody .
I didn't said bad pointing that you say me ... .

If you are contending man say me that :
How can we code factorial program just and just with main func recursively????

In this time we need to int main func ? isn't it?

can you utilize or call main func in other func ?