0
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <locale.h>
#include <ctype.h>
#define MAX 400
using namespace std;
int main()
{
setlocale(LC_ALL, "portuguese");
char a, b;
char f[MAX];
cout << "Digite o 1º caracter" << endl;
cin >> a;
cout << "Digite o 2º caracter" << endl;
cin >> b;
cout << "Digite a frase: " << endl;
cin >> f;
cout << endl;
char si[100]= {a, b, toupper(a), toupper(b)};
cout << f << endl;
for(int i =0; i< strlen(f); i++){
int c=0;
for(int v =0; v<100; v++){
if(f[i] == si[v]) c= 1;
}
if(c == 1){
f[i] = '*';
}
}
cout << f << endl;
getchar();
return 0;
}
I think you should review how Cin works. Evaluate if getline would not be better for what you want. Avoid mixing C with C++.
– anonimo
in good, I didn’t understand anything of your question.
– paulocanedo