Search:

Type: Posts; User: Rahiiyja

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    1,229

    I see, both take effect immediately but the value...

    I see, both take effect immediately but the value of the expressions are different?
    That explains it. ;-)
  2. Replies
    4
    Views
    1,229

    Thanks for your fast reply. Can I ask you, if...

    Thanks for your fast reply.
    Can I ask you, if '++number' makes the change to number instantly, when does the post-increment ++ take effect?
  3. Replies
    4
    Views
    1,229

    Short question concerning 'if'

    Take a look at this code:

    int number = 9;
    if ( number++ == 10)
    cout << ”True” ;
    else
    cout << ”False";

    Nevermind the bad formatting, does this code result in "true" or "false"?
    To me,...
  4. Replies
    14
    Views
    9,426

    I have found it very helpful when learning C++....

    I have found it very helpful when learning C++. But as laserlight mentions I am still wet behind the ears, and Prata's book is the only one about C++ that I've read so I have nothing to compare it...
  5. Replies
    22
    Views
    3,075

    Thanks, that's something I should have tried, it...

    Thanks, that's something I should have tried, it solved most of it. The final problem I had was that the strings weren't declared globally, and therefore couldn't be used within the other functions,...
  6. Replies
    22
    Views
    3,075

    Here's an update of the situation, and some code...

    Here's an update of the situation, and some code I've written.


    #include <iostream>
    using namespace std;

    int biggerThan(int, int);
    int smallerThan (int, int);
    int equal (int, int);
  7. Replies
    153
    Views
    678,008

    Sticky: C++ Primer Plus (Fifth Edition), by Stephen...

    C++ Primer Plus (Fifth Edition), by Stephen Prata.

    I am a complete beginner in programming, but have been able to learn a lot through this book. It breaks up the learning into many small pieces,...
  8. Replies
    22
    Views
    3,075

    laserlight: Excellent touch breaking it up into...

    laserlight:
    Excellent touch breaking it up into functions and changing the values in the body. That solves my problem.

    Thanks everyone for the help. Since I'm getting more and more interested in...
  9. Replies
    22
    Views
    3,075

    Here's a longer list of what I've learnt...

    Here's a longer list of what I've learnt (roughly):
    using header-files
    functions
    namespaces
    cin
    cout
    using variables
    data-types
    member functions
    const keyword
  10. Replies
    22
    Views
    3,075

    I see. Well, we are not allowed to use break yet....

    I see. Well, we are not allowed to use break yet. ;-)
    Any other ideas how to solve this?
  11. Replies
    22
    Views
    3,075

    After some consideration, it strikes me that a...

    After some consideration, it strikes me that a for-loop could be used as an 'if'.
    For example:


    for (;x>y;;)
    {cout << "x is bigger than y"}

    for (;x<y;;)
    {cout << "y is bigger than x"}
  12. Replies
    22
    Views
    3,075

    dwks: That was a very informative reply and I...

    dwks:
    That was a very informative reply and I understand how it works. We are not allowed to use this yet in the course though, since we must stick to what we've learned up to this point.

    If...
  13. Replies
    22
    Views
    3,075

    Thank you very much for your reply. I will read...

    Thank you very much for your reply. I will read it more thoroughly tomorrow.
  14. Replies
    22
    Views
    3,075

    dwks:

    Thanks for your reply.

    Good idea to merge strings and numbers, that way I can reduce the number of lines a bit at least.

    Concerning the if-sentences I am more curious in alternate ways of...
  15. Replies
    22
    Views
    3,075

    Need help with a tiny program

    Hi.
    I am trying to make a simple program, that receives two values from the user, and then prints a comment concerning the difference between these two values.

    I was thinking something like this:...
Results 1 to 15 of 15