Hello everyone, I am having a slight problem with my program, and that is that It just doesn't seem to be working! I would like someone to help me fix it, because I can't do It myself. The main problem I am having is adding a string to a string,
example:
string data;
string input;
cin>>input;
data + "\n"input;
I know I must be doing something terribly wrong, I can just tell, but no other website has been able to help me!
Here's the sorce of the program I need help with, please be honest and don't pass it off as your own. The idea of the program is to allow a user to test their IP using some basic comands. Please don't write someting here about how dumb an Idea this program is, because all I'm trying to do Is get a little bit of programming practice.
Anyway, here's the code:
#include <iostream>
using namespace std;
//Startup Voids
void error_check();
void return_error();
void generate_command();
bool test_command();
//Errors
bool error;
bool done = false;
string command;
string fails;
//general
int main()
{
cout<<"Starting up..."<<endl;
error_check();
cout<<"Testing IP..."<<endl;
system("ipconfig");
cout<<"Connected!"<<endl;
system("cls");
}
void error_check()
{
cout<<"Checking for errors..."<<endl;
cout<<"Running error checks on commands:"<<endl;
while(done == false)
{
cout<<"Currently checking :"<<command<<endl;
test_command();
if(test_command == true)
{
cout<<"Failed"<<endl;
fails + "\n "command;
}
}
void return_error()
{
if(error == true)
{
cout<<"***********************************"<<endl;
cout<<"* *"<<endl;
cout<<"* ***** *** *** ** *** *"<<endl;
cout<<"* * * * * * * * * * *"<<endl;
cout<<"* ***** *** *** * * *** *"<<endl;
cout<<"* * * * * * * * * * *"<<endl;
cout<<"* ***** * * * * ** * * *"<<endl;
cout<<"* *"<<endl;
cout<<"***********************************"<<endl;
cout<<endl;
}
}
}
bool test_command()
{
}
I'll update the code If I happen to make any more progress.
Thanks alot,
TailsTheFox