Search:

Type: Posts; User: marCplusplus

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    10
    Views
    1,723

    #include using namespace std; int...

    #include <iostream>
    using namespace std;

    int main()
    {
    const int MAX = 20;
    char name[MAX];
    cout << "What is your name?\n";
    cin.getline(name,MAX,'\n');
    cout << "Hello " << name;
  2. Replies
    12
    Views
    1,283

    Hey, I learnt most of what I know from online...

    Hey,

    I learnt most of what I know from online stuff.
    Books will obviously save you alot of time in the long run.
    If you're just starting, PM me or send me an e-mail and I'll give you a couple...
  3. Replies
    5
    Views
    11,284

    Hey sup, IanelarAzure,you should use a for...

    Hey sup,

    IanelarAzure,you should use a for loop to add them up.
    Have a look:



    #include<iostream>
    #include<string>
    using namespace std;
  4. Hey sup, Also, you can either use getch() or...

    Hey sup,

    Also, you can either use getch() or getche() :)
    getch() will return the character you type
    getche() does the same but also shows the character typed on the screen :)

    Rgrds,
    Marc
  5. Replies
    8
    Views
    2,267

    You're good... :D Here... // newgame()...

    You're good... :D

    Here...



    // newgame() function
    void newgame()
    {
    personal();
  6. Replies
    8
    Views
    2,267

    I'll keep that in mind for next time :D :D

    I'll keep that in mind for next time :D :D
  7. Thanks :D

    Thanks :D
  8. Replies
    8
    Views
    2,267

    Here's a shorter version of my 'game' :) ...

    Here's a shorter version of my 'game' :)



    #include <iostream.h>
    #include <windows.h>
    #include <conio.h>
    #include <stdlib.h>
    #include <time.h>
  9. Replies
    8
    Views
    2,267

    Help needed with Dos Game!

    Hi all,

    I created a simple game (my first one) with C++.
    It works well except for when I try to exit whilst I'm playing a game.
    Have a look at the code and you'll see what I mean :(
    Also, I...
  10. Thanks, it worked :D A question though, why...

    Thanks, it worked :D

    A question though, why is there need to do that? Shouldn't it work well without the for loop?

    Rgrds,
    Marc :D
  11. Thanks for your answers! Here is the code I...

    Thanks for your answers!
    Here is the code I tried:



    do
    {
    system("CLS");
    cout<<"\n\n\t[[ Scissors, Paper, Stone 2002 ]] - [ Coded by mvb ]";
    cout<<"\n\n\t[ N E W G A M E ]";
  12. Replies
    3
    Views
    2,756

    :eek: :eek: :D :D Thanks, it worked! a...

    :eek: :eek: :D :D
    Thanks, it worked!

    a question if you don't mind :D
    ..How did you know about that? Is it experience or is there a general pattern one should follow when using cin.ignore?
    ...
  13. Replies
    3
    Views
    2,756

    cin.ignore or flush needed?

    Hi,

    Try to run this code:



    #include<iostream.h>
    #include<windows.h>
    #include<conio.h>
    //constants
  14. Replies
    1
    Views
    2,137

    Using flush command.

    Hi,

    I am a newbie at C++.
    I've made my first program in C++.
    It's quite small, 181 lines of code in fact :)
    I finally got it to compile and run successfully :)

    The thing is, I had to use...
  15. Replies
    5
    Views
    1,450

    Geezzzzz, I didn't even notice... :eek: Stupid...

    Geezzzzz, I didn't even notice... :eek:
    Stupid me! :D :D
    Thanks :)
  16. Replies
    5
    Views
    1,450

    Oh, I tried to take off the case 'q': case 'Q':...

    Oh, I tried to take off the case 'q': case 'Q': thing...
    Still gets the error :(
    Any ideas? :)
  17. Replies
    5
    Views
    1,450

    hmm, what's: toupper(input) = 'Q' ? :)

    hmm, what's: toupper(input) = 'Q' ? :)
  18. Replies
    5
    Views
    1,450

    Error when trying to quit program...

    Hi everyone :)

    I coded a small program, it works well except when I try to quit it by pressing 'q' or 'Q'. When I do this, an error message comes up saying "The memory could not be read".


    ...
  19. Replies
    8
    Views
    1,035

    Hmm, thanks .... this seems to work well: ...

    Hmm, thanks .... this seems to work well:



    #include <iostream.h>
    #include <conio.h>
    class employee
    {
    private:
    char name[20];
  20. Replies
    8
    Views
    1,035

    The Dog: Yup, no luck! The following worked tho:...

    The Dog: Yup, no luck!
    The following worked tho:


    cout<<"Enter Name: "<<flush;

    What dya think?
  21. Replies
    8
    Views
    1,035

    #include #include class...

    #include <iostream.h>
    #include <conio.h>
    class employee
    {
    private:
    char name[20];
    int n;
    int serial_number;
    public:
    void input()
  22. Replies
    8
    Views
    1,035

    Any ideas why this isn't working?

    Hi everyone,

    I'm trying out an exersize of a book I'm reading.
    Have a look at the code:

    #include <iostream.h>
    #include <conio.h>
    class employee
    {
    private:
  23. Replies
    14
    Views
    1,678

    :D :D np :D

    :D :D np :D
  24. Replies
    14
    Views
    1,678

    NO!!! :eek: I said that coz you made me shy :p ...

    NO!!! :eek:
    I said that coz you made me shy :p
    :D :D
  25. Replies
    14
    Views
    1,678

    Yes,yes I understood :) It was a compliment coz...

    Yes,yes I understood :)
    It was a compliment coz you would ask me for some help :D
Results 1 to 25 of 68
Page 1 of 3 1 2 3