14.06.2011, 11:50
Hello,im inneed of some help because i just cannot find the answer
...
How do i format the directory of a file?I have this:
i want something like this:
...How do i format the directory of a file?I have this:
Код:
int main()
{
printf("Total created accounts: %d\n\n",files);
char Directory[64],Rasp[5],Nume[20],varsta,Localitate[20],Judet[20],Tara[20],Liceu[20];
printf("Whats your name?\n");
gets(Nume);
printf("\n\nWant to create the file?\n");
gets(Rasp);
printf("D:/gamer/Accounts/%s",Nume);
if(strcmp(Rasp,"Da") == 0)
{
FILE * pFile;
pFile = fopen ("D:/gamer/Accounts/Number","w");//Directory should be a string.
if (pFile!=NULL)
{
fputs ("Text",pFile);//ADD A STRING HERE
fclose (pFile);
files++;
}
}
else
{
printf("Sucker");
}
}
pawn Код:
format(string,sizeof(string),"D:/Gamer/Accounts/%s",Nume);
pFile = fopen (string,"w");



.I am sorry for posting here,im not going to post this type of topics here anymore.