fix ex04
This commit is contained in:
parent
0700c0e42b
commit
1cde096169
@ -6,7 +6,7 @@
|
||||
/* By: whaffman <whaffman@student.codam.nl> +#+ */
|
||||
/* +#+ */
|
||||
/* Created: 2025/03/23 13:59:46 by whaffman #+# #+# */
|
||||
/* Updated: 2025/04/02 11:20:09 by whaffman ######## odam.nl */
|
||||
/* Updated: 2025/04/03 14:44:17 by whaffman ######## odam.nl */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -36,6 +36,14 @@ int main(int argc, char *argv[])
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (argv[2][0] == '\0')
|
||||
{
|
||||
std::cout << "Old String shouldn't be empty" << std::endl;
|
||||
inFile.close();
|
||||
outFile.close();
|
||||
return 1;
|
||||
}
|
||||
|
||||
outFileName = argv[1];
|
||||
outFileName += ".replace";
|
||||
outFile.open(outFileName, std::ios::out);
|
||||
@ -45,6 +53,7 @@ int main(int argc, char *argv[])
|
||||
inFile.close();
|
||||
return 1;
|
||||
}
|
||||
|
||||
Replacer replacer(argv[2], argv[3]);
|
||||
|
||||
while (std::getline(inFile, line))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user