:
Size: a a a
:
OS
\\?:
OS
\:
R
R
KE
OS
KE
OS
'//' это что-то непонятное)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;
}
OS
#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;
}
TK
TK
OS
TK