void init( const std::string& hostname ) { // Initialize the actors // Connect std::cout << "Connecting... "; com.setAddress( hostname.c_str() ); com.connectToServer( true ); if( false == com.isConnected() ) { std::cout << std::endl << "Could not connect to " << com.address() << std::endl; rec::robotino::api2::shutdown(); exit( 1 ); } else { // if everything goes alright we say success and ask the user the size of the rectangle to trace std::cout << "success" << std::endl; std::cout << "enter rectange x in mm:" << std::endl; std::cin >> _rect[0]; // just use std:cin to take in the size of the rectangle. std::cout << "enter rectange y in mm:" << std::endl; std::cin >> _rect[1]; } }