Hi,
I want to know how to read multiple text files in this program...
I have 5 text files(order1,order2,...order5)
Can anyone pls help me with this?
I use DevC++.
#include<iostream.h>
#include<fstream.h>
#include<conio.h>
#include<windows.h>
using namespace std;
class{
public:
void menu()
{
ifstream menu;
menu.open("menu.txt");
string STRING;
string inFile_contents;
string previousLine="";
while(!menu.eof())
{
getline(menu,STRING); // Saves the line in STRING.
if (STRING != previousLine)
{
previousLine=STRING;
cout<<STRING<<endl; // Prints our STRING.
}
}
menu.close();
}
Hey I also have another problem can you pls help me with that.
I another question which I have posted "Reading contents And Calculating" in this same board.
Can pls go through it and help me out??
Thank You