Search:

Type: Posts; User: Tesp

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Glad I finally got it! ^_^

    Glad I finally got it! ^_^
  2. Those all gave me 16. And when I tried to store...

    Those all gave me 16. And when I tried to store their actual sizes in vars, I got this:



    Since chars take up one byte each, floats take up four bytes each, and doubles take up eight bytes each,...
  3. Yes, I understood that part. Is there anything...

    Yes, I understood that part. Is there anything else?
  4. So what you're saying is that if I want sizeof to...

    So what you're saying is that if I want sizeof to work with a pointer to a collection, I need to use the pointer to pass a single element of said collection. One way is to dereference the pointer and...
  5. So basically, if my data collection is on the...

    So basically, if my data collection is on the stack, I pass it to sizeof as the size argument, since sizeof can work with that.

    If it's on the heap, I have to pass the combined amount of space...
  6. As I mentioned in the OP, I already tried...

    As I mentioned in the OP, I already tried dereferencing the pointer. Didn't work.



    So basically, glBufferData only works with regular arrays with hard-coded lengths?
  7. GLFW glBufferData doesn't work with float pointers

    I’ve been following this OpenGL tutorial, which uses GLFW with OpenGL 3.3. After finishing it, I changed the code so that the vertices variable is a float pointer instead of an array. Like so:

    ...
  8. Can't get OpenGL code from this site's tutorial to run

    I've been following the beginning OpenGL tutorial on this site, and am on this part. I copypasted the code into a new project in Visual Studio 2015, tried to run it, and got this error under the...
  9. Replies
    3
    Views
    3,283

    Well, if C++ is enough to make games like Call of...

    Well, if C++ is enough to make games like Call of Duty or Kingdom Hearts 3, then it's definitely enough for something as simple as a Tetris-style game :)
  10. Jumping into C++, Chapter 28 Exercise 3 – What is being asked of me?

    I’ve been having trouble understanding what Chapter 28, Exercise 3 of Jumping into C++ is asking of me. The description is as follows (warning: it’s rather long):





    When it says “when a...
  11. Replies
    46
    Views
    13,650

    I know this is a bit late, but I figure I should...

    I know this is a bit late, but I figure I should add my two cents.

    I'm not looking to program game engines, or do stuff in assembly; I just want to learn programming to make games (and perhaps...
  12. I tested as I said, and everything seems to work...

    I tested as I said, and everything seems to work perfectly! So, thanks to all of you who helped :)
  13. Replies
    46
    Views
    13,650

    Understood about the processors and behavior...

    Understood about the processors and behavior definedment, Hobbit :) I'm not familiar with how processors work (not much beyond them being computers' brains, anyway), but I'll look into them.
  14. I see what you mean about the pointers; it...

    I see what you mean about the pointers; it explains why merely setting secondIter past endOfHaystack caused a crash; endOfHaystack is the last element + 1, and thus the last valid point to point to. ...
  15. Replies
    46
    Views
    13,650

    I don't see how :/ Oh, like what happens...

    I don't see how :/



    Oh, like what happens when you try to access element 5 in an array with only three elements.



    I know what a processor is; I don't know how you came to think I didn't :/
  16. Replies
    46
    Views
    13,650

    Hm, perhaps. Alex Allain's Jumping into...

    Hm, perhaps.



    Alex Allain's Jumping into C++ says something to that effect, on page 58. Quote:
  17. Oh, I see. I feel silly for not realizing that...

    Oh, I see. I feel silly for not realizing that before ^^;
    And yes, I know that secondIter can point to any point after the end of a container. What I want to know is why it crashes in this one...
  18. Setting an iterator past the end of a container somehow causes a crash

    I was working on an assignment from Alex Allain's Jumping into C++, Exercise 1 of Chapter 19. The user enters a bunch of text (a "haystack"), then enters some other text (a "needle"). The program...
  19. Replies
    46
    Views
    13,650

    Oh, I see. The reason I insisted on using an...

    Oh, I see. The reason I insisted on using an 8-bit int is based on the advice about using datatypes no bigger than you'd need. I know that today's computers are powerful enough to, for the most part,...
  20. Replies
    46
    Views
    13,650

    My code is: int8_t num; cin >> num; cout...

    My code is:


    int8_t num;
    cin >> num;
    cout << num + 0;



    In that case, what would be the point of using 8-bit ints instead of regular ones, if I just have to cast to the larger data type?
  21. Replies
    46
    Views
    13,650

    Using cin with 8-bit integers?

    So, for an assignment in Alex Allain's Jumping Into C++, I was supposed to make a high scores program. It works just fine, except it doesn't work with 8-bit integers (or int8_t, as the compiler...
  22. Though, in the book, the sort itself was...

    Though, in the book, the sort itself was specifically referred to as an insertion sort (which made things confusing). :/ I'll read up some to better grasp the difference, to see what I can do for...
  23. [Jumping into C++] What is Chapter 10, Exercise 1 asking?

    It said:



    Except that the insertionSort shown in that same chapter already does that. Have a look:


    void sort (int array[], int size)
    {
    for ( int i = 0; i < size; i++ )
  24. Oh, that one. All right, thanks :)

    Oh, that one. All right, thanks :)
  25. [Jumping into C++] What is Chapter 9, Exercise 3 asking of me?

    The problem:


    I looked through a bunch of the previous chapters (even Chapter 1), but nothing came up about a guessing game. Was this a mistake, or did I miss something?
Results 1 to 25 of 40
Page 1 of 2 1 2