Search:

Type: Posts; User: fanoliv

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Quick confirmation on operator precedence please

    Hi, all. I need someone to confirm that I've got this precedence right below please. Let's say I have a pointer p pointing to some valid stuff somewhere. Then:



    if (*p++ == 12)


    is the same...
  2. Replies
    11
    Views
    3,276

    #define within struct definition?

    How is this different from a regular #define that's just on it's own? Does containing the #define within the struct definitions means that you can't assign the #define constant to other things...
  3. Replies
    11
    Views
    4,779

    Thanks for your help. Figured it out finally.

    Thanks for your help. Figured it out finally.
  4. Replies
    11
    Views
    4,779

    fopen can't open .exe?

    Is there a reason why I can't open a .exe file with fopen? I've got a function that's supposed to copy some files. It's copying all kinds of files fine (e.g. .doc, .htm, .asm, .inc). But I get an...
  5. Replies
    4
    Views
    1,350

    Yes, I'm afraid I am using a 16bit compiler....

    Yes, I'm afraid I am using a 16bit compiler. It's Borland C++ 4.5, I think, but set to compile in 16-bit mode. Does that mean that I can't do anything about the folder name being uppercase? Thanks....
  6. Replies
    4
    Views
    1,350

    Making folder name lowercase

    Hi. When I call mkdir to make a directory, the directory that gets created has a name all in uppercase, even though the string I specified in mkdir is lowercase. Can anyone please tell me how I can...
  7. Replies
    4
    Views
    6,047

    How about opening or closing a folder? Like you...

    How about opening or closing a folder? Like you do fopen to open a file right? Is that apply to folders too? Or do i just specify the folder as part of a path then look for files in there?

    Also,...
  8. Replies
    4
    Views
    6,047

    Difference between files and folders?

    Can someone please tell me what is the difference between files and folder as far as when I am using findfirst and findnext?

    If I'm trying to see if my the current folder contains a subfolder, do...
  9. Replies
    6
    Views
    1,732

    Thanks for your help. Just found out I'm not...

    Thanks for your help. Just found out I'm not supposed to use the system() call. So now I have a new problem of trying to copy files and folders manually. Still figuring out how to do that.
  10. Replies
    6
    Views
    1,732

    I have some string buffers that are maximum of...

    I have some string buffers that are maximum of 600 characters. All of them together shouldn't exceed 5k bytes, I'd say. So how is it possible to run out of memory?
  11. Replies
    7
    Views
    3,514

    Ok...figured it out. Sorry to waste all your...

    Ok...figured it out. Sorry to waste all your time. The problem was when I was reading using fgets. I was reading correctly, but was reading into the wrong buffer, which in the process changed Line to...
  12. Replies
    7
    Views
    3,514

    Ok...sorry about that. I figured out that the...

    Ok...sorry about that. I figured out that the Line and Buffer are actually pointing to the same address all along (I was reading the addresses wrong earlier). So I guess now my question is, why are...
  13. Replies
    6
    Views
    1,732

    system() too big?

    I'm trying to issue a system call from my program. However, when I run the program, I get the message "Program too big to fit in memory"

    Does anyone have any idea why this is, and how I might fix...
  14. Replies
    7
    Views
    3,514

    What I tried above didn't help, actually. My...

    What I tried above didn't help, actually. My Buffer is still messed up after I free the Line pointer. Now my code is like this.



    int PutSthInBuffer (unsigned char *Buffer, int length) {
    ...
  15. Replies
    7
    Views
    3,514

    My mistake about the declaration. I've fixed the...

    My mistake about the declaration. I've fixed the snippet above and added stuff you suggested.

    As for the addresses of the pointers after the strcpy call, they're still the same as they were...
  16. Replies
    8
    Views
    1,497

    I thought the prototype for gets is char...

    I thought the prototype for gets is char *gets(char *s)? How come you can call it like that? Are you sure your program compiles? I'd like to know what the experts on here says about this. More new...
  17. Replies
    7
    Views
    3,514

    What's up with this strcpy?

    I'm having some problem with the strcpy function. Hopefully some of you can point out what I'm doing wrong please.

    Basically, I'm calling a function to read a file and put something in an output...
  18. Replies
    1
    Views
    1,077

    Sorry to bother you guys. I figured out the...

    Sorry to bother you guys. I figured out the problem is in another part of the program, which I was passing the wrong file name to fopen. Thanks.
  19. Replies
    1
    Views
    1,077

    Calling a function to do fopen

    Hi, I'm having some troubles with openning a file that I need to read. I think it's because I'm handling the FILE* wrong or something. But I'm a little confused about this. Hopefully someone can...
  20. Replies
    7
    Views
    1,299

    Was here, sixth post down. ...

    Was here, sixth post down.

    http://cboard.cprogramming.com/showthread.php?t=77944&highlight=free+null
  21. Replies
    7
    Views
    1,299

    Really? Well, I was just searching through these...

    Really? Well, I was just searching through these forums actually. Looks like I'll have to be more careful next time. Thanks a lot for your reply.
  22. Replies
    7
    Views
    1,299

    sorry for this thread, after more looking around,...

    sorry for this thread, after more looking around, I found out free(NULL) would indeed crash the program. Thanks.
  23. Replies
    7
    Views
    1,299

    Simple question about free()

    If I call free(NULL) or free(ptr) where ptr == NULL, will it crash the program or not compile?

    I'd try it out myself, except there isn't really an easy place in my existing code to do it and I'd...
  24. Replies
    15
    Views
    4,295

    lol...my boss is a pretty nice guy actually. And...

    lol...my boss is a pretty nice guy actually. And I'm sure he knows a lot more than I do about programming. Thanks for the clarification though.
  25. Replies
    15
    Views
    4,295

    Actually, let me clarify. I don't think they're...

    Actually, let me clarify. I don't think they're supposed to work the same. In fact, I think calling strtok with the first version

    ptr = strtok (originalStr, "");

    would set ptr to point to...
Results 1 to 25 of 27
Page 1 of 2 1 2