View Code of Problem 55

#include<iostream>
#include<string>
using namespace std;
int main()
{
	char str[100];
	char c;
	gets_s(str);
	cin >> c;
	for (int i = 0; i < strlen(str); i++) {
		if (str[i] != c) {
			cout << str[i];
		}
	}
	return 0;
}
/*
Main.cc: In function 'int main()':
Main.cc:8:12: error: 'gets_s' was not declared in this scope
  gets_s(str);
            ^
Main.cc:10:32: error: 'strlen' was not declared in this scope
  for (int i = 0; i < strlen(str); i++) {
                                ^
*/

Double click to view unformatted code.


Back to problem 55