Search:

Type: Posts; User: dhardin

Page 1 of 2 1 2

Search: Search took 0.02 seconds.

  1. Replies
    2
    Views
    1,053

    Memory Allocation using Pointers

    Hi all,

    I want to create a pointer to a C-String like so:


    char *pCString = "This is a string";


    and then delete the memory reserved for the C-String:
  2. Replies
    1
    Views
    5,902

    Almost fixed it. I figured that since I'm trying...

    Almost fixed it. I figured that since I'm trying to use C-Strings, that adding the termination character '\0' at the end of final[] would help (and it did!). Now I have a couple of strange...
  3. Replies
    1
    Views
    5,902

    Adding 2 char arrays using binary arithmetic

    Hi all,

    I've been writing a program to add two character arrays, which both hold a binary number and using binary arithmetic, stores the final value in another character array.

    So far, i've...
  4. Replies
    8
    Views
    1,833

    Alright, well I'm no longer getting the vector...

    Alright, well I'm no longer getting the vector out of bounds error. I found my new issue to be my lack of knowledge in directX. My initial problem was that the pink in the above image was...
  5. Replies
    8
    Views
    1,833

    O.K. i'm confused by my own code. So i'm gonna...

    O.K. i'm confused by my own code. So i'm gonna think out loud to you guys.

    The minX, maxX, minY, and maxY values are supposed to be the coordinates within the whole game where the collision is...
  6. Replies
    8
    Views
    1,833

    what function?

    what function?
  7. Replies
    8
    Views
    1,833

    @tabstop yep, i'm using the vector as a sort of...

    @tabstop
    yep, i'm using the vector as a sort of 2D array (I don't know how to allocate memory for the 2D so I used a vector instead). Yeah, my product is probably wrong as well...VERY TIRED X[

    ...
  8. Replies
    8
    Views
    1,833

    vector out of bounds...where?

    Hey everyone,

    I've been coding a collision detection function for about 12 hours now using DarkGDK, DirectX, and C++.

    My 2D game detects the function call. I know this because the frame rate...
  9. Replies
    6
    Views
    7,268

    Thanks, my eyes are getting tired though and I...

    Thanks, my eyes are getting tired though and I should probably wait till morning before I can think clearly :\

    But thanks for all your help, I'm still confused on all the different examples I've...
  10. Replies
    6
    Views
    7,268

    yeah, i figured i'd need some kind of loop like...

    yeah, i figured i'd need some kind of loop like that. I was gonna write mine from scratch and store the mask for the sprite in a 2d array. Then somehow, get the detection to work from there...but I...
  11. Replies
    6
    Views
    7,268

    cool, thanks! Looking through the code...

    cool, thanks!

    Looking through the code now....i've never used allegro but I might be able to convert over to directx. I have seen other examples and they were quite different.

    see here

    p.s....
  12. Replies
    6
    Views
    7,268

    2d Collision using Directx

    Hey everyone,

    I am currently implementing the darkGDK library for creating a basic 2D game.

    USING:
    Microsoft Visual C++ 2008 Express
    DirectX SDK 2009 (August)
    DarkGDK

    I actually can't...
  13. #include using namespace std; ...

    #include <iostream>

    using namespace std;


    try adding that at top of code.

    also, are you giving us the full program? (just wanted to make sure you were including the right header files and...
  14. Replies
    3
    Views
    1,128

    okay, that seems pretty self explanatory. The...

    okay, that seems pretty self explanatory. The book did not provide these files on a cd and I was trying to duplicate a file that the book used...considering that they said thats what the file looked...
  15. Replies
    3
    Views
    1,128

    Never mind, I got it. In the text file...

    Never mind, I got it.

    In the text file Accounts.txt, the format should have been this:

    Chester, 12345 56.60\n

    The comma between the account number and balance should have not been there. I...
  16. Replies
    3
    Views
    1,128

    parseString funtion (stream I/O)

    In the code provided below, I have written a program (word for word) from my text book. This program reads the text from a file named Accounts.txt and parses the string input to a different format...
  17. Replies
    9
    Views
    1,740

    Well, I took out the references to the returned...

    Well, I took out the references to the returned values of functions and just passed the values as references into my tellStory function. AND IT WORKS!!! So thank you! I will have to read into it a...
  18. Replies
    9
    Views
    1,740

    Okay, so it was the scoping issue....but the book...

    Okay, so it was the scoping issue....but the book exercise does require me to use references somewhere....

    I know I have to use them in the tellStory parameters, but wouldn't I have to pass...
  19. Replies
    9
    Views
    1,740

    So instead of having my functions return a...

    So instead of having my functions return a reference, I can just return a value? But what about my original initialization of the variables name, noun, number, bodypart, and verb? I have tried to...
  20. Replies
    9
    Views
    1,740

    using references (need help)

    I am going through my C++ book and one of the exercises asks you to alter an earlier project using references (to make it more efficient). I have written the program (see below), but when I run the...
  21. Replies
    15
    Views
    14,828

    Alright, so far I have used pelicanpie's method...

    Alright, so far I have used pelicanpie's method of checking for a winner (using a separate function call). On top of that, I fixed my rowSelect and columnSelect variables so that when a user enters...
  22. Replies
    15
    Views
    14,828

    okay, thanks a lot for all who replied! I will...

    okay, thanks a lot for all who replied! I will be taking a look at my code and try to add in your advice (stuff that I understand more of course). Will post my code when i'm done.

    thanks again!
  23. Replies
    15
    Views
    14,828

    well, I did more searching...and it looks like...

    well, I did more searching...and it looks like everyone I looked at (which I gave up quickly) used a series of if statements. Not that I do not like using them, its just that I was hoping for a...
  24. Replies
    15
    Views
    14,828

    tic tac toe check winner

    i'm creating a tic tac toe game (no functions unfortunately.....sorry!) and was trying to check for a winner at the end of each turn. Is there any way of doing this without using a hefty amount of...
  25. Replies
    5
    Views
    2,677

    okay, that will help a lot. thanks!

    okay, that will help a lot. thanks!
Results 1 to 25 of 30
Page 1 of 2 1 2