blob: a53a4080e3969360d09b4e81000515aeecc8215b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#include <iostream>
#include "sales_data.hpp"
#include "sales_item.hpp"
/*
*
* 3.8 v1
*
*
*/
using std::string;
using std::cout;
using std::cin;
using std::cerr;
using std::clog;
using std::endl;
int main () {
string Xer;
cout << "Enter a string" << endl;
cin >> Xer;
decltype(Xer.size()) Index = 0;
while(Index != Xer.size()) {
Xer[Index++] = 'X'; // We can use post increment operator
//Index++; // Or we can increment it here
//++Index; // We could also do this
}
cout << Xer << endl;
return 0;
}
|