Beginner program question.

This is a discussion on Beginner program question. within the C++ Programming forums, part of the General Programming Boards category; Ok im making a program to store my phone numbers but i can't get it to work. Heres my code(without ...

  1. #1
    Registered User
    Join Date
    Jul 2005
    Location
    British Columbia,Canada
    Posts
    3

    Beginner program question.

    Ok im making a program to store my phone numbers but i can't get it to work.
    Heres my code(without the numbers).

    Code:
    #include<iostream>
    
    using namespace std;
    
    int main()
    {
    	int codeone;
    	cout<<"Imput security code 1:";
    	cin>> codeone;
    	cin.ignore();
    	if(codeone == 15973){
    		cout>>"*****************\n";
    		cout>>"*****************\n";
    		cout>>"*****************\n";
    		cout>>"*****************\n";
    		cout>>"*****************\n";
    		cout>>"*****************\n";
    	}
    	else {
    		cout>>"Get out of my numbers.\n";
    	}
    	cin.get();
        
    }
    I can give you my buildlog if you want it.

    Thanks.
    Attached Files Attached Files
    Last edited by Athelias; 07-21-2005 at 04:51 PM.

  2. #2
    Registered User
    Join Date
    Jul 2005
    Posts
    17
    Code:
    else {
    		cout>>"Get out of my numbers.\n";
    	}
    cout<<"Get out of my numbers.\n";

    cin>>variabe (accept input to variable)
    cout<<variable (display on screen)

  3. #3
    Registered User
    Join Date
    Jul 2005
    Location
    British Columbia,Canada
    Posts
    3
    im still getting the same 102 errors.

  4. #4
    Registered User
    Join Date
    Jul 2005
    Posts
    17
    can you post your new codes on and the new build?

  5. #5
    Registered User
    Join Date
    Jul 2005
    Location
    British Columbia,Canada
    Posts
    3
    Oh, nevermind i got it now. I had the << >> mixed, thanks for pointing that out.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 12:27 PM
  2. BOOKKEEPING PROGRAM, need help!
    By yabud in forum C Programming
    Replies: 3
    Last Post: 11-16-2006, 10:17 PM
  3. Random Question Assign Program
    By mikeprogram in forum C++ Programming
    Replies: 6
    Last Post: 11-17-2005, 09:04 PM
  4. Mystery bug in simple program? - I am beginner
    By archie123 in forum C++ Programming
    Replies: 7
    Last Post: 04-08-2005, 07:23 AM
  5. program design question
    By theroguechemist in forum C++ Programming
    Replies: 4
    Last Post: 03-02-2004, 07:45 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21