Search:

Type: Posts; User: Phenax

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. ctype.h - Wikipedia, the free encyclopedia...

    ctype.h - Wikipedia, the free encyclopedia

    Check out toupper.
  2. Replies
    3
    Views
    2,099

    if((spData = fopen("in.text", "r")) = NULL) ...

    if((spData = fopen("in.text", "r")) = NULL)


    Look closely at that line. Not sure if it's directly related to your problem however.
  3. Replies
    7
    Views
    1,584

    I'm taking an intro to C class @ a university in...

    I'm taking an intro to C class @ a university in Florida.

    1) Our professor recommend DevCpp (MingW). He recommended GCC on Linux and Xcode on Mac. He mentioned that they were probably going to...
  4. Thread: Help with error

    by Phenax
    Replies
    3
    Views
    857

    radius = m; Do you mean m = radius;

    radius = m;
    Do you mean

    m = radius;
  5. Replies
    3
    Views
    1,386

    Your file ends in .cpp. You are asking for help...

    Your file ends in .cpp. You are asking for help in the C subforum.
    You can only return one variable or value. You are attempting to return multiple variables in your scan() function.
    The pointers...
  6. Replies
    5
    Views
    1,627

    I would imagine some automatic code generators...

    I would imagine some automatic code generators may hit that, if they are really bad or have a bug. But I couldn't imagine any human coding that.

    Also, I edited it for clarification: That's a...
  7. Replies
    5
    Views
    1,627

    at least 15 levels in C89 and at least 127 levels...

    at least 15 levels in C89 and at least 127 levels in C99. Most compilers will support any amount, until you are limited by your own resources, I'm guessing.

    Though if you've got that many nested...
  8. Replies
    8
    Views
    2,626

    This should help you with your problem. When...

    This should help you with your problem.

    When you pass an array to a function, it decays to a pointer. A pointer is just something that points to a memory address. If you pass a pointer to a...
  9. Replies
    4
    Views
    1,741

    What is it that you need help with? Calculating...

    What is it that you need help with? Calculating remainders? Operators in C and C++ - Wikipedia, the free encyclopedia Check out the "modulo" operator.
  10. Replies
    8
    Views
    2,626

    Well, I'm sure there are at least a few...

    Well,

    I'm sure there are at least a few individuals here willing to help you understand and solve your problem. What are you going to do on your final exam? You can't pay someone to take that for...
  11. Replies
    5
    Views
    2,113

    If you want to do a modulo with a fractional...

    If you want to do a modulo with a fractional numerator or denominator, try using fmod from math.h. The % operator is for integers only.
  12. Replies
    5
    Views
    25,032

    char sentences[3]; Is an array of three...

    char sentences[3];
    Is an array of three characters.
    Or a string of two characters with a null terminator.

    Character arrays that have the purpose of being a string should end with a null...
  13. Thread: c program

    by Phenax
    Replies
    2
    Views
    1,164

    Remember! x++ will increment x after the...

    Remember! x++ will increment x after the assignment. ++x will increment x before the assignment!

    a[1] = 1
    i = ++a[1] will increment the value of a[1], and do it before the assignment. so i = the...
  14. Replies
    3
    Views
    4,230

    stdio.h - Wikipedia, the free encyclopedia...

    stdio.h - Wikipedia, the free encyclopedia

    You're probably wanting to use functions like:
    fopen, fclose, fgets, etc.
  15. Replies
    7
    Views
    1,638

    Actually, sizeof(a) is equal to sizeof(int *) not...

    Actually, sizeof(a) is equal to sizeof(int *) not sizeof(int). Arrays passed to functions decay to pointers.
  16. Replies
    4
    Views
    3,900

    NCurses is pretty popular on Unix-like operating...

    NCurses is pretty popular on Unix-like operating systems, but there is PDCurses for Windows. PDCurses has a lot of compatibility functions to help it act like NCurses. And a lot of the functions have...
  17. Replies
    19
    Views
    2,587

    Do you have to code this using C89? C99 has...

    Do you have to code this using C89? C99 has flexible arrays, which would make it easy. Most modern compilers usually have a switch to turn on C99.

    If you have to work with constants in the...
  18. Replies
    19
    Views
    2,587

    Dynamic memory management is definitely the most...

    Dynamic memory management is definitely the most satisfactory answer to your question. But I would just stick with being a little bit inefficient and not using things your professor hasn't taught you...
  19. Replies
    2
    Views
    970

    ctype.h - Wikipedia, the free encyclopedia...

    ctype.h - Wikipedia, the free encyclopedia

    type.h is your friend.
    Also, scanf can scan multiple variables in a specified format. Google it up!
  20. Replies
    19
    Views
    2,587

    Maybe I'm totally misunderstanding but can't you...

    Maybe I'm totally misunderstanding but can't you do

    int size = 2000;
    int oldAry[size];
    scanf(...); //get user input
    int newAry[size - userinput];
    for(...) //copy oldAry contents to newAry
  21. Replies
    8
    Views
    10,300

    My mistake, statics are indeed initialized to 0...

    My mistake, statics are indeed initialized to 0 by default. But I think it'd be better to explicitly initialize it to 0 to be clear about your intentions.
  22. Replies
    19
    Views
    2,587

    Are you able to post the purpose of this code, or...

    Are you able to post the purpose of this code, or some specifications? Because to me, it seems like the only way to accomplish this is making a new array and copying previous data (Which isn't a...
  23. Replies
    8
    Views
    10,300

    Yeah, sorry, I misinterpreted your question. ...

    Yeah, sorry, I misinterpreted your question.



    if (num = 0)

    == tests for equality. Using = is different then ==. Your current if statement does this: Sets num to zero. This operation returns...
  24. Replies
    8
    Views
    10,300

    Your function prototype in main void...

    Your function prototype in main

    void change(double, int, int, int, int);
    Is different than the actual declaration of your function

    void change()
  25. Replies
    19
    Views
    2,587

    Looking at this problem, I would try to use...

    Looking at this problem, I would try to use dynamic memory management. But if it hasn't been taught in your class before, your instructor may be seeking a different answer here. You can't re-size...
Results 1 to 25 of 74
Page 1 of 3 1 2 3