Hi guys, i currently want to replace all spaces into another(or 2) special character, and vice versa. e.g (replacing spaces with 'xx' character and vice versa). Another way would be removing all spaces completely. Is there any method i can use to accomplish that?
#include <iostream>
#include <vector>
#include <fstream>
#include <algorithm>
#include <ctime>
#include "stdlib.h"
using namespace std;
string plaintext;
ifstream infile;
infile.open ("Plaintext.txt");
while(!infile.eof()) // To get you all the lines.
{
getline(infile,plaintext); // Saves the line in STRING.
cout<<plaintext; // Prints our STRING.
}
infile.close();