From 6745b83a8eccd8a610a97a6746f6e96878d934c2 Mon Sep 17 00:00:00 2001 From: rubisalpha Date: Fri, 13 Feb 2026 12:59:13 +0000 Subject: [PATCH] Ajouter auth.cpp --- auth.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 auth.cpp diff --git a/auth.cpp b/auth.cpp new file mode 100644 index 0000000..797274e --- /dev/null +++ b/auth.cpp @@ -0,0 +1,13 @@ +#include "auth.h" + +extern User users[]; +extern int nbUsers; + +int authentifier(std::string login, std::string password) { + for(int i = 0; i < nbUsers; i++) { + if(users[i].login == login && users[i].password == password) { + return i; + } + } + return -1; +} \ No newline at end of file