Search:

Type: Posts; User: esbo

Page 1 of 20 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    4
    Views
    1,047

    So it works with a loop of smaller amounts? It...

    So it works with a loop of smaller amounts? It could be anything really. Is the file opened and closed correctly?
  2. printf("\nUSD %.2f %.2f %.2f %.2f %.2f %.2f...

    printf("\nUSD %.2f %.2f %.2f %.2f %.2f %.2f %.2f\n",inputUSD,inputUSD_CAD,inputUSD_EUR,inputUSD_HKD,inputUSD_BPS,inputUSD_MEP,inputUSD_INR);
    printf("\nCAD %.2f %.2f %.2f %.2f %.2f %.2f %.2f\n");
    ...
  3. Jesus was almost certainty not born on Dec 31 nor...

    Jesus was almost certainty not born on Dec 31 nor Dec 25, or in the year 0.

    4-6 BC is more likely and probably in September.
  4. Replies
    55
    Views
    5,176

    What seemed to happen was it would not move the...

    What seemed to happen was it would not move the file pointer past the 0 however it would read past it up the the \n and copy that into
    my string buffer but the file pointer would remain pointing to...
  5. Thread: strcpy get errors

    by esbo
    Replies
    133
    Views
    19,301

    And you could maybe fire it at the light bulb to...

    And you could maybe fire it at the light bulb to switch it off.

    You would get through a lot of bulbs that way though.
  6. Replies
    55
    Views
    5,176

    Thanks but I was using fscanf at the time and...

    Thanks but I was using fscanf at the time and this seemed to fix it.
    I just read in the 00.




    if ( strncmp(tmx,"#Game ",6) !=0) {
    if (rn==0) {rn=fscanf(game_file_ptr,"%d",duffint);...
  7. Thread: strcpy get errors

    by esbo
    Replies
    133
    Views
    19,301

    Yes maybe in future I will use fgets or whatever,...

    Yes maybe in future I will use fgets or whatever, but gets(string) is pretty easy to remember and simple to use.

    I would say in reality a bug from too much input is going to be pretty easy to...
  8. Replies
    55
    Views
    5,176

    Finally seems to be getting to grips with this...

    Finally seems to be getting to grips with this program after 6 days!!

    Seems the main problem is I ported the program over from a site which had one text file per game where as for the new site all...
  9. Thread: strcpy get errors

    by esbo
    Replies
    133
    Views
    19,301

    It's not going to crash though is it? I am not...

    It's not going to crash though is it? I am not going to declare a small buffer and then over fill it.
    Even if I did he cause of the crash would be obvious.
  10. Thread: strcpy get errors

    by esbo
    Replies
    133
    Views
    19,301

    Yes!! It really is two much work!! it is three...

    Yes!! It really is two much work!!
    it is three time the amount of work!!

    So if I follow your rules I will be 3 times less productive - so no thanks I am happy doing it my way.
    I don't want to...
  11. Thread: strcpy get errors

    by esbo
    Replies
    133
    Views
    19,301

    I am not suggesting it to others, I just do not...

    I am not suggesting it to others, I just do not make pointless work for myself just for the sake of it.
    If I am just doing some small test program for my self I do not treat it is as if I was...
  12. Thread: strcpy get errors

    by esbo
    Replies
    133
    Views
    19,301

    However we only build houses strong enough to for...

    However we only build houses strong enough to for an earthquake in earthquake zones!!!
  13. Thread: strcpy get errors

    by esbo
    Replies
    133
    Views
    19,301

    Well I would not have a problem using it really...

    Well I would not have a problem using it really not unless I was writing a under interface for someone's life support system,
    if my program to swop two strings crashed it's not the end of the world....
  14. Thread: strcpy get errors

    by esbo
    Replies
    133
    Views
    19,301

    I think you can use char gets (char *str) ...

    I think you can use
    char gets (char *str)




    char x[STR_MAX] = {'\0'};

    gets(x);
  15. Thread: strcpy get errors

    by esbo
    Replies
    133
    Views
    19,301

    Sorry I am not sure I never do that kind of...

    Sorry I am not sure I never do that kind of stuff!!

    EXIT_SUCCESS is probably defined as zero, you can check with a printf"%d",EXIT_SUCCESS);

    I think main is an int by default but I am not sure,...
  16. Thread: strcpy get errors

    by esbo
    Replies
    133
    Views
    19,301

    Sorry I am not sure I never do that kind of...

    Sorry I am not sure I never do that kind of stuff!!

    EXIT_SUCCESS is probably defined as zero, you can check with a printf"%d",EXIT_SUCCESS);

    I think main is an int by default but I am not sure,...
  17. Thread: strcpy get errors

    by esbo
    Replies
    133
    Views
    19,301

    Only joking!! :) I have done far more stupid...

    Only joking!! :) I have done far more stupid thing in C I can assure you!!!
    Although I have done quite a lot of things in C programming I am still unsure of some of the basics because I was never...
  18. Thread: strcpy get errors

    by esbo
    Replies
    133
    Views
    19,301

    Yes that looks fine to me. Before you just...

    Yes that looks fine to me. Before you just declared pointers, this time declared memory space that can be copied to.
  19. Thread: strcpy get errors

    by esbo
    Replies
    133
    Views
    19,301

    also why use %2s? that only prints 2 character,...

    also why use %2s? that only prints 2 character, use just %s.
  20. Thread: strcpy get errors

    by esbo
    Replies
    133
    Views
    19,301

    Read my updated post. I am not sure what you want...

    Read my updated post. I am not sure what you want to do, you can effectively do a copy by changing what the pointers point to.
    That is more efficient than moving the whole string.

    It's like...
  21. Thread: strcpy get errors

    by esbo
    Replies
    133
    Views
    19,301

    I think you are declaring your strings as fixed...

    I think you are declaring your strings as fixed constants not variables.

    You will do better with for example


    char a[20]="whatever";

    (if that compiles lol)

    You see 'a' is now space for a...
  22. Replies
    3
    Views
    1,671

    I wonder if it is possible to to via the proxy...

    I wonder if it is possible to to via the proxy serve back to your own computer and get the address that way somehow?

    Just a thought really.

    Bit beyond me to do I think, but I guess you could...
  23. Replies
    55
    Views
    5,176

    Oh well it still has a problem on the big test...

    Oh well it still has a problem on the big test but that should be easier to sort out now it does not crash and works on less test data.
  24. Replies
    55
    Views
    5,176

    Well at long long last I think I may have cracked...

    Well at long long last I think I may have cracked it!!
    As I had kind of suspected the problem seems to have been caused
    by blank lines which fscanf (which reads the file) skips over.


    This...
  25. Replies
    18
    Views
    2,540

    could the switch case statement be used? (3...

    could the switch case statement be used?

    (3 mins too late lol)
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4