「✨」 feat: finished ex02
This commit is contained in:
34
ex02/main.cpp
Normal file
34
ex02/main.cpp
Normal file
@ -0,0 +1,34 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* 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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user