Problems with

I need your help guys! I have to create a file and write something in it (it could be .txt). Then I have to make a program that reads the .txt file and inputs in another one (with any extension) the phrases that aren't common in it.
So if the file says:
generally
normally

The output file should say:
"gene" "ene" "ne"
"no"

It has to have 2 or more letters. The phrases like "rally", "lly", "ly", etc should not appear because they're ambiguous.

If the are not any non ambiguous phrases, in the output file should appear a blank space (endl).

I expect your answer!
hi,
create fstream/ifstream/ofstream object which will read/write/open/close some file.
did you learn in the scool about fstream and file pointers?
I've learned some. This is what I've done:


//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

//---------------------------------------------------------------------------
#include <conio.h>
#include <iostream.h>
#include <stdio.h>
#include <fstream.h>
#include <string.h>
using namespace std;
int i, z;
string v[100];
string word, letter;
void show(int h);
void calculation(int i);
#pragma argsused
int main(int argc, char* argv[])
{
fstream file;
file.open("ident.in", ios::in);

for (i=0;i<=100;i++)
{
file>>v[100];
}
file.close();


calculation(z);





getch();


return 0;
}
//---------------------------------------------------------------------------

void show(int h)
{
fstream file2;

h=v.length();
if (h!=0)
{
file2.open("ident.out", ios::out);
file2<<v[100]<<"\n";
show(h-1);
}
file2.close();
}


void calculation(int i)
{
i= v.length();
if(i!=0)
{
word=v[0];
}
calculation(i-1);
}


Tough it doesn't work, it is all I got until now.
Topic archived. No new replies allowed.