Thread: I've just started and i try to compile sth but there is a small error

  1. #1
    Registered User
    Join Date
    Jun 2013
    Posts
    1

    Question I've just started and i try to compile sth but there is a small error

    I apologise for this question probably it is a stupid question. when i try to compile the source code it says :
    :7:16 error: expected identifier before "(" token

    Code:
    #include <stdio.h>
    #include <stdlib.h>
    
    
    int main()
    {
     int x;
    if (x >= 0) && (x < 14)
    {
       printf("you are a kid");
    }
    else if (x => 14) && (x <= 35)
    {
       printf("you are young");
    }
    else if !(x > 0) && (x <= 35)
    { 
       pritnf(" you are old");
    }
    system("pause");
    return 0;
    }

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    You need more ( )

    It's
    Code:
    if ( your_logical_expression_goes_here ) {
    }
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Aug 2005
    Location
    Austria
    Posts
    1,990
    Also there is no => operator
    Kurt

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with getting started on a small C++ program
    By coder02 in forum C++ Programming
    Replies: 4
    Last Post: 01-15-2012, 11:54 PM
  2. I cant compile this small code
    By raze in forum Game Programming
    Replies: 8
    Last Post: 08-05-2006, 06:36 PM
  3. mega compile errors for small program
    By s_UNI_ in forum C++ Programming
    Replies: 4
    Last Post: 04-28-2005, 12:00 PM
  4. Replies: 5
    Last Post: 06-15-2003, 11:20 AM
  5. Replies: 1
    Last Post: 11-16-2001, 06:22 PM

Tags for this Thread