From 53cc39694fb630e3c34eee2bee041e2923731c93 Mon Sep 17 00:00:00 2001 From: Marcela Ribeiro de Oliveira <mro15@inf.ufpr.br> Date: Wed, 25 Apr 2018 16:07:41 -0300 Subject: [PATCH] tirando espacos e colocando texto em minusculo --- Makefile | 4 ++-- include/playfair.h | 2 +- playunfair.cpp | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 5ff3d62..35b6ece 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ CC = g++ -CFLAGS = -Wall +CFLAGS = -Wall -std=c++11 -std=gnu++11 INCL = -I ./include @@ -12,7 +12,7 @@ EXEC = playunfair $(EXEC): $(OBJ) $(CC) $(CFLAGS) -o $@ $^ -%.o: %.c $(DEPS) +%.o: %.cpp $(DEPS) $(CC) $(CFLAGS) -c -o $@ $< $(INCL) all: $(EXEC) diff --git a/include/playfair.h b/include/playfair.h index f2de87b..63f510b 100644 --- a/include/playfair.h +++ b/include/playfair.h @@ -3,7 +3,7 @@ #include <vector> #include <iterator> #include <sstream> -#include <cctype> +#include <algorithm> std::vector< char > createKM ( const std::string key); std::string playfair(std::string text , const std::string key ); diff --git a/playunfair.cpp b/playunfair.cpp index 73f3750..c681727 100644 --- a/playunfair.cpp +++ b/playunfair.cpp @@ -1,10 +1,9 @@ #include "include/playfair.h" #include <fstream> -#include <algorithm> void parser(std::string &text){ text.erase(std::remove(text.begin(), text.end(), ' '), text.end()); - //for(const char & + std::transform(text.begin(), text.end(), text.begin(), ::tolower); } int main(int argc, char *argv[]){ -- GitLab