anyone know why this code gives me this error
// cursor goes up
case 'KEY_UP':
g.y++;
g.x++;
move(g.x,g.y);
...
Type: Posts; User: Dave Couture
anyone know why this code gives me this error
// cursor goes up
case 'KEY_UP':
g.y++;
g.x++;
move(g.x,g.y);
...
anyone know how to make a cursor move using the arrow keys with ncurses?
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....
here is the makefile
#
# Makefile
#
# Computer Science 50
# Problem Set 3
#
all: find generate
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])
...
#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
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...
#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)
{
#include <cs50.h>
#include <stdio.h>
int
main(void)
{
// user enters his values
int mf = 0;
int mm = 0;
int fm = 0;
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,...
#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...