First thing I will say is, in C++ you don't actually need to ever use a goto, and using it to loop is a bit underdevoloped IMHO. Do a look up on try and catch statements. They are what you use instead of goto's.

Second why don't use just use include <string>?


A nice way you can do that without your goto is.


Code:
#include <iostream>
#include <string>

int main()
{

string com1;
cout << "Enter a Command" << endl;
cout << "Enter help for list of commands" << endl;
cin.get(com1);
while(com != "exit")
{

             if(com1 == "help")
{              cout << "commands" << endl;
                cout << "cd" << endl;
                cout << "ls" << endl;
                cout << "exit" << endl;

}

              else if (com1 == "ls")
{
              cout &lt;&lt; "bugreport" &lt;&lt; endl;
              cout &lt;&lt; "landing" &lt;&lt; endl;
              cout &lt;&lt; "watergate" &lt;&lt; endl;
              cout &lt;&lt; "WOMDIRAQ" &lt;&lt; endl;
}

              else if (com1 == "cd ..")
{
               cout &lt;&lt; "/root:";
}
            else if (com1 == "exit")
{

break;
}
             else
{

                cout &lt;&lt; "Command not found" &lt;&lt; endl;
}

cin &gt;&gt; com1;
}
}