please find what error in this program.while run it wont display the output

#include<iostream.h>
#include<fstream.h>
#include <stdio.h>
#include<conio.h>
#include <sys\stat.h>
class file
{
private:
int i;
int alphabet;
int space;
public:
void alphabets();
void spaces();
};
void file::alphabets()
{           alphabet=0;
fstream f;
char s;
f.open("NNEWFILE.TXT",ios::in|ios::app|ios::binary);
f.get(s);
while(s!=EOF )
{
if(i>63&&i<91||i>96&&i<123)
alphabet++;
}
printf("Number of alphabets%d\n",alphabet);
f.read((char *)this,sizeof(file));
f.close();
}
void file::spaces()
{
space=0;
fstream f;
char s;
f.open("NNEWFILE.TXT",ios::in|ios::app|ios::binary);
f.get(s);
while(s!=EOF )
{   if(s==' ')
    space++;
}
printf("Number of spaces%d\n",space);
f.read((char *)this,sizeof(file));
f.close();
}
void main()
{
file file;
int choice;
do
{
printf("1. No of lines:2. No of Words:");
scanf("%d",&choice);
switch(choice)
{
case 1:
file.alphabets();
break ;
case 2:
file.spaces();
default:
printf("invalid choice");
}
}while(choice!=3);
}

You're probably going to need to do better than that to get a reasonable response. What is the code supposed to do? What is the actual problem? Are there compilation errors, does it crash with some error? Also, use code tags to make your code readable.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.