私は単純な「C」コードを使用して次のことを行っています。
1).txtファイルから読み取ります。
2).txtファイルにある文字列に基づいて、ディレクトリが作成されます。
型変換がはっきりしないため、ステップ2を実行できません。
これが私のコードです:
#include <stdio.h>
#include <stdlib.h>
#include <direct.h>
int main()
{
   char ch, file_name[25];
   FILE *fp;
   //printf("Enter the name of file you wish to see\n");
   //gets(file_name);
   fp = fopen("input.txt","r"); // read mode
   if( fp == NULL )
    {
      perror("Error while opening the file.\n");
      exit(EXIT_FAILURE);
    }
   printf("The contents of %s file are :\n", file_name);
   while( ( ch = fgetc(fp) ) != EOF )
      printf("%c",ch);
    if( _mkdir(ch ) == 0 )
   {
      printf( "Directory successfully created\n" );
      printf("\n");
   }
   fclose(fp);
   return 0;
}
エラーは次のとおりです。
 *error #2140: Type error in argument 1 to '_mkdir'; expected 'const char *' but found 'char'.*