Search:

Type: Posts; User: Tozar

Search: Search took 0.01 seconds.

  1. I see what the problem is. Once the function is...

    I see what the problem is. Once the function is finished it deletes every local variable, including the vectors. I guess I was too tired to realize that last night.
  2. Class data being corrupted after passing it through a paramater???

    I've spent hours narrowing my problem down to these few lines of code.

    This is how my two dimensional array of classes is defined:


    square board[8][8]; //Creates a 8x8 array of square...
  3. Replies
    11
    Views
    3,206

    Ooooooh, I wish I looked at that yesterday...

    Ooooooh, I wish I looked at that yesterday...
  4. Replies
    11
    Views
    3,206

    Solution: vector wPawn('W'); // This...

    Solution:


    vector <CP> wPawn('W'); //

    This declares a vector (essentially a resizeable array) of the CP class using a constructor with parameters. It seems to dodge the previous syntax errors...
  5. Replies
    11
    Views
    3,206

    nadroj: yes, I know how to do that, read the...

    nadroj: yes, I know how to do that, read the whole topic before you post, not just the title. Thanks anyway.

    Daved: Ok, I've never used vecotrs before, but I'll look it up, thanks.
  6. Replies
    11
    Views
    3,206

    Declaring an array of classes...

    It seems that these bits of code don't work:


    CP wPawn('W')[8]; //expected a semi-colon

    CP wPawn[8]('W'); //bad array initializer

    The class:
  7. Replies
    8
    Views
    2,643

    No, the header files consisted of nothing but the...

    No, the header files consisted of nothing but the function headers (within a class, however). Their .cpps werent in the same folder, but their object files were.
  8. Replies
    8
    Views
    2,643

    That's strange, I've been able to #include .h...

    That's strange, I've been able to #include .h files without having to worry about adding their .cpp to the project.
  9. Replies
    3
    Views
    1,363

    Braces cause everything within them to run when...

    Braces cause everything within them to run when followed by a true if statement. However, braces are only optional if one command line proceeds the if statement. That means if you have only one...
  10. Replies
    8
    Views
    2,643

    Whaaatt... are you saying i need to add it to...

    Whaaatt... are you saying i need to add it to every project I use it in? Does that mean I can't use it on programs with only one source file?
  11. Replies
    8
    Views
    2,643

    Sneaky little linker errors...

    They always find their way into my programs!

    This time I'm getting errors when I try to include my header file in two different files of the same project. The only way it works is if instead of...
  12. Replies
    5
    Views
    3,802

    Gold mine:...

    Gold mine: http://www.adrianxw.dk/SoftwareSite/index.html
    Many thanks to Daved for the tip, and adiranxw for the great tutorial.
  13. Replies
    5
    Views
    3,802

    Ah, this tutorial looks like a winner. I'll post...

    Ah, this tutorial looks like a winner. I'll post again when I find something.
  14. Replies
    5
    Views
    3,802

    I was pretty sure I would have to #include...

    I was pretty sure I would have to #include <conio.h>. I'm just asking for some code that will allow me to move the output line to whatever space necessary. I remember being able to do it in Pascal;...
  15. Replies
    5
    Views
    3,802

    Creating a menu interface

    I'm trying to create a menu for my animal guessing game. This is the simple menu I am currently using:


    do
    {
    system ("CLS");
    cout << " | ...
  16. Thank you very much! I had doubted that anyone...

    Thank you very much! I had doubted that anyone could understand my problem, because even my computer science teacher was stumped. I'll definately come back to this forum next time I need help.
  17. Linker error for an undefined reference to a constructor

    Error: [Linker error] undefined reference to `Node<QA>::Node(QA)'
    Im writing a basic program for an animal guessing game (similar to twenty questions) using a binary search tree. The project...
Results 1 to 17 of 17