35 lines
1.3 KiB
C++
35 lines
1.3 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* main.cpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2025/06/04 13:26:50 by adjoly #+# #+# */
|
|
/* Updated: 2025/06/04 13:44:29 by adjoly ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include <PmergeMe.hpp>
|
|
|
|
int main(int argc, char **argv) {
|
|
if (argc < 2) {
|
|
std::cerr << "Error: No input provided" << std::endl;
|
|
return 1;
|
|
}
|
|
|
|
try {
|
|
std::vector<int> inputVector = parseInput(argc, argv);
|
|
std::deque<int> inputDeque(inputVector.begin(), inputVector.end());
|
|
|
|
std::cout << "Before: ";
|
|
printContainer(inputVector);
|
|
|
|
sortAndTime(inputVector, inputDeque);
|
|
|
|
} catch (const std::exception &e) {
|
|
std::cerr << "Error: " << e.what() << std::endl;
|
|
return 1;
|
|
}
|
|
}
|