Search:

Type: Posts; User: spazx

Search: Search took 0.01 seconds.

  1. Replies
    12
    Views
    1,720

    When using memset it errors with ISO C++ forbids...

    When using memset it errors with ISO C++ forbids declatration of 'memset' with no type.
  2. Replies
    12
    Views
    1,720

    So how do I initialize the array as -1?

    So how do I initialize the array as -1?
  3. Replies
    12
    Views
    1,720

    The line of code does not work. It produces the...

    The line of code does not work. It produces the error message that there is an error making 'map' static.
  4. Replies
    12
    Views
    1,720

    Declare array of array of ints as -1

    int map[NROWS][NCOLS] = {[{-1}][{-1}]};
  5. Replies
    5
    Views
    784

    Thank you both for helping me, it is not having...

    Thank you both for helping me, it is not having compiler errors for that.
  6. Replies
    5
    Views
    784

    if (dyofwk % 7 == 0) strcpy("Monday",week); else...

    if (dyofwk % 7 == 0) strcpy("Monday",week);
    else if (dyofwk % 7 == 1) strcpy("Tuesday",week);
    else if (dyofwk % 7 == 2) strcpy("Wednesday",week);
    else if (dyofwk % 7 == 3) strcpy("Thursday",week);...
  7. Replies
    5
    Views
    784

    is there any way to do this without using...

    is there any way to do this without using string.h?
  8. Replies
    5
    Views
    784

    Placing string into array

    dyofwk = get_julian_day(1, month, year);
    if (dyofwk % 7 == 0) week = "Monday";
    else if (dyofwk % 7 == 1) week = "Tuesday";
    else if (dyofwk % 7 == 2) week = "Wednesday";
    else if (dyofwk % 7 == 3)...
  9. Thread: for statement

    by spazx
    Replies
    6
    Views
    1,595

    Wow. I see exactly what is wrong now. Thank you...

    Wow. I see exactly what is wrong now. Thank you for all your help.
  10. Thread: for statement

    by spazx
    Replies
    6
    Views
    1,595

    #include #include ...

    #include<stdio.h>

    #include<stdlib.h>



    int main(void){

    int car, choice, mchoice;
  11. Thread: for statement

    by spazx
    Replies
    6
    Views
    1,595

    That loop is to generate a number other than the...

    That loop is to generate a number other than the car and the persons choice, not respond with an answer. I am not sure how that if else logic would work for this. Can you elaborate?
  12. Thread: for statement

    by spazx
    Replies
    6
    Views
    1,595

    for statement

    this for statement is supposed to return a number other than one, but will always return one, showing that it is not getting past the first try i believe. I changed this statement multiple times to...
  13. Replies
    16
    Views
    4,473

    The PI declaration was what was wrong with it,...

    The PI declaration was what was wrong with it, my syntax after the change of the declaration was fine. Thank you.
  14. Replies
    16
    Views
    4,473

    Expression Syntax, Floating point error and...

    Expression Syntax, Floating point error and Statement missing ";"
    The line is currently:
    area = (PI*(d_gasket*d_gasket-d_hole*d_hole))/4.0;
  15. Replies
    16
    Views
    4,473

    It keeps saying expression syntax. The equation...

    It keeps saying expression syntax.
    The equation is to find the surface area for one side of the gasket. It is the difference between d_gasket and d_hole, both of which need to be squared before...
  16. Replies
    16
    Views
    4,473

    #include int main(void) { double...

    #include <stdio.h>
    int main(void)
    {
    double d_gasket, d_hole, area;
    printf("Gasket Area Program Started.");
    #define PI = 3.14159265;
    printf("\n Enter the diameter of the gasket.");...
  17. Replies
    16
    Views
    4,473

    It keeps saying expression syntax. The...

    It keeps saying expression syntax.
    The equation is to find the surface area for one side of the gasket. It is the difference between d_gasket and d_hole, both of which need to be squared before...
  18. Replies
    16
    Views
    4,473

    Area of a circle

    area = PI*(d_gasket*d_gasket-d_hole*d_hole)/4.0
    is the line from my program. I changed it to multiplying by itself because using any other operator would generate an error. I tried moving and...
Results 1 to 18 of 19