Category : system

Main.cpp #include <iostream> #include <iomanip> #include <fstream> #include <string> #include "VMC.h" using namespace std; // Functions int main(){ //Main Function system("cls"); bool run=true; do{ int Option; //Main menu cout << "———————-Address Book—————————–" << endl; cout << "n"; cout << "Choose an option" << endl; cout << "1) Add Contact" << endl; cout << "2) Edit ..

Read more

I’ve been tasked with making a button on a windows form to be greyed out and unselectible until a member’s record is found, then the Sign Pad button is to activate and change from a windows unselectible grey to a green background with black text. Once activated, the user clicks the button and the signpad ..

Read more

My objective is to connect to an ssh server and enter commands automatically using c++ and system. When running: #include<iostream> #include<string> #include<stdlib.h> using namespace std; int main() { string user = "user"; string forwarded = "0.tcp.ngrok.io"; string port = "00000"; string command = "ssh "+user+ "@" +forwarded+ " -p "+port; system(command.c_str());//connects to ssh server system("password");//Would ..

Read more

I’m making a simple C++ project, where I display figlet text depending by user’s input. Here’s the code: std::string line,text; std::ifstream tmp_file; std::cin >> line; text = "figlet -f" + line + " > tmp.txt"; system(text.c_str()); do { std::this_thread::sleep_for (std::chrono::milliseconds(10)); tmp_file.open("tmp.txt"); output("File can’t be opened correctly!"); } while ( !tmp_file.is_open() ); while ( std::getline(tmp_file,line) ) ..

Read more