Thread: First Program

Page 2 of 2 FirstFirst 12
Results 16 to 27 of 27
  1. #16
    SuicidalCupcake's Avatar
    Join Date
    Aug 2014
    Gender
    male
    Posts
    10
    Reputation
    10
    Thanks
    1
    Do you really need the std::?

  2. #17
    Arun's Ballsack Rag's Avatar
    Join Date
    Apr 2015
    Gender
    male
    Posts
    374
    Reputation
    25
    Thanks
    137
    Nice work on this!

  3. #18
    K00ky's Avatar
    Join Date
    Nov 2016
    Gender
    male
    Posts
    57
    Reputation
    10
    Thanks
    38
    Next time use

    using namespace std, please :*

    But congratz.

  4. The Following User Says Thank You to K00ky For This Useful Post:

    Gill Bates (05-05-2017)

  5. #19
    D3v17Dy7's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    79
    Reputation
    10
    Thanks
    48
    My Mood
    Aggressive
    Quote Originally Posted by SuicidalCupcake View Post
    Do you really need the std::?

    Quote Originally Posted by K00ky View Post
    Next time use

    using namespace std, please :*

    But congratz.
    Pretty sure this is bad practice.

  6. The Following 3 Users Say Thank You to D3v17Dy7 For This Useful Post:

    Hell_Demon (05-07-2017),Silent (05-08-2017),Zombie (05-23-2017)

  7. #20
    uoz2734z8d02's Avatar
    Join Date
    Apr 2017
    Gender
    male
    Posts
    50
    Reputation
    10
    Thanks
    474
    My Mood
    Bashful
    using namespace std;

  8. #21
    Gill Bates's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    /online
    Posts
    1,135
    Reputation
    188
    Thanks
    247
    Quote Originally Posted by Astralblack View Post
    Hello all just wrote a basic program that's main purpose is too take in information for said account and display it back to you.

    Code:
    #include <iostream>
    #include <windows.h>
    #include <stdio.h>
    #include <string>
    
    class Account 
    {
    
        public:
        std::string name, pin;
    
        void Register()
        {
            std::cout << "Please enter you're name: " << std::endl << std::endl;
            std::getline(std::cin, name);
            std::cout << "Please enter a pin: " << std::endl;
            std::getline(std::cin, pin);
            system("cls");
            std::cout << "Thank you for registering  " << name << std::endl;
            Sleep(2000);
            std::cout << "Please wait a moment while we take you to you're account " << std::endl;
            Sleep(7000);
    	Login();
        }
    
        void Login()
        {
            std::cout << "Account information: " << std::endl << std::endl;
    		std::cout << "Name : " << name << std::endl;
    		std::cout << "Pin  : " << pin << std::endl;
            Sleep(3000);
    		std::cout << "Thank you for testing this system" << std::endl;
    		std::cout << "goodbye " << std::endl;
    		Sleep(1000);
    
        }
    
    };
    
    int main()
    {
        std::cout << "Hello welcome!" << std::endl << std::endl;
        Account accountobject;
        accountobject.Register();
    
        return 0;
    }
    Nice. I made a similar program for my Intro to Programming class. Only difference was that it was in VB. I have the file somewhere and will try to remember to post it here for ya so that you could take a few things from it. For example, I made a form/screen where it had 2 text fields (Username, Password) and a (Login) button. When password was entered, it replaced the characters with dots. I stopped working on it, but I was going to add a storing feature to it, where the user would be able to click Remember Me and not input everything again. Also was working on making the thing more secure, since you could easily extract the username/password from it at the time. lol

  9. #22
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    Quote Originally Posted by D3v17Dy7 View Post
    Pretty sure this is bad practice.
    It is, that never stopped a beginner from using it though :\
    Ah we-a blaze the fyah, make it bun dem!

  10. #23
    Nerki's Avatar
    Join Date
    Dec 2015
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    0
    Nice Work! Keep Going!

  11. #24
    sore01's Avatar
    Join Date
    May 2017
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    2
    Is this your first program?
    Pretty neat,Nice work

  12. #25
    D3v17Dy7's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    79
    Reputation
    10
    Thanks
    48
    My Mood
    Aggressive
    Quote Originally Posted by Hell_Demon View Post
    It is, that never stopped a beginner from using it though :\
    Yeah I used it when I was a beginner, I'm complaining that people are trying to tell someone not using it to use it.

  13. #26
    Zombie's Avatar
    Join Date
    Nov 2013
    Gender
    male
    Location
    Clearwater, Florida
    Posts
    414
    Reputation
    52
    Thanks
    93
    My Mood
    Happy
    Quote Originally Posted by D3v17Dy7 View Post
    Pretty sure this is bad practice.
    ?

    he didn't use using namespace std so he has to use std::, otherwise he'd get an undeclared identifier error c2065 I believe.
    Quote Originally Posted by thepieceofshit View Post
    i have another hack

    come pm on mpgh

    u press f1 you get dick in ur butt

  14. #27
    Boxxyy's Avatar
    Join Date
    May 2017
    Gender
    female
    Location
    Youtube
    Posts
    207
    Reputation
    10
    Thanks
    31
    My Mood
    Flirty
    Looks good for your first program.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. [TuT] First Program in C++
    By voodooflame in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 9
    Last Post: 08-25-2010, 03:04 AM
  2. Replies: 13
    Last Post: 12-28-2009, 01:13 AM
  3. My first program coded on Vb[Spammer]
    By PoP_KiLLaH in forum Visual Basic Programming
    Replies: 12
    Last Post: 11-23-2009, 09:29 AM
  4. My first program :D
    By No5cope in forum Visual Basic Programming
    Replies: 2
    Last Post: 08-25-2009, 04:23 PM
  5. [Tutorial] Your first program
    By akimoko in forum C++/C Programming
    Replies: 10
    Last Post: 06-23-2007, 12:58 PM