Search:

Type: Posts; User: Dave Couture

Search: Search took 0.00 seconds.

  1. anyone know why this code gives me this error ...

    anyone know why this code gives me this error


    // cursor goes up
    case 'KEY_UP':
    g.y++;
    g.x++;
    move(g.x,g.y);
    ...
  2. make a cursor move using the arrow keys with ncurses?

    anyone know how to make a cursor move using the arrow keys with ncurses?
  3. Replies
    13
    Views
    4,505

    I suck at programming

    I've been trying learn C. Never done programming before. I was trying with this course from the havard website. cs50.net. I did the first 3 weeks but then it got harder and now I understand nothing....
  4. Replies
    4
    Views
    1,093

    here is the makefile # # Makefile # #...

    here is the makefile
    #
    # Makefile
    #
    # Computer Science 50
    # Problem Set 3
    #

    all: find generate
  5. Replies
    4
    Views
    1,093

    problem with bubble sort

    void
    sort(int values[], int n)
    {
    int swapped = 1;
    while (swapped == 1)
    swapped = 0;
    for (i = 0; i < (n - 1); i++)
    if (values[i] > values[i + 1])
    ...
  6. Replies
    5
    Views
    1,733

    problem with modulo

    #include <stdio.h>
    #include <cs50.h>
    #include <stdlib.h>
    #include <string.h>
    #include <ctype.h>

    int
    main(int argc, char *argv[])
    {
    // check number of arguments
  7. Replies
    5
    Views
    10,024

    Thanks a lot, it's my first time using argc and...

    Thanks a lot, it's my first time using argc and argv so I didn't know. It seems to work fine except for one thing, if I run the program with no arguments, it gives me:

    jharvard@appliance...
  8. Replies
    5
    Views
    10,024

    not sure why this doesn't compile

    #include <stdio.h>
    #include <cs50.h>
    #include <stdlib.h>

    int
    main(int argc; char *argv[])
    {
    int i = atoi(argv[1]);
    if (argc != 2 || i < 1)
    {
  9. problem with / operator and float and int variable

    #include <cs50.h>
    #include <stdio.h>

    int
    main(void)
    {
    // user enters his values
    int mf = 0;
    int mm = 0;
    int fm = 0;
  10. Unkown problem with round up/down, variables and operators

    I am running Linux Fedora and compiling with gcc. Goal of program is when you enter an amount of change, it tells you what is the smallest possible amount of coins you can receive using quarters,...
  11. Replies
    8
    Views
    1,711

    what is my mistake

    #include <cs50.h>
    #include <stdio.h>

    int
    main(void)
    {
    int days = 0;
    do {
    // user is promted to enter number of days in his month
    printf("Enter number of days in the...
Results 1 to 11 of 11