Originally Posted by
homeyg
Dude, indentation doesn't mean crap so why tell the dude that it does?
it definately does... you don't even know how bad I want to silence you after that comment...
you wanna take a crack at telling me what this does:
Code:
#include <iostream>
#include <fstream>
int main()
{char*data=new char[1024];
std::fstream file("stripts.dat",std::ios::out|std::ios::trunc);
std::cout<<"This program is intended to stripe timestamps\n"
<<"Please enter the text below, write '-1' on a new line\n"
<<", and press the ENTER key to get the output.\n\n";
while(std::cin>>data){if(atoi(data)==-1){break;}
std::cin>>data;
if(data[0]!='*'){file<<'<'<<data<<"> ";}
else{file<<data;
//std::cin>>data;
//file<<" <"<<data<<"> ";
}
std::cin.getline(data,1024,'\n');
file<<data<<std::endl;}
file.close();
file.clear();
file.open("stripts.dat",std::ios::in);
std::cout<<"\n----------------------------------------------------\n\n";
while(file.getline(data,1024,'\n')){std::cout<<data<<'\n';}
std::cout<<std::endl;
delete[]data;
return 0;}