Click here to Skip to main content
16,004,977 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Visual studios 6 is buggin me..help Pin
Arsalan Malik14-Sep-04 18:09
Arsalan Malik14-Sep-04 18:09 
Generalparsing mpegs Pin
BlackDice14-Sep-04 5:40
BlackDice14-Sep-04 5:40 
GeneralRe: parsing mpegs Pin
vcplusplus14-Sep-04 7:30
vcplusplus14-Sep-04 7:30 
GeneralRe: parsing mpegs Pin
markkuk14-Sep-04 8:58
markkuk14-Sep-04 8:58 
GeneralRe: parsing mpegs Pin
BlackDice14-Sep-04 9:15
BlackDice14-Sep-04 9:15 
QuestionHow to determine the current IP address Pin
casid14-Sep-04 5:28
casid14-Sep-04 5:28 
AnswerRe: How to determine the current IP address Pin
David Crow14-Sep-04 7:02
David Crow14-Sep-04 7:02 
GeneralPROGRAM HELP!!!!!!! Pin
ISUstudent14-Sep-04 4:17
ISUstudent14-Sep-04 4:17 
Ok...can anyone help me with this problem. I"m havinng troulbe to figure out how to use the data members and fill them both completely with zeros while initiallize them in the default constructor.
Here is what I have so for the my header (.h) file...

class ConnectFour
{
private:
//date members
int board[12][13];
int numChips[7];


public:
ConnectFour();
//default constructor
};
And here is what I have in my .cpp file....

ConnectFour::ConnectFour()
{
board[12][13] = 0;
numChips[7] = 0;

for(int i=0; i < 12; i++)
{
for(int j=0; j<13; j++)
{
board[i][j] = 0;
}
}

for(int i=0; i<7; i++)
{
numChips[i]= 0;
}
}

IS THIS RIGHT?....BELOW IS HOW IT IS SUPPOSED TO BE DONE ON THE DIRECTIONS FOR THIS PROGRAM!
THANKS GUYS ..YOU GUYS SAVE MY LIFE Wink | ;)

Data Members:
1.)a 2-dimensional array to hold the board – To make it easier to check for wins you chould use a board that has 12 rows and 13 columns. Only rows 3 – 8 and columns 3 – 9 will actually hold the board (which has 6 rows and 7 columns). The remaining cells will always contain zeros.

2.)a single-dimensional array of 7 ints to hold the number of chips dropped into each column of the board.

Methods

1.)a default constructor to initialize both arrays – filling them both completely with zeros
GeneralRe: PROGRAM HELP!!!!!!! Pin
Maximilien14-Sep-04 4:34
Maximilien14-Sep-04 4:34 
GeneralRe: PROGRAM HELP!!!!!!! Pin
Cedric Moonen14-Sep-04 4:53
Cedric Moonen14-Sep-04 4:53 
GeneralRe: PROGRAM HELP!!!!!!! Pin
Cedric Moonen14-Sep-04 4:38
Cedric Moonen14-Sep-04 4:38 
GeneralRe: PROGRAM HELP!!!!!!! Pin
Hardy_Smith14-Sep-04 4:38
Hardy_Smith14-Sep-04 4:38 
GeneralRe: PROGRAM HELP!!!!!!! Pin
David Crow14-Sep-04 5:07
David Crow14-Sep-04 5:07 
GeneralRe: PROGRAM HELP!!!!!!! Pin
ISUstudent14-Sep-04 6:03
ISUstudent14-Sep-04 6:03 
GeneralThread Safe Linked List Pin
Member 3413714-Sep-04 3:12
Member 3413714-Sep-04 3:12 
GeneralRe: Thread Safe Linked List Pin
Alexander M.,14-Sep-04 3:27
Alexander M.,14-Sep-04 3:27 
GeneralRe: Thread Safe Linked List Pin
16-Sep-04 0:51
suss16-Sep-04 0:51 
GeneralRe: Thread Safe Linked List Pin
Joaquín M López Muñoz14-Sep-04 3:33
Joaquín M López Muñoz14-Sep-04 3:33 
GeneralRe: Thread Safe Linked List Pin
Laing,James14-Sep-04 10:42
Laing,James14-Sep-04 10:42 
GeneralRe: Thread Safe Linked List Pin
Joaquín M López Muñoz14-Sep-04 10:59
Joaquín M López Muñoz14-Sep-04 10:59 
GeneralRe: Thread Safe Linked List Pin
Laing,James14-Sep-04 11:18
Laing,James14-Sep-04 11:18 
GeneralRe: Thread Safe Linked List Pin
Joaquín M López Muñoz14-Sep-04 11:30
Joaquín M López Muñoz14-Sep-04 11:30 
GeneralRe: Thread Safe Linked List Pin
Laing,James14-Sep-04 11:56
Laing,James14-Sep-04 11:56 
GeneralI almost understand, a little more advicie please. Pin
mcgahanfl14-Sep-04 2:47
mcgahanfl14-Sep-04 2:47 
GeneralRe: I almost understand, a little more advicie please. Pin
Hardy_Smith14-Sep-04 4:52
Hardy_Smith14-Sep-04 4:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.