954,496 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Plz Some1 Reply!!!

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.

karimkabbani
Newbie Poster
6 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

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.

karimkabbani
Newbie Poster
6 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

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.

karimkabbani
Newbie Poster
6 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

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.

karimkabbani
Newbie Poster
6 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

. 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.

karimkabbani
Newbie Poster
6 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

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.

Dave Sinkula
long time no c
Team Colleague
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
 

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.

karimkabbani
Newbie Poster
6 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

Continued merging...

Dave Sinkula
long time no c
Team Colleague
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You