I was making a simple website where when you put in an username and password, It would send it to a c++ executable that would save the data in a txt document.
the executable works fine, but I can't find a way to send the data to the executable.
I tried window.open(), but then, It started to download the exe file.
this is the code of the c++ executable
#include <fstream>
#include <iostream>
using namespace std;
char main () {
   char name[100];
   char password[100];
   cin >> name;
   cin >> password;
   ofstream outfile;
   outfile.open ("data.txt", ios_base::app);
   outfile << name <<"; " << password << endl;
   outfile.close();
}
 
    