Search:

Type: Posts; User: thames

Search: Search took 0.01 seconds.

  1. Replies
    16
    Views
    12,722

    I think it's okay now. #include...

    I think it's okay now.



    #include <iostream>
    #include <string>
    #include <cstring>
    #include "../Headers/golf.h"

    int main()
  2. Replies
    16
    Views
    12,722

    I wil try to use cin.ignore(fullname.length(),...

    I wil try to use cin.ignore(fullname.length(), '\n');
  3. Replies
    16
    Views
    12,722

    I don't get it. It prevents this: Please...

    I don't get it. It prevents this:



    Please enter a number: 8
    Please enter your full name: Enter hobby:


    when you only code a cin >> number;
  4. Replies
    16
    Views
    12,722

    I see. But what about full names? when Stephen...

    I see. But what about full names? when Stephen Prata showed a code like this one:



    #include <iostream>

    int main()
    {
    using namespace std;
    int number;
  5. Replies
    16
    Views
    12,722

    Sorry. I meant: Stephen Prata says in his book...

    Sorry. I meant: Stephen Prata says in his book you will have buffer problems if you only use general input with cin when it comes to having a number input followed by string input.



    so, how...
  6. Replies
    16
    Views
    12,722

    Not really... Stephen Prata says in his book you...

    Not really... Stephen Prata says in his book you will have buffer problems if you only use general input with cin. Particularly for string input after number input, the problem below appears:


    ...
  7. Replies
    16
    Views
    12,722

    I'm not using it. :D I forgot to delete the...

    I'm not using it. :D I forgot to delete the #include <array> directive.

    but the problem remains :p
  8. Replies
    16
    Views
    12,722

    First letter is missing

    Continuing the golf odyssey, the program is not printing the first letter.



    #include <iostream>
    #include <string>
    #include <cstring>
    #include "../Headers/golf.h"

    int main()
Results 1 to 8 of 8