Search:

Type: Posts; User: alyeska

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Thread: Switch??

    by alyeska
    Replies
    1
    Views
    1,006

    Switch??

    Hi,

    I was wondering why this part of a switch function does not pause to get user input.



    switch(input)
    {
    case 1:
    cout << endl << "CREATE YOUR CHARACTER" << endl;
  2. So I now see what you meant. Thanks, tabstop....

    So I now see what you meant.

    Thanks, tabstop. I got it working now..
  3. Hi tabstop, I am calling it though from a...

    Hi tabstop,

    I am calling it though from a completely different class. Is that what you meant?

    Thanks!
  4. calling a class method within different class method

    Hi,

    How do you call a class method inside a different class method? Here's what I have:


    void cMenu::mission1()
    {
    cInventory.printInventory();
    }
  5. Thread: error meaning

    by alyeska
    Replies
    6
    Views
    1,363

    Okay, thanks a lot, laserlight!

    Okay, thanks a lot, laserlight!
  6. Thread: error meaning

    by alyeska
    Replies
    6
    Views
    1,363

    I was just calling it from main like so: ...

    I was just calling it from main like so:


    Player profile;

    profile.viewProfile;


    I really appreciate your wanting to help. Thanks!
  7. Thread: error meaning

    by alyeska
    Replies
    6
    Views
    1,363

    Hi laserlight, Here is the function. It's...

    Hi laserlight,

    Here is the function. It's actually a class method. I have also declared mName and mHitPoints private. Do I need to use a pointer for this?


    void Player::viewProfile()
    {
    ...
  8. Thread: error meaning

    by alyeska
    Replies
    6
    Views
    1,363

    error meaning

    Hello,

    What does this mean?


    function call missing argument list; use '&Player::viewProfile' to create a pointer to member

    Thanks!
  9. Replies
    5
    Views
    1,867

    returning a reference to string

    Hi,

    How do I properly put this to code? I am trying to return a string (name) from a function using reference.


    std::string& name()
    {
    cout << "Enter your name: " << endl;
    getline(cin,...
  10. Replies
    4
    Views
    2,078

    int main parameters

    Hello,


    int main(int argc, char **argv)

    Does this mean int main takes two parameters argc and double(?)pointer argv? What does double pointer mean? Does that pertain to an array?
    Is this used...
  11. Replies
    7
    Views
    1,007

    Yes, I actually edited it. Thanks, matsp. ...

    Yes, I actually edited it. Thanks, matsp.


    float distance3(float 1px, float 1py, float 1pz, float 2px, float 2py,
    float 2pz)
    {
    return sqrt(((2px - 1px)(2px - 1px)) + ((2py -...
  12. Replies
    7
    Views
    1,007

    Yes, I did.. Thanks guys, I think that...

    Yes, I did..



    Thanks guys, I think that solved the problem..
  13. Replies
    7
    Views
    1,007

    function problem

    Hi,
    What is wrong with this function?


    float distance3(float 1px, float 1py, float 1pz, float 2px, float 2py,
    float 2pz)
    {
    float dist = 0.0f;
    float dist = sqrt(((2px -...
  14. Thread: error question

    by alyeska
    Replies
    2
    Views
    892

    error question

    Hi,

    What does debug assertion failed mean?

    Thanks!
  15. Replies
    11
    Views
    1,815

    Well. How often is a number going to be greater...

    Well. How often is a number going to be greater than one larger than itself? (I mean you're testing whether 8 > 9, or -4 > -3;
    it's just never going to happen.)


    Thanks for pointing that out,...
  16. Replies
    11
    Views
    1,815

    function returns 0

    Hello,

    I am trying to make a function which will return the maximum value in an array. This function returns 0. I figured the for loop will iterate over all the elements of the array. It looks...
  17. Replies
    3
    Views
    1,561

    Pointers and references?!? Help!

    Hi,

    I've been studying C++ for a few months now.. However, I just couldn't grasp completely how to apply pointers and references in codes. I think I understand how they work, though. I am having...
  18. Replies
    7
    Views
    3,071

    Hi matsp, Actually no, I got it all wrong, it...

    Hi matsp,
    Actually no, I got it all wrong, it was supposed to be the even elements. Pointer syntax still confuse me, thanks for your help..
  19. Replies
    7
    Views
    3,071

    Thanks, laserlight and matsp.. I am still a...

    Thanks, laserlight and matsp..
    I am still a little bit confused when it comes to pointers and actually, references too. Thanks for explaining the errors, laserlight. You're a fine teacher! Thanks!
  20. Replies
    7
    Views
    3,071

    Thanks for the quick reply and a very direct...

    Thanks for the quick reply and a very direct answer, laserlight..
    I modified it, however, it only outputs the first even element, and it outputs it three times. Why do you think that is?
    Thanks..
    ...
  21. Replies
    7
    Views
    3,071

    % illegal error?

    Hi everyone,
    I am having this error:

    error C2296: '%' : illegal, left operand has type 'int *'
    What does this mean?



    //Write a function countEven(int*, int) which receives
    //an integer...
  22. Thread: Nodal points

    by alyeska
    Replies
    4
    Views
    1,288

    Thanks nepper.. it's much clearer now.. and the...

    Thanks nepper.. it's much clearer now.. and the program's completely running. :)
    I appreciate all your help.
  23. Thread: Nodal points

    by alyeska
    Replies
    4
    Views
    1,288

    Hi Salem.. Thanks for your help. I made the...

    Hi Salem..
    Thanks for your help.
    I made the revisions in the code but nothing changed in the output. Here's the revised function.


    void LineSpace(float a, float b, int n, float* arrayOut)
    { ...
  24. Thread: Nodal points

    by alyeska
    Replies
    4
    Views
    1,288

    Nodal points

    Hi everyone,
    I am working on a code that generates n evenly spaced nodal points from a to b. It runs but I can't get to add interval to itself every iteration, and I am not sure if I got the formula...
  25. Thread: i++ and ++i

    by alyeska
    Replies
    9
    Views
    1,492

    i++ and ++i

    How will you best differentiate the two?

    i++; //and
    ++i;
Results 1 to 25 of 91
Page 1 of 4 1 2 3 4