[HELP]Ping bomber

Posts 17 of 7 · Page 1 of 1
[HELP]Ping bomber
I am working on making a ping bomber. here is my code so far...
Code:
#include <iostream>
#include "windows.h"
#include <string>
using namespace std;
int system(const char *command);

int main()
{
system ("color a");

	std::string website;
	std::cout<<"Enter a website that you want to bomb: ";
	std::cin>>website;
	std::string command = "ping " + website;
	system((const char*)command.c_str());
	 std::cout << "Attack Complete" << endl;
	 system ("pause");
return (0) ;

}
This works for one ping command... but at soon as i add in another
Code:
std::string command = "ping " + website;
i get errors when i compile it..
whats wrong with my code?
That's never going to work.

Furthermore, it operates on a single thread.
you already [php]using namespace std[/php]

why are you using [php]std::cout and std::cin[/php]
Quote Originally Posted by fvestrgenrl View Post
I am working on making a ping bomber. here is my code so far...
Code:
#include <iostream>
#include "windows.h"
#include <string>
using namespace std;
int system(const char *command);

int main()
{
system ("color a");

	std::string website;
	std::cout<<"Enter a website that you want to bomb: ";
	std::cin>>website;
	std::string command = "ping " + website;
	system((const char*)command.c_str());
	 std::cout << "Attack Complete" << endl;
	 system ("pause");
return (0) ;

}
This works for one ping command... but at soon as i add in another
Code:
std::string command = "ping " + website;
i get errors when i compile it..
whats wrong with my code?
It gives you an error because you are declaring command String twice, and you can't... (you are using string command = xxx 2 times)
Thanks for the help.
/request close
Posts 17 of 7 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?