ok i want to create a database that wil store everythin in a text file and at the moment im in the stage that im thinging of the algorithm
everything will be stored in a text file but im thinging of storing all the elements of the text in a class
i used this algorithm in a previous program of mine and it works
i mean it recognizes space and the enter i used there ascii values for it
// Open and reads file into array
FILE *afile;
FILE *bfile;
afile=fopen("sample.txt","r");
//opens the sapmle program and stores it into an array
for(count=0;count<340;count++)
{
temparray[count]=(char)fgetc(afile);
}
fclose(afile);
count=0;
for(i=0;i<340;i++)
{
if((temparray[i]==32) ||( temparray[i]==10))
{
count++;
j=0;
}
else
{
temp2[count].name[j]=temparray[i];
j++;
}
}
my question is would this be easy for me to implement i mean lets say the search function or would it be easy to store them back to text file without everything beign deleted i mean my previous entries???