|
From: sam R. <as...@ya...> - 2008-03-14 08:04:12
|
I'm sorry. i know this really simple, but can someone tell what is wrong with this code
#include <ctype.h>
#include <fstream>
int main()
{
ifstream infile("input.txt");
ofstream outfile("ouput.txt");
string line;
while (getline(infile,line))
{
for (int i=0; i<line.length(); i++)
if (i==0 || line[i-1] == ' ' && isalpha(line[i]))
line[i] = toupper(line[i]);
outfile << line << endl;
}
}
ERROR:
error C2065: 'ifstream' : undeclared identifier
---------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo! Search. |