Questions tagged [init]
The init tag has no usage guidance.
5
questions with no upvoted or accepted answers
0
votes
2
answers
43
views
How do you delete a line depending on its first character?
When trying to delete all of the comments in positive-words.txt I have tried iterating over the lines and checking if the line startswith ';' however I do not know how to delete the line if it does.
...
0
votes
1
answer
69
views
Pset 6 sentiments init function
I'm working on the init function is sentiments and I'm struggling a bit on what to put in the for loop. This is what I have so far, can someone tell me if this is correct or how to fix it?
def ...
0
votes
1
answer
73
views
My game of fifteen doesn't work
void init(void)
{
// TODO
int fill = ((d * d) - 1);
int brow = d;
//fill entire grid except the bottom
for(int i = 1; i <= d; i ++)
{
for(int j = 1; j <= d; j ++)...
0
votes
1
answer
38
views
pset3 'fifteen' - init function only works for small grids
My init() code works beautifully for grids of 3, 4, or 5, but chokes with larger grid of 6, 7, 8, and 9. It looks almost like an integer overflow or floating point imprecision problem, but I can't see ...
0
votes
1
answer
126
views
Init fails to intialize any of the boards for fifteen on check50
I'm receiving a segementation fault with the code below. I've played with the code a little bit. I'm assuming there are problems in the move and won functions as well, but I'm unable to check them, ...