Search:

Type: Posts; User: ObjectWithBrain

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    3,710

    Actually don't. I'll look it up. Then I'll ask...

    Actually don't. I'll look it up. Then I'll ask questions.
  2. Replies
    4
    Views
    3,710

    Never heard of it. Could you explain a bit more?...

    Never heard of it. Could you explain a bit more? Thanks.
  3. Replies
    4
    Views
    3,710

    Infinite parameters

    How would one go about implementing a function that took a variable and infinite number of parameters such as printf?
  4. Replies
    9
    Views
    6,068

    I really enjoyed that analogy salem. so you're...

    I really enjoyed that analogy salem. so you're saying that I don't need fstream or iomanip to deal with files? I was told I needed those. I don't know why i had string.h in there to tell you the...
  5. Replies
    9
    Views
    6,068

    okay I did it AGAIN. sorry. I missed the answer...

    okay I did it AGAIN. sorry. I missed the
    answer = answerBuff; line.
    It all works now. thanks guys. you're both great.
  6. Replies
    9
    Views
    6,068

    oh sorry looks like I missed some. main.h ...

    oh sorry looks like I missed some.
    main.h


    #include <string.h>
    #include <iostream>
    #include <fstream>
    #include <iomanip>
    #define HEADINGS "Employee Name Rate Hours Gross...
  7. Replies
    9
    Views
    6,068

    Okay, good to know. I fixed what I could see to...

    Okay, good to know. I fixed what I could see to fix, but there are still problems.
    sorry about the c++ headers, I compile this as cpp but I don't really use anything that's c++ specific besides...
  8. Replies
    9
    Views
    6,068

    Exc_bad_access

    I've looked this up over and over and every post I come up with has something to do with Objective-C. Nobody has been able to tell me what it means. I am not writing Objective-C code, but I am using...
  9. Replies
    5
    Views
    1,509

    How would you make it read the password without...

    How would you make it read the password without displaying what you typed on the screen?
  10. Replies
    28
    Views
    5,115

    At 60 frames per second I'd be using 61.2kB per...

    At 60 frames per second I'd be using 61.2kB per minute.
  11. Replies
    28
    Views
    5,115

    But I want to be able to pass the value of the...

    But I want to be able to pass the value of the buffer back through to main and I don't want to have to make a separate array outside of the function call just to do that. It just seems unnecessary....
  12. Replies
    28
    Views
    5,115

    So if the array is local to printBin(), like in...

    So if the array is local to printBin(), like in the last version I showed which didn't work, is there any way to pass the value of binString (or buffer) without passing the pointer/array itself?...
  13. Replies
    28
    Views
    5,115

    Did I just pass an empty pointer? I remember...

    Did I just pass an empty pointer? I remember reading that arrays are destroyed at the return of the function they're contained in, so does that mean that my pointer now points at nothing?
  14. Replies
    28
    Views
    5,115

    Okay, I got rid of that buffer, and now it...

    Okay, I got rid of that buffer, and now it stopped working. What did I do wrong? I guess I should make it a rule not to code past 1:00 AM.




    #include <stdio.h>

    char* printBin(unsigned...
  15. Replies
    28
    Views
    5,115

    Whoa, I just realized that my buffer doesn't...

    Whoa, I just realized that my buffer doesn't contain anything. Why is it even there? I should get rid of it.

    Pointers are insane. I swear, everytime I think I have them figured out, I run into...
  16. Replies
    28
    Views
    5,115

    Oh, okay now I understand exactly why it wasn't...

    Oh, okay now I understand exactly why it wasn't working for me. Like I said, the syntax is very confusing because of all of the *pointing-at-this and &containing-that and such.
    So char *p = 'this'...
  17. Replies
    28
    Views
    5,115

    oh! it all clicks! it works now. thank you so...

    oh! it all clicks! it works now. thank you so much Andrew, you've saved me such a headache =)

    My final code is




    #include <stdio.h>

    char buffer[17];
  18. Replies
    28
    Views
    5,115

    '1' saves an int to my buffer and gives me an...

    '1' saves an int to my buffer and gives me an incompatible integer to pointer conversion.
  19. Replies
    28
    Views
    5,115

    Didn't work. My code is now as follows: ...

    Didn't work. My code is now as follows:



    #include <stdio.h>

    char buffer[17];

    char* printBin(unsigned short);
  20. Replies
    28
    Views
    5,115

    Ohh wow, I dont know what I was thinking using...

    Ohh wow, I dont know what I was thinking using sscanf. I totally forgot what it does. Thanks for that.
    So I should switch out sscanf() for = and then decrement binString by 16?
    I'll give that a...
  21. Replies
    28
    Views
    5,115

    Confusion With Pointers

    Im a noob to programming in general, and one of the biggest confusions I've had is with pointers in C. They make perfect sense to me conceptually, but syntactically they're incredibly confusing. I...
Results 1 to 21 of 21