944,098 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 2062
  • C++ RSS
Jun 15th, 2005
0

combinations

Expand Post »
Hi... im kinda new to c++ but here goes. i made a class called team and one called game. i also made dynamic arrays of each. i figured out how to calculate number of games considering the number of teams. 3 teams, 3 games- 4 teams,6games- 5t,10g - 6t,15g- etc... . The class game has two member variables of type team.
My question is: how can I define each game ?
my guessing is to use nested loops.... but im just blocked!
i would appreciate any help.
thanks.

almost 4got, i also made an array of distinct random numbers called random, so for game[0] i should say

game[0].setTame1[random[0]]

game[0].setTame2[random[1]]

random[0] and random[1] are two distinct numbers from 0 to the numberOfTeams.

and i should make sure that two teams do no play twice , and of course that each time does not have a game with itself!

Thanks a lot.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
karimkabbani is offline Offline
6 posts
since Jun 2005
Jun 16th, 2005
0

some sort of combinations

Hi... im kinda new to c++ but here goes. i made a class called team and one called game. i also made dynamic arrays of each. i figured out how to calculate number of games considering the number of teams. 3 teams, 3 games- 4 teams,6games- 5t,10g - 6t,15g- etc... . The class game has two member variables of type team.
My question is: how can I define each game ?
my guessing is to use nested loops.... but im just blocked!
i would appreciate any help.
thanks.

almost 4got, i also made an array of distinct random numbers called random, so for game[0] i should say

game[0].setTame1[random[0]]

game[0].setTame2[random[1]]

random[0] and random[1] are two distinct numbers from 0 to the numberOfTeams.

and i should make sure that two teams do no play twice , and of course that each time does not have a game with itself!

Thanks a lot.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
karimkabbani is offline Offline
6 posts
since Jun 2005
Jun 16th, 2005
0

Need help in soccer league program. More specificly, to do random scheduel of games

Hi... im kinda new to c++ but here goes. i made a class called team and one called game. i also made dynamic arrays of each. i figured out how to calculate number of games considering the number of teams. 3 teams, 3 games- 4 teams,6games- 5t,10g - 6t,15g- etc... . The class game has two member variables of type team.
My question is: how can I define each game ?
my guessing is to use nested loops.... but im just blocked!
i would appreciate any help.
thanks.

almost 4got, i also made an array of distinct random numbers called random, so for game[0] i should say

game[0].setTame1[random[0]]

game[0].setTame2[random[1]]

random[0] and random[1] are two distinct numbers from 0 to the numberOfTeams.

and i should make sure that two teams do no play twice , and of course that each time does not have a game with itself!

Thanks a lot.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
karimkabbani is offline Offline
6 posts
since Jun 2005
Jun 18th, 2005
0

random combination

Hi... im kinda new to c++ but here goes. i made a class called team and one called game. i also made dynamic arrays of each. i figured out how to calculate number of games considering the number of teams. 3 teams, 3 games- 4 teams,6games- 5t,10g - 6t,15g- etc... . The class game has two member variables of type team.
My question is: how can I define each game ?
my guessing is to use nested loops.... but im just blocked!
i would appreciate any help.
thanks.

almost 4got, i also made an array of distinct random numbers called random, so for game[0] i should say

game[0].setTame1[random[0]]

game[0].setTame2[random[1]]

random[0] and random[1] are two distinct numbers from 0 to the numberOfTeams.

and i should make sure that two teams do no play twice , and of course that each time does not have a game with itself!

Thanks a lot.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
karimkabbani is offline Offline
6 posts
since Jun 2005
Jun 21st, 2005
0

Plz Some1 Reply!!!

. i made a class called team and one called game. i also made dynamic arrays of each. i figured out how to calculate number of games considering the number of teams. 3 teams, 3 games- 4 teams,6games- 5t,10g - 6t,15g- etc... . The class game has two member variables of type team.
My question is: how can I define each game ?
my guessing is to use nested loops.... but im just blocked!
i would appreciate any help.
thanks.

almost 4got, i also made an array of distinct random numbers called random, so for game[0] i should say

game[0].setTame1[random[0]]

game[0].setTame2[random[1]]

random[0] and random[1] are two distinct numbers from 0 to the numberOfTeams.

and i should make sure that two teams do no play twice , and of course that each time does not have a game with itself!

Thanks a lot.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
karimkabbani is offline Offline
6 posts
since Jun 2005
Jun 21st, 2005
0

Re: Plz Some1 Reply!!!

I'm merging all these threads. Please don't bump them like this. Show an attempt rather than waiting for someone else to do it for you.
Team Colleague
Reputation Points: 2780
Solved Threads: 312
long time no c
Dave Sinkula is offline Offline
4,790 posts
since Apr 2004
Jun 21st, 2005
0

HELP IN MAKING A COMBINATION OF GAMES BETWEEN DIFFERENT TEAMS. ''League" .

i made a class called team and one called game. i also made dynamic arrays of each. i figured out how to calculate number of games considering the number of teams. 3 teams, 3 games- 4 teams,6games- 5t,10g - 6t,15g- etc... . The class game has two member variables of type team.
My question is: how can I define each game ?
my guessing is to use nested loops.... but im just blocked!
i would appreciate any help.
thanks.

almost 4got, i also made an array of distinct random numbers called random, so for game[0] i should say

game[0].setTame1[random[0]]

game[0].setTame2[random[1]]

random[0] and random[1] are two distinct numbers from 0 to the numberOfTeams.

and i should make sure that two teams do no play twice , and of course that each time does not have a game with itself!

Thanks a lot.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
karimkabbani is offline Offline
6 posts
since Jun 2005
Jun 22nd, 2005
0

Re: Plz Some1 Reply!!!

Continued merging...
Team Colleague
Reputation Points: 2780
Solved Threads: 312
long time no c
Dave Sinkula is offline Offline
4,790 posts
since Apr 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: need help in interfacing my programme
Next Thread in C++ Forum Timeline: GUI using C++ - urgent





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC