⚜
Size: a a a
TK
TK
#include <iostream>
#include <fstream>
#include <string>
int main()
{
std::ifstream in("before.txt");
std::ofstream out("after.txt");
if (in.is_open()) {
std::string str;
while (std::getline(in, str)) {
if (str.find("//") != std::string::npos)
str = str.substr(0, str.find("//"));
out << str << std::endl;
}
}
else
std::cout << "Error. File not found.";
return EXIT_SUCCESS;
}
⚜
D
MC
М
OS
М
М
OS
static_cast для родственных обьектовreinterpret_cast для неродственных обьектов (небезопасно)К
M
TK
OS
OS
TK
OS
bi