Search:

Type: Posts; User: Aliaks

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. Thread: Last 2 lines

    by Aliaks
    Replies
    5
    Views
    820

    Last 2 lines

    if (input == 'n' && NewUser.location->north)
    NewUser.location = NewUser.location->north;
    if (input == 's' && NewUser.location->south)
    NewUser.location = NewUser.location->south;
    if...
  2. Replies
    14
    Views
    1,103

    Ok well I am none the wiser of what this does :(

    Ok well I am none the wiser of what this does :(
  3. Replies
    14
    Views
    1,103

    I did not write this, I have come across it while...

    I did not write this, I have come across it while brousing and don't understand it proparly
  4. Replies
    14
    Views
    1,103

    Code Explanation

    Hey guys, just wondering if anyone could give me an idea what this code does?


    static int randBetween(int low, int high)
    {
    if (low == high) return low;
    if (low > high)
    {
    ...
  5. Replies
    4
    Views
    834

    What does this code mean?

    virtual bool isCorrectAnswer(const std::string& answer) const = 0;

    Im guessing that it is a overide-able yes or no which is decided later.

    It checks if the value stored in answer is correct?
    ...
  6. Replies
    2
    Views
    1,742

    http://cboard.cprogramming.com/cplusplus-programmi...

    http://cboard.cprogramming.com/cplusplus-programming/117544-moving-between-areas.html

    This is a link I had help in, maybe looking through that could help you out.
  7. Replies
    8
    Views
    1,085

    Yes I would say so, I just wish to read the...

    Yes I would say so,

    I just wish to read the questiosn and answers from a text file
  8. Replies
    8
    Views
    1,085

    Not entire lines of words and then a number like...

    Not entire lines of words and then a number like with the above structure
  9. Replies
    8
    Views
    1,085

    I can only find stuff about saving out variables...

    I can only find stuff about saving out variables but not the rest, i tried googling but cant find anything useful.

    Wondering if anyone knwos a book or a reference for this?
  10. Replies
    2
    Views
    1,037

    Ok thankyou, I keep forgetting the = x 2 gah.

    Ok thankyou, I keep forgetting the = x 2 gah.
  11. Replies
    8
    Views
    1,085

    Sorry I will be a bit more specific. I have a...

    Sorry I will be a bit more specific.

    I have a question scruct which questions in it,


    RiddleGenerator::QnA RiddleGenerator::mQnA[RiddleGenerator::QuestionCount] = {
    { "What shape as...
  12. Replies
    8
    Views
    1,085

    from file to struct.

    I know how to open and display a text file, just wondering if you can use the text from a terxt file to work for a struct,

    eg.

    Txt file


    "blablabla" , 3

    or
  13. Replies
    2
    Views
    1,037

    ifs for pointers?

    Just wondering if something like this,


    if (NewUser.location = &rooms[1])
    {
    some function
    }


    Would fit into this,
  14. Replies
    100
    Views
    6,677

    Yep, I just figured that I needed a getline...

    Yep, I just figured that I needed a getline instead of the cin in between.

    Thanks alot for your help, I can put all my elements together now I got that troublesome part out the way!
  15. Replies
    100
    Views
    6,677

    yeah I noticed that over the time I have been...

    yeah I noticed that over the time I have been using c++, before I changed it to getline(cin,input) through out my program for example I had , Username, Age, Pet, This, That, as input for the user....
  16. Replies
    100
    Views
    6,677

    I believe it is something to do with the input,...

    I believe it is something to do with the input, it does not ask for it and defaults to incorrect, hence not moving anywhere.
  17. Replies
    100
    Views
    6,677

    by doing it that way, when the user takes a...

    by doing it that way, when the user takes a direction, it does not move, it repeats the same room.
  18. Replies
    100
    Views
    6,677

    I think a issue I need to address is how the loop...

    I think a issue I need to address is how the loop is structured. so that moving to the loacation is not a part of the else
  19. Replies
    100
    Views
    6,677

    while (true) { // Display the players...

    while (true) {

    // Display the players location and possible movements.

    cout << "------------------" << endl;
    cout << "Location: " << NewUser.location->name << endl;
    cout <<...
  20. Replies
    100
    Views
    6,677

    Sorry I have not done structs yet, I will look...

    Sorry I have not done structs yet, I will look into them.
  21. Replies
    100
    Views
    6,677

    RiddleGenerator::QnA...

    RiddleGenerator::QnA RiddleGenerator::mQnA[RiddleGenerator::QuestionCount] = {
    { "What is your Quest?\n\t1)To seek the holy grail?\n\t2)Party Party Party", 1 },
    { "What is the best...
  22. Replies
    100
    Views
    6,677

    Hey Zlatko, thanks for the reply. Yes I would...

    Hey Zlatko, thanks for the reply.

    Yes I would like to randomly pick or generate some questions which I can slot into my moving around part.

    Some of the questions would be math, spelling,...
  23. Replies
    100
    Views
    6,677

    Ok thank you for your response, I quite tired so...

    Ok thank you for your response, I quite tired so I am not following what you are saying so I will take a look tomorrow.
  24. Replies
    100
    Views
    6,677

    This probably isnt the most effiencent but...

    This probably isnt the most effiencent but something like.

    If the players location = this number (Room number)
    then do this function


    Something like that would work, would allow me to...
  25. Replies
    100
    Views
    6,677

    Yeah I tried that, but what about on large scale,...

    Yeah I tried that, but what about on large scale, if im moving between 50 rooms, that wouldnt work, because it would be move north if input is 12 for every single room
Results 1 to 25 of 128
Page 1 of 6 1 2 3 4