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

This is a discussion on I've just started and i try to compile sth but there is a small error within the C Programming forums, part of the General Programming Boards category; I apologise for this question probably it is a stupid question. when i try to compile the source code it ...

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,751
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    ZuK
    ZuK is offline
    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, 07:36 PM
  3. mega compile errors for small program
    By s_UNI_ in forum C++ Programming
    Replies: 4
    Last Post: 04-28-2005, 01:00 PM
  4. Replies: 5
    Last Post: 06-15-2003, 12:20 PM
  5. Replies: 1
    Last Post: 11-16-2001, 06:22 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