Since this is my first post, allow me to introduce myself. My name is Angel, and I'm a 3rd year student at Queens College. I currently am taking CS211, which is the second level of C++, CS212 which is the intro to Java, CS240 which is Assembler, and Math 120 which is Discrete Math. I'm a fairly quick learner, and haven't had much trouble learning all of the commands and keywords, etc. However, this semester is a bit intense, possibly because of the caliber of problems we're tackling and whatnot. Anyway;
So in my C++ class we're taking on the 8 queens problem. However, in my lab class, the TA wants us to do a certain variant on the problem where we write a program that will place 8 queens RANDOMLY on the board using a 2D array.
I understand that we're not allowed to post whole source codes (though unsure why), so I'm just going to post the forloop I have thus far;

for (col=0; col<8; col++)

{

for (row=0; row<8; row++)

{

b[row][col] = rand()%8;

}

}

However, this function simply places a random number between 0 and 7 onto the 8x8 array.
The TA wants us to place 8 queens (1 queen per column) and symbolize the queen with a 1, and an empty space with a 0.
I'm thinking that the random function should place a 1 on a random row in each column, and I tried doing so using temp values, but instead, I just get 64 0's.
I'm not exactly sure how I should approach that method of thinking, and any help is greatly appreciated.
Angel
PS  Sorry for the long post!