Search:

Type: Posts; User: Tigers!

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    9
    Views
    1,833

    QUOTE=Adak;904808]Do you want to run a...

    QUOTE=Adak;904808]Do you want to run a replaceable filename from the C program, or do you want to run a bat file from the C program, and have the bat file run the filename (again, replaceable...
  2. Replies
    9
    Views
    1,833

    Tabstop I have tried the following char...

    Tabstop
    I have tried the following


    char DOScommand[50]; //command to be sent to batch file

    sprintf(DOScommand, "testing_parse_lines_DOS-2.bat %a", oldrptname);
    system(DOScommand);
  3. Replies
    9
    Views
    1,833

    I don't fully understand what you mean. I am...

    I don't fully understand what you mean. I am trying to run a batch file and pass a parameter to it (if possible).
    What do you mean by 'contains the command'?
  4. Replies
    9
    Views
    1,833

    Calling batch file from C on Vista

    Gudday all
    Need to call a batch file from C on my Vista or XP machine (but the code will eventually go on a Win2003/2007 machine).
    Searching through the forums found a few previous threads which...
  5. Replies
    9
    Views
    3,215

    status = rename("error.dat", oldrptname); if...

    status = rename("error.dat", oldrptname);
    if (status != 0)
    {
    perror("problem is:");
    }
    else {
    printf("No error found\n");
    }

    The error message is : File exists.
  6. Replies
    9
    Views
    3,215

    Here is my sophisicated error checking. Can we...

    Here is my sophisicated error checking. Can we find out what the error actually is?


    int status;

    status = rename("error.dat", oldrptname);
    if (status != 0)
    {
    printf("error found\n");...
  7. Replies
    9
    Views
    3,215

    Seems too simple. Only combination I didn't try....

    Seems too simple. Only combination I didn't try. I will edit and run.

    :eek: Damn. No apparent change e.g. error.dat is still called error.dat. It works though if I give a name with quotes in...
  8. Replies
    9
    Views
    3,215

    Thanks spidey The next problem I have is to...

    Thanks spidey
    The next problem I have is to rename an existing file that I have created with my code with the original filename using the rename function.


    char oldrptname[22]; //name of last...
  9. Replies
    9
    Views
    3,215

    Incompatible string assignment types

    Gudday all
    The biggest error I get with my C programming is incompatible assignment types of various flavours. In this case it is strings.



    char rptline[30]; //name of RPT file
    const...
  10. Replies
    14
    Views
    2,758

    I meant search the C programming forum for how to...

    I meant search the C programming forum for how to include either batch files or DOS commands in C code.
    A google search is so comprehensive that the wheat is drowned in the chaff :eek:

    Can batch...
  11. Replies
    14
    Views
    2,758

    After a bad night's sleep :( and some more...

    After a bad night's sleep :( and some more thought I will use DOS to do the file moving/copying/deleting as it does seem much cleaner (and easier).
    I have had a look through the threads for ways...
  12. Replies
    14
    Views
    2,758

    do you mean that we should let the OS handle such...

    do you mean that we should let the OS handle such opeartions? Doesn't that raise portability issues?
    Or do you mean something else?
  13. Replies
    14
    Views
    2,758

    I am writing code that will be used on Win2003...

    I am writing code that will be used on Win2003 server and XP machines (at least at present).
    Is SHFileOperation() a Win command rather than a C command? I am trying to avoid being that specific due...
  14. Replies
    14
    Views
    2,758

    Oh dear now you have me thinking. My 1st...

    Oh dear now you have me thinking.
    My 1st reaction is that the copy function is also being used to move TIFF files. Admittedly I have not checked the TIFF files to see if they are different.
    But you...
  15. Replies
    14
    Views
    2,758

    Extra line break added during copying

    (I am so close to finishing my 1st large C programme for my new boss I can almost taste it, yet errors crop up)

    I have written a small C function to copy/move files from one location to another...
  16. Replies
    3
    Views
    8,430

    C_nuta Thank you for your reply. I have made...

    C_nuta
    Thank you for your reply.
    I have made your suggestions and and getting a compliation error.

    error: invalid conversion from `void*' to `char*'
    in the line

    char *tiffUrl= malloc(100);...
  17. Replies
    3
    Views
    8,430

    Why is my variable changing value?

    Gudday all
    Still trying to finish my 1st large (for me anyway) C program at work. Slwoly getting rid of the bugs and errors. Presently I have a situation where variable is being changing to a...
  18. Sebastiani In an earlier thread you showed me...

    Sebastiani
    In an earlier thread you showed me the sstrncpy and I have used it in my code. it works well. I will try the sstrncat.
  19. Et al I found an error earlier in the code....

    Et al
    I found an error earlier in the code. Having a lower case letter rather than an upper case can pose problems.

    Thank you for your replies.
  20. Using variables as place markers for strings?

    (Sorry if the title does not really match the question.)

    I have been hardcoding filenames into my code but have been told that that is error prone and hard to maintain.
    I have tried to recode to...
  21. Replies
    2
    Views
    1,139

    Shifting a string and adding '\0' onto end

    Gudday all
    The code below is a little one I wrote to left shift the string src one char to the left to remove the leading '\'
    Strings have proved suprisingly difficult for me to regrasp after years...
  22. Replies
    10
    Views
    32,948

    Oh I have used those before. Strings have been ...

    Oh I have used those before.
    Strings have been a thorn in my side these last 3 months. Trying to remember when a \n is added and when it is not. Trying to remember when \0 should be there or not.
    ...
  23. Replies
    10
    Views
    32,948

    Now you have me worried as to what I am missing...

    Now you have me worried as to what I am missing or have missed.

    I learnt/used C many years ago at uni. Trying to catch up again is proving to be a long process.
  24. Replies
    10
    Views
    32,948

    Your comment about the string not containing '\'...

    Your comment about the string not containing '\' puzzles me. How then is a '\' expressed if it looks like a '\0'?
    How does C differentiate between a '\' and a '\0'?
  25. Replies
    10
    Views
    32,948

    Left shift a string

    Gudday all
    I wish to left shift a string by one char to remove a leading '\'. In concept it seems simple enough but I flounder on the strings handling still esp. initialisation, pointers etc:

    ...
Results 1 to 25 of 49
Page 1 of 2 1 2