Let me put it this way. Forget football, forget scheduling, for get all that. I have a list of 40 length 17 arrays, or a 40x17 matrix that looks like this:
[O] [i1] [i2] [i3] ... [i39] ...
Type: Posts; User: Zughiaq
Let me put it this way. Forget football, forget scheduling, for get all that. I have a list of 40 length 17 arrays, or a 40x17 matrix that looks like this:
[O] [i1] [i2] [i3] ... [i39] ...
Sort of, but they have to be sorted such that on the same line that Team 1 plays Team 2, Team 2 has to play Team 1.
I already have a set up for which teams should play what other teams and where (including duplicate divisional opponents) based on how each team did the previous season I played. So assigning...
Hey guys,
I've got this old football game for my computer that I'm trying to create a season for. I've got custom leagues and teams, but the game's auto-scheduler is extremely buggy as it has...
It's a long story, but my time in college was spent in nightmarish burocracy trying to get the different offices on the same page as far as my registration and status goes. Most people consider...
Hi,
I'm graduating with a degree in computer science and I'm trying to fill out a resume. Unfortunately, I don't have any meaningful work experience to put on there nor do I have any honors or...
>I don't really know shell scripting either, but what does ``exec'' do?
I believe exec is what you use to run an executable.
#!/bin/sh
prog1 $1 $2; prog2 $2
That did the trick....
I have two programs that need to be executed one right after another. I'm trying to write a little shell script with two calls to exec, but it stops after the first program completes. Here's what...
Okay, I think I follow this logic. Here's the code I got from the above
offset = 0; // new variable
while ((ret = getline(p, &get)) != 0) {
get.bufp = dest + offest;
...
Ah, yes. It's been a while since I've programmed anything with classes, so I kinda forgot what I was doing on for a second. Anyway, I don't know exactly what the error message says, but I think...
You might need to typedef the structs, or at least refer to them as structs.
struct One
{
int stuff;
struct One *next;
struct Two *list;
}
Sorry, that came out wrong. I never meant to imply that the problem was with YOUR code, which was a big help, nor that you should do the assignment for me (nor would I want to), but rather just that...
I forgot that you have to write a null string at the end of the file.
if (lseek(fd2, s.st_size * 2, SEEK_SET) == -1){
perror("lseek");
exit(1);
}
if (write(fd2, "", 1) != 1)...
Okay...I hit enter by accident so I just posted half a message. That was what I added/changed to the code. However whe nI run it, I get a bus error. If I comment out the memcpy line, then it prints...
Excellent! This pretty much does the trick. There is one little probelm though. I need to write that line to another mapped output file after being modified. I've modified the code above with the...
I agree, it seems pointless to mmap the file for this purpose. However, the assignment requires I use it.
So you would want it to sort:
Human
String
Sorting
Like
Do
Like10Strings
Same
Like1String
Hi,
I need to read input from an mmap()'ed file one line at a time. But all the examples I've seen of memory mapping use mmap/memcpy to copy an entire file. Like:
source = mmap(blah, blah...);...
Actually, I'm a soon-to-be college graduate (CS major). I just used those as examples. The problem is that in almost every semester I've worked in a different language (C++, C, Assembly, Scheme,...
Hi,
How much of a programming language does one need to know before they can put it on their resume? For example, if I put "C" or "Java" on my resume, what kind of things do they expect I can do?...
Hi,
I'd usually look this up in a book, but I loaned my C book to friend so I have to turn here. I need to convert a string to an int, do something to it, and then convert back to a string. I know...
Yes, comparing the floating point numbers would cause some problems. Although it can be done, the float was just as an example. Most likely the structs I'll be comparing will be ints and chars, and...
I know that you can't take two structs (although they have the same type and members) and compare them directly:
struct s {
int foo;
float bar;
} x, y;
...
if (x == y){
...
I just registered not too long ago (look at how many posts I have) but I've been asking questions on these boards since early '99, usually under "anonymous" or "unregistered" or something.
-Eric