c++ - first and last char in multiple strings -
please guys need help! need compare first , last char in multiple strings. have no clue how that. strings kind of generated randomly. for example: user types differents strings , program needs compare first , last charachter of each string . example: 3 strings. "money" "dad" "generating". ... goal positive value on "dad" , "generating" cuz first char , last char of string "dad" , "generating" same. begginer. please help. here code have stuck. sry bad english. :( #include <stdio.h> #include <string.h> #include <conio.h> #include <stdlib.h> char funkcija() { file *c; c = fopen("datoteka.txt", "r"); if (c == null) { printf("error in opening!"); getch(); exit(1); } int = 0; char polje[100]; while (fscanf(c, "%s", polje) == 1) { int duljina = strlen(polje); if (polje[0]