Thread: If_Else Problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    3

    Cool If_Else Problem

    /
    I'm a newbie and a senor citizen and to keep my mind alert I have decided to learn C++. However the following may be very simple for most of you, at least I thought it should be simple.

    The following piece of code will not compile. Any hints would be greatly appreciated.

    Code:
    #include <iostream>
    using namespace std;
    
    int main()
    {
        int A, B;
    	
        A = 6;
        B = 7;
    
        If( A == B )
        {
                 cout << "A is equal to B";
    	
         else
                 cout << "A is NOT equal to B";
         }	
         return 0;
    }
    Last edited by SeekerOfWisdom; 01-03-2006 at 11:04 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help understanding a problem
    By dnguyen1022 in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2009, 04:21 PM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  3. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM