undeclared identifier and if problem

This is a discussion on undeclared identifier and if problem within the C++ Programming forums, part of the General Programming Boards category; hello to you if you are reading this. I have been trying to get this bit of code right for ...

  1. #1
    Registered User
    Join Date
    May 2012
    Location
    Buxton UK
    Posts
    14

    undeclared identifier and if problem

    hello to you if you are reading this. I have been trying to get this bit of code right for a while now but i think im stuck. I have tried rewriting a few times and I think I am close.

    Could someone with experience please give this a quick fix and repost so I can see where im going wrong?

    Code:
    #include <iostream>
    using namespace std;
    
    
    
    int main ()
    {
        char question[] = "your name is: ";
                 char greeting[] = "Welcome, ";
                 char charname[10];
                 char password[] = atco;
                 
                 cout << question;
                 cin >> charname;
                 cout << greeting << charname << "!";
                 cout << endl << endl;
    
                 cout << "what is the password?:";
                 cin >> password;
                     if password = atco;
                         cout << "enter";
                     else cout if password = !
                         cout << "leave";
    
                         
                         
    
    }

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    2,768
    I suggest reading the tutorial lesson 2 or 1.
    If Statements in C++ - Cprogramming.com

    C++ Tutorial - Learn C++ - Cprogramming.com

    Tim S.
    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the Universe is winning." Rick Cook

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Undeclared identifier major problem
    By Danieljax88 in forum C++ Programming
    Replies: 19
    Last Post: 03-27-2010, 02:50 PM
  2. Undeclared Identifier
    By Kayoss in forum C++ Programming
    Replies: 2
    Last Post: 04-08-2006, 11:48 AM
  3. undeclared identifier problem
    By jjj93421 in forum C++ Programming
    Replies: 13
    Last Post: 04-24-2004, 10:22 AM
  4. 'INPUT', undeclared identifier
    By bennyandthejets in forum Windows Programming
    Replies: 4
    Last Post: 08-29-2003, 07:19 AM
  5. Undeclared Identifier
    By Witch_King in forum C++ Programming
    Replies: 4
    Last Post: 09-07-2001, 01:58 PM

Tags for this Thread


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