954,492 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

please help with these error problems

#include
using namespace std;
#include
#include

int main()
{

char list1[50][31],list2[50][31],list3[100][31];
int i, size1, size2, i1, i2, i3;
char ch;
int inf;
ifstream indata;
ofstream outdata;

// read each list
while(inf.peek()= EOF)
{
inf>> list1[i];
i++;
size 1=i;
i=0;
}
while(inf.peek()= EOF)
{
inf>>list2[i]; i++;
}
size 2=i;

while(i1< size1 && i2 < size 2)
{
if (list1[i1]< list2[i2])
{
list3[i3]=list1[i2];
i3++; i1++;
}

else
if(list2[i2]>"everything left on list1 to list3:";
inf.getline(name[i]);
}
if(i2 >'
C:\assign3.cpp(14) : error C2079: 'outdata' uses undefined class 'basic_ofstream >'
C:\assign3.cpp(18) : error C2228: left of '.peek' must have class/struct/union type
C:\assign3.cpp(18) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Error executing cl.exe.

assign3.exe - 4 error(s), 0 warning(s)

missy
Newbie Poster
13 posts since Nov 2004
Reputation Points: 10
Solved Threads: 0
 

missy\assign3.cpp: error C0001: missing code tags

frrossk
Posting Whiz in Training
220 posts since Sep 2004
Reputation Points: 17
Solved Threads: 9
 

add this to the top of your file

#include <fstream>
Intel
Light Poster
30 posts since Feb 2005
Reputation Points: 10
Solved Threads: 1
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You