473,385 Members | 1,429 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

syntax error near unexpected token `('

3
hi all

i am getting the error

line 11: syntax error near unexpected token `('
line 11: `int main()'


while trying to complie a c program in ubuntu
The code is very simple
# include <stdio.h>

int main()
{
printf("Hello");
return 0;
}

Please help me how to rectify this

Vani
Mar 24 '08 #1
2 12958
oberon
14
The code you gave compiles fine on my system. How do you invoke the compiler? gcc <filename>?
Mar 29 '08 #2
hi all

i am getting the error

line 11: syntax error near unexpected token `('
line 11: `int main()'


while trying to complie a c program in ubuntu
The code is very simple
# include <stdio.h>

int main()
{
printf("Hello");
return 0;
}

Please help me how to rectify this

Vani
It works good for me too
Am using gcc 4.1.0
and the steps
test.c(your code)
Expand|Select|Wrap|Line Numbers
  1. gcc test.c -o test
  2. ./test
  3.  
and it print hello

I dont believe its your compiler's problem
Apr 1 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: SaCompGeek | last post by:
I have a class that defines a Key/Name value collection that i generated by and XML Element with multiple attributes. The attribute are used to create the collection of 'Binate' objects. This is...
4
by: Bob Stearns | last post by:
The statement: merge into nullid.animals_et_in t1 using is3.animals t2 on t1.sire_assoc=t2.assoc and t1.sire_prefix=t2.prefix and t1.sire_regnum=t2.regnum when matched then update set...
5
by: r.nikhilk | last post by:
Hi, Currently, we are porting C++ applications from 32 bit to 64 bit on AIX platform. (The current version of AIX is 5.3 and xlC verison is 8.0). We are able to compile the applications by...
3
by: Manuel | last post by:
I'm trying to compile glut 3.7.6 (dowbloaded from official site)using devc++. So I've imported the glut32.dsp into devc++, included manually some headers, and start to compile. It return a very...
4
by: lisa | last post by:
I have an XML file that starts like this: <?xml version="1.0" encoding="ISO-8859-1" xmlns:fn="http://www.w3.org/2005/xpath-functions"?> <Authors> <Author> <ID>2</ID>...
12
by: Yusuf | last post by:
I'm sorry for the second post in as many hours, and both about structs. The code below compiles. The variables test1 and test2 are structures of datatype teststruct1 and teststruct2. The size of...
4
by: bhunesh | last post by:
hey , i m getting error listed below plz help me /virtualHosts/beta.myiris.com/htdocs/commodities/commd_admin/CRONJOB/new_cronjob/new_mcx.pl: line 14: syntax error near unexpected token...
1
by: FightClubDiego | last post by:
Hey.. I've been working on these sign up / log in forms for my new Game Site, and everything else in the game works but the registration!! I keep ketting the unexpected $end and Im tired of it! Here...
4
by: manontheedge | last post by:
I'm using SSH Secure Shell to connect to a Linux machine ... when I try to run the compiled code I have, I keep getting these errors ... ./p2.c: line 5: syntax error near unexpected token `('...
3
by: nvr | last post by:
Hi all I am doing the socket programming for the client side. but the code is not compiling and i am getting the below error ./Clientsend.c: line 11: syntax error near unexpected token `('...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.