#include using namespace std; int main(void) { char a[32]; char *b = a; cout << "Gievf textfile: "; cin.getline(a, sizeof(a)); b += strlen(a) - 4; if (strcmp(b, ".txt") == 0) cout << "YEY! Textfile!\n"; else cout << "HEY! Gievf textfile!\n"; return 0; }