imam jedan problem, zasto ovaj kod ne radi i kako ispraviti:
e sada ne znam kako da spojim dva stringa u jedan treci npr ime i prezime u imprez i da on ima vrednost 'imeprezime' odnsno spojene vrednosti ime i prezime?
--------
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAXPUT 128
#define loc '/var/spool/mail/'
/* #define NP 0 */
/* #define IP 1 */
main ()
{
/* int stanje; */
char ime[MAXPUT];
char imes[MAXPUT];
/* ime = 'a'; */
FILE *pf;
printf ("Ime korisnika: ");
gets (ime);
imes = loc + ime;
if ((pf = fopen(imes, "r")) == NULL) {
/* stanje == NP; */
printf("Nema poste\n");
}
else if((pf = fopen(ime, "r")) != NULL) {
/* stanje == IP; */
printf("Ima poste\n");
}
/*
if (stanje==IP)
{
printf("Ima poste\n");
}
else if (stanje !=NP)
printf("Nema poste\n");
}
*/
sleep(1);
return EXIT_SUCCESS;
}