Search:

Type: Posts; User: noops

Page 1 of 5 1 2 3 4

Search: Search took 0.04 seconds.

  1. Replies
    18
    Views
    50,286

    Do you actually want to remove the data or just...

    Do you actually want to remove the data or just free the memory? These aren't the same things if I recall correctly.
  2. Replies
    11
    Views
    3,679

    Don't use scanf, use fgets.

    Don't use scanf, use fgets.
  3. Replies
    12
    Views
    1,683

    I don't understand what you need help with. Can...

    I don't understand what you need help with. Can you write a Hello World program? Do you know what a variable is? Do you know how to get input from the user? Do you understand how the math works?
  4. Replies
    12
    Views
    1,683

    I would start by programming something and then...

    I would start by programming something and then asking for help when you get stuck.
  5. Replies
    18
    Views
    5,162

    And you have to do operations on your matrix...

    And you have to do operations on your matrix manually. So there is no method to say "add row 2 to row 3".

    You will want to look up arrays and 2 dimensional arrays in C.
  6. Replies
    31
    Views
    42,937

    Have you taken the suggested steps to narrow down...

    Have you taken the suggested steps to narrow down the problem?
  7. I would do this with math: If your number is...

    I would do this with math:

    If your number is 12321 how do you single out the first digit?
    How do you single out the last digit?

    After you have singled out the first and last digit and compared...
  8. Replies
    18
    Views
    5,162

    You said you had no idea where to start but it...

    You said you had no idea where to start but it appears you at least know how to compile and run a basic program. That's good.

    You also said you understand how to solve linear equations so that's...
  9. Replies
    18
    Views
    5,162

    That is sort of a loaded question and we have no...

    That is sort of a loaded question and we have no idea where to start. Can you successfully write/compile/run a program that prints "Hello world!"?

    If not, start with a C tutorial by searching the...
  10. Thread: use of and or

    by noops
    Replies
    14
    Views
    1,837

    Here's the result (I just cut out the portion...

    Here's the result (I just cut out the portion that looked meaningful):


    /* C */
    int a = 0,
    b = 1,
    x = 1,
    z = 0;
    if ((a == x) || (a == z) || (b == x) || (b == z))
    a = 5;
  11. Thread: use of and or

    by noops
    Replies
    14
    Views
    1,837

    Wouldn't that be for &&? Thanks, I was...

    Wouldn't that be for &&?

    Thanks, I was actually trying to think of a sane case where you would rely on this behavior.
  12. Thread: use of and or

    by noops
    Replies
    14
    Views
    1,837

    A three-way tie! You all get a cookie! Does...

    A three-way tie! You all get a cookie!

    Does the compiler 'unroll' compound evaluation statements in a manner like so:


    if ((a == x) || (a == z) || (b == x) || (b == z))
    {
    /* do stuff */...
  13. Thread: use of and or

    by noops
    Replies
    14
    Views
    1,837

    In this example, will C skip evaluation of the...

    In this example, will C skip evaluation of the other conditions should a==x?
  14. As far as I am aware you need to compile it on a...

    As far as I am aware you need to compile it on a mac itself.
  15. Replies
    10
    Views
    2,343

    What is h_addr_list? The only time I've done...

    What is h_addr_list?

    The only time I've done something like this in my short history with C is when I used void pointers like:


    int n = 8;
    void* data = &n;
    void** ptr = &data;
    printf("%d",...
  16. Replies
    17
    Views
    3,543

    Sounds like what you want to do is dynamically...

    Sounds like what you want to do is dynamically create/reference variable names.

    But I am pretty sure that is impossible.

    edit: or maybe you can with macros which I have little experience with
  17. Replies
    13
    Views
    1,269

    There is no reason why managing the primary keys...

    There is no reason why managing the primary keys yourself would be less safe. You should be handling all operations on your list using functions anyways. And thus your 'manual' becomes 'automatic'.
    ...
  18. Replies
    13
    Views
    1,269

    I don't see why this wouldn't work...

    I don't see why this wouldn't work...
  19. Replies
    14
    Views
    2,921

    I use ( ) for the return statement because it...

    I use ( ) for the return statement because it resembles a function to me.

    I don't use ( ) for case because case looks like a label to me.

    Just a personal preference unless someone can explain...
  20. I would also look into structures as that seems...

    I would also look into structures as that seems suited to what you are doing. It would let you do something like:

    TestItem.Name
    TestItem.ShieldCap

    To reference values.
  21. Replies
    9
    Views
    4,899

    It's actually 'input' that it is complaining...

    It's actually 'input' that it is complaining about.
  22. Replies
    5
    Views
    1,013

    gcc.gnu.org

    gcc.gnu.org
  23. Replies
    3
    Views
    1,194

    How are you getting input? If you are using...

    How are you getting input?

    If you are using getchar() in a while loop then you can use break to get out of the while loop if getchar() returns a 0.



    while
    {
    /* stuff */
    if(...
  24. Replies
    12
    Views
    3,212

    How about: Take in a string from the user...

    How about:

    Take in a string from the user like: This IS juST A stRING! 12369 )(&*

    Convert and print the string as:
    - All upper case
    - All lower case
    - 1st letter of each word upper case
    ...
  25. Replies
    4
    Views
    5,333

    Shouldn't it be malloc(sizeof(uint8_t) * 56)?

    Shouldn't it be malloc(sizeof(uint8_t) * 56)?
Results 1 to 25 of 110
Page 1 of 5 1 2 3 4