maybe I overlooked something. 
Author Message
 maybe I overlooked something.

]

Quote:
> The following is an excerpt from a program I am working on.  I can't get
it
> to properly read from the ini file (which constist of only the drive
letter
> of the cd rom drive).  It compiles without errors on the borland c++
> compiler.

> --------------------------------------------------------------------------
--
> ---------

>     file://Get driveletter from romzoncd.ini and store it to a variable
>       fp = fopen( "c:\\windows\\program.ini" , "r");
>       file://fscanf(fp, "%s", &cd_drive);
>       fgets(cd_drive, 3, fp);
>       fclose(fp);

>  printf("What is the destination drive? ");
>  scanf("%s", &dest_drive);
>   system(dest_drive);
>   system("cd\\");
>   system("mkdir program");
>   system("cd\\program");

>   /* Make temp batch file */
>  fp = fopen( "c:\\proginst.bat" , "w" );
>  fprintf(fp, "%s", cd_drive);
>  fprintf(fp, "\ncopy %s\\romz\\*.* %s\\program", cd_drive, dest_drive);

> --------------------------------------------------------------------------
--
> ---------
> It will make the batch file and the batch file does have the dest_drive
> variable in it, but doesn't have the driveletter from the ini file.  as
you
> can see, I've tried both fgets and fscanf.

> Thank you to anyone who can help.

> if you email me, my email address is:
> jon-83 AT netlane DOT com



Sat, 24 Aug 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. maybe I overlooked something.

2. Stack overflow... overlooking something???

3. What have I overlooked here ? WINDIFF problem

4. how can I change the encoding in the output??(maybe stupid question)

5. maybe a silly question, but how to overload String::Format

6. Help (maybe vc++6.0 standard edition bug?)

7. Maybe a stupid question:-( IHTMLDocument---How to reference?

8. Maybe OT: graphics in C (Unix)

9. several questions maybe w/ easy answers?

10. maybe off topic?

11. struct problems or maybe the for loop?

12. for stsements: maybe trivial

 

 
Powered by phpBB® Forum Software