From 3c941263b5f34c1a9da0d7ff4028a4b5d545d3d7 Mon Sep 17 00:00:00 2001 From: rubisalpha Date: Fri, 13 Feb 2026 12:59:47 +0000 Subject: [PATCH] Ajouter main.cpp --- main.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 main.cpp diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..5826ed3 --- /dev/null +++ b/main.cpp @@ -0,0 +1,30 @@ +#include +#include "user.h" +#include "auth.h" + +User users[] = { + {"admin", "1234", ADMIN}, + {"prof1", "abcd", PROF}, + {"student1", "pass", STUDENT} +}; + +int nbUsers = 3; + +int main() { + std::string login, password; + + std::cout << "Login : "; + std::cin >> login; + + std::cout << "Mot de passe : "; + std::cin >> password; + + int index = authentifier(login, password); + + if(index != -1) + std::cout << "Connexion réussie" << std::endl; + else + std::cout << "Erreur" << std::endl; + + return 0; +} \ No newline at end of file