Compare commits

...

2 commits

Author SHA1 Message Date
Imbus
5c0f319d0c A 2024-12-12 15:18:29 +01:00
Imbus
e707a6649f Test 2024-12-12 15:17:41 +01:00
3 changed files with 8 additions and 2 deletions

View file

@ -1,6 +1,6 @@
CXX = g++ CXX = g++
CXXFLAGS = -Wall -Wextra -Wpedantic -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wconversion -Wsign-conversion -Wnull-dereference -Wdouble-promotion -Wformat=2 -std=c++17 CXXFLAGS = -Wall -Wextra -Wpedantic -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wconversion -Wsign-conversion -Wnull-dereference -Wdouble-promotion -Wformat=2 -std=c++17
#CXXFLAGS += -Werror CXXFLAGS += -g
SRC = $(wildcard *.cc) SRC = $(wildcard *.cc)
HDR = $(wildcard *.h) HDR = $(wildcard *.h)

View file

@ -4,7 +4,6 @@
#include <iostream> #include <iostream>
#include "User.h" #include "User.h"
class UserTable { class UserTable {
public: public:
UserTable(); UserTable();
@ -29,4 +28,7 @@ class UserTable {
friend int testFindNbr(const UserTable ut); friend int testFindNbr(const UserTable ut);
}; };
// int testFindNbr(const UserTable ut);
#endif #endif

View file

@ -39,4 +39,8 @@ int main() {
User ufind2 = tbl.find("Name Surname"); User ufind2 = tbl.find("Name Surname");
assert(ufind2 != UserTable::user_not_found); assert(ufind2 != UserTable::user_not_found);
} }
{
auto t = UserTable("users.txt");
int r = testFindNbr(t);
}
} }