/
QustoSac
/
Dynamically-connected-libraries
Обзор
Документация
Войти
/
QustoSac
/
Dynamically-connected-libraries
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
mystring.cpp
28 строк
597 B
QustoSac
first commit
04 сен 2024, 14:50
04 сен 2024, 14:50
01a05f0
Код
Авторство
О чём код?
#include <string> #include <fstream> #include <iostream> extern "C" { std::string removeChar(const std::string& filename, char symbol) { std::ifstream file(filename); std::string content, result; if (file.is_open()) { while (std::getline(file, content)) { for (char& c : content) { if (c == symbol) { c = ' '; } } result += content + "\n"; } file.close(); } else { std::cerr << "Error opening file: " << filename << std::endl; } return result; } }