Search:

Type: Posts; User: bobknows

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    8
    Views
    6,441

    Including cn_board.cpp worked, I didn't try it...

    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.
  2. how about something like this, put into a...

    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.
  3. Replies
    5
    Views
    965

    Every time you make a call to an array you have...

    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...
  4. Replies
    8
    Views
    6,441

    are you saying, I have to call play_move with...

    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...
  5. Replies
    8
    Views
    6,441

    undefined reference to class function

    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...
  6. Replies
    1
    Views
    2,636

    loop not adding to variable

    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....
  7. Replies
    4
    Views
    822

    I understand now. Thank you for the help.

    I understand now. Thank you for the help.
  8. Replies
    4
    Views
    822

    Thank for the help on naming and the formula, it...

    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...
  9. Replies
    4
    Views
    822

    help with my namespace

    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...
  10. #include #include using...

    #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);
  11. recursion inside for() not working as expected

    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()...
  12. Replies
    6
    Views
    955

    thanks.

    thanks.
  13. Replies
    6
    Views
    955

    that works, but i would still like to know how to...

    that works, but i would still like to know how to pass a multidimensional array
  14. Replies
    6
    Views
    955

    arrays and pointers

    i have this code


    #include <iostream>

    using namespace std;

    int solve_array(int * array[][], int array_x, int array_y)
    {
    int solutions = 1;
  15. Thread: random output

    by bobknows
    Replies
    4
    Views
    764

    I missed that, thanks Btw this is for...

    I missed that, thanks
    Btw this is for projecteuler #11
    Thread done
  16. Thread: random output

    by bobknows
    Replies
    4
    Views
    764

    the problem must not be with my code then, i...

    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...
  17. Thread: random output

    by bobknows
    Replies
    4
    Views
    764

    random output

    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;
  18. Replies
    7
    Views
    1,123

    thanks!!! i have moved on but that was really...

    thanks!!!
    i have moved on but that was really bugging me.
  19. Replies
    2
    Views
    1,166

    i am using a class called inventory to move...

    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.
  20. Replies
    2
    Views
    1,166

    help with overloaded constructors

    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:
    ...
  21. Replies
    3
    Views
    927

    if you input the fraction as a string you can,...

    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.
  22. Replies
    5
    Views
    969

    please use [ code ] and [ /code ] tags, it is the...

    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
  23. Replies
    2
    Views
    2,687

    thanks, once i do i will put it in a file and...

    thanks, once i do i will put it in a file and post it here
  24. Replies
    2
    Views
    2,687

    array and string terminator

    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
    ...
  25. Replies
    6
    Views
    992

    thanks, i will look into that

    thanks, i will look into that
Results 1 to 25 of 88
Page 1 of 4 1 2 3 4