Hot answers tagged

2 votes
Accepted

Why won't my scoreboard appear in breakout.c?

Irene is right to suggest what she did, but that's not your problem. Your code is detecting a collision between the ball and the score. When it detects the collision, it removes the object, which ...
user avatar
  • 63.1k
2 votes

Make label with different name's other than label.c

To make with different file name, we have to add a line into Makefile that is inside the same directory for example in my case: labelTest1: labelTest1.c Makefile clang -ggdb3 -Ispl/include -O0 -std=...
user avatar
1 vote

Make label with different name's other than label.c

The cause of the error is that the compiler is unable to locate the gobjects.h header file. This file resides in the spl/include folder. The other programs, such as label and breakout, can be ...
user avatar
  • 2,625
1 vote
Accepted

Pset3 (breakout) -- problems initiating score label

You haven't set the location where the label is supposed to appear in initScoreboard. Do it like that: setLocation(label, x, y);
user avatar
  • 7,326
1 vote
Accepted

pset3 --> label

Looking at your code, I see two issues. First, you call initScoreboard twice, once before starting the while loop and once just inside the loop, without assigning the object to a variable. ...
user avatar
  • 63.1k
1 vote

Why do we need 3 characters to store integers as strings?

Because the last char in the array is the NULL character ('\0') to signify the end of the string. You always need a string of length + 1 characters to account for this NULL character.
user avatar
  • 1,317

Only top scored, non community-wiki answers of a minimum length are eligible