Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Technical Support » Other » new fds bot, c++ php, perl
Re: new fds bot, c++ php, perl [message #208585 is a reply to message #208554] Mon, 17 July 2006 19:23 Go to previous messageGo to previous message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma:
General (3 Stars)
help-linux wrote on Mon, 17 July 2006 21:45


bool find_new_text(string &line)
{
	string st;
	string day, mon, year;
	get_date(day, mon, year);
	st.assign("ssaow_"+mon+"-"+day+"-"+year+".txt");
	ifstream file;
	file.open(st.c_str(), ios::in);
	char buf[50];
	if(file.is_open())
	{
		file.getline(buf, 50);
		line.assign(buf);
		file.close();
		if(remove(line.c_str()) == -1)
                {
                        cout << "could not delete";   //Changed this
                }
		return 1;
	}
	else
	{
		return 0;
	}
	return 0;

}
void pre_parse()
{
	string find;
	while(1)
	{
		if(find_new_text(find))
		{
			parse(find);
			find.clear();
		}
	}
}
void parse(string line)
{
	stringstream strs;
	int f = 11;
        if(!line.enpty())  // added this
        {
	          while(f != line.size())
	          {
		         strs << line[f++];
	          }
        }
	cout << endl << strs.str();
}




it works now, i will be posting code next week i hope!
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Can some1 help me
Next Topic: German Need help
Goto Forum:
  


Current Time: Wed Dec 04 13:42:26 MST 2024

Total time taken to generate the page: 0.01351 seconds