free()
the array upon exit.
How many stocks? 3
Input initial holding of 0: 10
Input initial holding of 1: 10
Input initial holding of 2: 10
Enter stock and change (-1 -1 to end): 0 1
Stock 0 is now 11.00
Enter stock and change (-1 -1 to end): 1 -1
Stock 1 is now 9.00
Enter stock and change (-1 -1 to end): -1 -1
0: ============================================================ 11.00
1: ================================================== 9.00
2: ======================================================= 10.00
main.c
here is a
Makefile
that you can use to try to compile the project:
CC = gcc
.c.o:
$(CC) -c -o $@ $<
all: main
main: main.o
$(CC) -o $@ $@.o
main.o: main.c
clean:
rm -f *.o
rm -rf main
Note that each line underneath the targets is indented by a tab, not just
spaces, this is important!
tar.gz
archive of your asg##/ directory, including:
README
file containing
Makefile
.h
headers and .c
source)
make clean
before tar
)
handin
notes