Search:

Type: Posts; User: frog

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Thread: newbie

    by frog
    Replies
    10
    Views
    1,553

    C/C++ are good languages for aspiring programmers...

    C/C++ are good languages for aspiring programmers because most of the languages you will learn along the way are in one way or another based on C/C++. I will admit that low-level programming...
  2. Replies
    7
    Views
    1,060

    A different approach

    I don't know about the rest of you, but I've never seen a while..do loop before. Apparently my compiler hasn't either. Am I just 'out of the loop'? Ha ha.

    If you are looking to produce a...
  3. Replies
    10
    Views
    907

    The code isn't written to exit right away....

    The code isn't written to exit right away. Rather, it isn't written to stay open. Console programs are meant to be run from the command-line; however Windows lets you try to run them like any other...
  4. Replies
    9
    Views
    3,223

    I get the deal about multiple definitions now,...

    I get the deal about multiple definitions now, even though at first it wasn't apparent to me. I included extern declarations in the header file, and defined them in a source file.

    It now links...
  5. Replies
    9
    Views
    3,223

    They are already included.

    They are already included.
  6. Replies
    9
    Views
    3,223

    Multiple definition error, one definition

    I am trying to finish off a text RPG, and a strange problem has cropped up. I get the error "multiple definition of [x]", and then a reference to where it was 'first' defined, being a function that...
  7. Thread: Advice needed

    by frog
    Replies
    4
    Views
    1,595

    The book mentioned above would be a really good...

    The book mentioned above would be a really good choice. Even though it goes from the ground up, I find in some places it is almost too concise to be accessible to beginners; there's also just too...
  8. Replies
    4
    Views
    981

    Thanks, Jim. Just hit another snag. I should...

    Thanks, Jim.

    Just hit another snag. I should say that I'm making this as an engine. There is a 'main game file' that contains the addresses on disk of all the subfiles, such as the maps. But when...
  9. Replies
    4
    Views
    981

    Navigating with File I/O

    There seems to be a great lack of online information on file i/o, and the one good resource I found still didn't answer the question I was looking for.

    I am looking into this as part of a...
  10. int printAll(); void...

    int printAll();

    void Data::printAll(info.height){
    cout << "info.height: " << info.height << "\n";
    }

    The debugger has actually told you everything you would need to solve these problems....
  11. Every gridspace has two coordinates, ROW and...

    Every gridspace has two coordinates, ROW and COLUMN. The moves are stored in corresponding slots of both ROW and COLUMN arrays, namely slot J, where J is the number of completed iterations. By...
  12. He misunderstood your set-up. He is treating the...

    He misunderstood your set-up. He is treating the whole grid like a perfect square, where one of the gridspaces on the outside edge is the exit point, rather than having one extra square "hanging...
  13. You should be including to use srand()...

    You should be including <cstdlib> to use srand() and rand().
  14. Have you covered Classes in your course yet? If...

    Have you covered Classes in your course yet? If so, you could create a Path class which consists of Xs and Ys, and create an array which stores Path objects. You'd probably have to use a vector,...
  15. Thread: loop help

    by frog
    Replies
    15
    Views
    1,769

    The method you want to use will not work. You...

    The method you want to use will not work. You cannot, for example, assign "10" to a <char>, nor can you assign "J" to an <int>. So your code:


    cout<<"enter the cards \n";
    ...
  16. Thread: loop help

    by frog
    Replies
    15
    Views
    1,769

    If you want to put the card generation code in...

    If you want to put the card generation code in its own function, that's pretty simple and really a good way to do it, since the code gets reused. Always try to avoid repeating code! The more times...
  17. Thread: loop help

    by frog
    Replies
    15
    Views
    1,769

    Firstly, your code technically shouldn't work...

    Firstly, your code technically shouldn't work (based on what's here), although a typo has saved it. The variable anothercard isn't related in any way to repeatcard, so based on your model it won't be...
  18. Replies
    1
    Views
    2,710

    GUI dev language: GTK+ || SDL?

    I am looking to expand from console to graphical applications programming on Linux. I understand that SDL is commonly used for games, and GTK+ is commonly used for desktop apps, but it seems SDL can...
  19. Thread: A simple query

    by frog
    Replies
    7
    Views
    1,327

    That is C. This is the C++ board. Which are you...

    That is C. This is the C++ board. Which are you looking for?
  20. Thread: A simple query

    by frog
    Replies
    7
    Views
    1,327

    First, you'll need to figure out how to describe...

    First, you'll need to figure out how to describe the shape mathematically. Try coming up with a formula relating the line number to the number of stars on that line.
    Then it's just a matter of...
  21. Replies
    2
    Views
    1,055

    Saying "making games for the console is...

    Saying "making games for the console is pointless" is ridiculous. Now, if the person had said, "Attempting to make commercial games for the console is pointless", that's pretty much true for the...
  22. Replies
    9
    Views
    3,987

    There are a number of issues with this code....

    There are a number of issues with this code. Before I get to them, I'd like to suggest to you this: if ever, when programming, you find yourself manually typing out sections of repeated code, ask...
  23. Replies
    9
    Views
    3,987

    I am actually writing my own blackjack program...

    I am actually writing my own blackjack program right now! I handled the issue by having a "caseOfAce" variable, which increases by one every time an ace is drawn. I used the following code to...
  24. You would think it to be answer B, but in fact...

    You would think it to be answer B, but in fact this switch() statement is missing something: breaks. Without a "break" keyword at the end of each "case" in a switch statement, the compiler will read...
  25. Thread: beginner nd help

    by frog
    Replies
    1
    Views
    3,808

    It would be great to know what kind of variables...

    It would be great to know what kind of variables these are. Please post more of the code.

    If you are using <string> or <char>, remember that data of these types are actually stored by their ASCII...
Results 1 to 25 of 30
Page 1 of 2 1 2