Including cn_board.cpp worked, I didn't try it before because other functions in it were working fine, which is weird.
Thanks for the help.
Type: Posts; User: bobknows
Including cn_board.cpp worked, I didn't try it before because other functions in it were working fine, which is weird.
Thanks for the help.
how about something like this, put into a function:
string card;
cin >> card;
rank = card[0];
suit = card[1];
Then do whatever you want with it, no need to overload the operator.
Every time you make a call to an array you have to include a [] with the number of the member you want - 1, starting with 0. For example, if I wanted the first member of name[10] I would have to...
are you saying, I have to call play_move with members of cn_board?
If you will look in testing for cn_board, I call play_move with two literals, and it works fine, however, using two literals...
hey, so I am working with two classes: a cn_board and a node for building a game tree called cn_board_node.
each class has 3 files: a header, an implementationa and a file called testing.cpp...
Hello, so I have been working on a program that will eventually allow you to play connect four. As of now I am still worknig on the basic functions: playing a move, testing if the move wins and etc....
I understand now. Thank you for the help.
Thank for the help on naming and the formula, it is working far better now, but I might still need to validate the formula.
I don't quite understand the part about floating points, the only place...
hey, so I have been working on project euler again, and I have been putting all of my non-problem functions under the namespace utility_functions. What should I do to improve clarity, and what would...
#include <iostream>
#include <cstdlib>
using namespace std;
int puzzle[9][9];
int x = 0;
int y = 0;
bool finished = 0;
int get_box(int a);
i am trying to make a recursive function that will go through the numbers 1-9 and if one of them works will then go on to the next space in the array. something is going wrong so that when solve()...
thanks.
that works, but i would still like to know how to pass a multidimensional array
i have this code
#include <iostream>
using namespace std;
int solve_array(int * array[][], int array_x, int array_y)
{
int solutions = 1;
I missed that, thanks
Btw this is for projecteuler #11
Thread done
the problem must not be with my code then, i didn't get the same output, as i said before the output was a bunch of random numbers eg:
92304920934 902318749018 38974492836 23489374 -234719 347923...
i am using codeblocks and i am having problems, this is the code:
#include <iostream>
using namespace std;
int main()
{
long long int highest = 0;
thanks!!!
i have moved on but that was really bugging me.
i am using a class called inventory to move through the nodes and i put the name in the node because then i only had to use one . to get to it. i guess you are right. i must fo had a total brain fart.
hello, i am having trouble with constructing an item in an item_node and using a pointer to move through a list.
here is the relevant code:
item class
class item
{
public:
...
if you input the fraction as a string you can, but there are no spaces and you have to convert it yourself. if you input it as an int/float/double it will read up to the first non-numerical character.
please use [ code ] and [ /code ] tags, it is the standard for the boards. if you need to learn how, goto the stcky at the top
thanks, once i do i will put it in a file and post it here
i have several questions about arrays and strings
1) does every line have a terminator in an array? ex int variable[3][2] = data 0-0, data 1-0, data 2-0, terminator, data 0-1, data 1-1, data 2-1
...
thanks, i will look into that