?
Solved

Beginner needs help!!!!!

Posted on 2003-03-01
14
Medium Priority
?
207 Views
Last Modified: 2010-04-15
I just started programming and I don't know how to compile files and if anyone could help me geting started I would be very pleasd thanx.
0
Comment
Question by:TBM1748
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +5
14 Comments
 
LVL 8

Expert Comment

by:Exceter
ID: 8049571
>> I just started programming and I don't know how to compile files

Do you have a compiler installed on your computer? If so, which compiler do you have? If not, check out this PAQ to find compilers that are free to download.

http://www.experts-exchange.com/Programming/Programming_Languages/C/Q_20518401.html

Exceter
0
 
LVL 8

Expert Comment

by:akshayxx
ID: 8050253
it helps us to suggest u with better answers if u can tell us ur 'working environment' ..at least Operating system u working on , and the programming language u are using
0
 

Expert Comment

by:skeid21
ID: 8050475
for c, c++---- a compiler package called djgpp is great it comes with the gcc compiler it is a free package and the gcc is the gui(i forget exacatly the, it's the free software project compiler) it works great.  There website will explain it all but it will take a bit of reading to find out 1st: what you need to download for your platform
2: How to install them 3: changing certain settings on your computer for it work right.  <<<keep in mind this a command line compiler(if you don't know what command line is, it's when you have a dos window up c:\ thing etc.) so everything is done with typed commands no point and click if you are my age that will take a little while to get used to, but when you start useing it alot then you will remember all the commands.    Just search for djgpp compiler on the web and it will give you a link
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:sphairos
ID: 8051090
depends on which platform you use I mean for example Borland C++ or another way of programming in C. if you use Borland C++ 6 just press on F9 when you want to compile your code and see the result.
0
 
LVL 1

Author Comment

by:TBM1748
ID: 8060647
I use Windows 98
0
 
LVL 8

Expert Comment

by:Exceter
ID: 8061401
>> I use Windows 98

Good, but do you have a compiler installed on your computer? If so, which one? If not, reffer to the PAQ I posted and download one.

Exceter
0
 

Accepted Solution

by:
michaelwynne earned 200 total points
ID: 8063365
Hmmm,

Strange question. If you dont know how to compile files then you cant have actually started programming. Pedantic, but true.

Ok.

1) You need to install a C compiler for your platform.

2) Using a text editor enter a simple C program.

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

Or something like that.

3) use compiler to compile it.

4) remove any compile errors and recompile until it is ok.

5) Run the program.

6) Brilliant you are now programming ???.
0
 

Expert Comment

by:brookd
ID: 8066886
a lot of time <alt>-r will get your program compiled and running.. as others have said, depends what compiler you have.. from dos or unix , could use cc or tcc or gcc  + filename , ... from windows...  just compile it,..  
0
 
LVL 8

Expert Comment

by:Exceter
ID: 8066975
>> int main()
>> {
>>     printf("Hello World\n");
>>     return (0);
>> }

#include <stdio.h>
int main()
{
   printf("Hello World\n");
   return 0;
}

You need stdio.h because you called printf. Also, the parenthesis are not necessary. return is statement, not a function. The following is equally valid,

return(((((0)))));

Exceter
0
 

Expert Comment

by:michaelwynne
ID: 8068055
I never said what I wrote would compile, did I.

1)
I think step 4 said, remove any compile errors and recompile until it is ok. Think about it !!.

2)
I always put () around my return expression, its just force of habbit and I happen to think it makes it more readable.

3)
return ISN'T a statement its a keyword.

return; turns it into a statement if you want to be pedantic.

0
 
LVL 8

Expert Comment

by:Exceter
ID: 8068189
>> I never said what I wrote would compile, did I.

That is quite true, you didn't. :-)

>> I always put () around my return expression, its just force of habbit and I happen to think it makes it more readable.

I don't do it myself, but every person has their own style.

>> return ISN'T a statement its a keyword.
>>
>> return; turns it into a statement if you want to be pedantic.

Pardon me, I misspoke. :-)

Exceter
0
 

Expert Comment

by:michaelwynne
ID: 8068202
No Worries :-)
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 8101156
Are you using Turbo C? If so, click on the Compile Menu and choose Compile. Or simply press Alt-F9 to compile the program, and Ctrl-F9 to run it.

Mayank.
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 8544855
How about rating it now?
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question