• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 211
  • Last Modified:

Beginner needs help!!!!!

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
TBM1748
Asked:
TBM1748
  • 4
  • 3
  • 2
  • +5
1 Solution
 
ExceterCommented:
>> 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
 
akshayxxCommented:
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
 
skeid21Commented:
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
Industry Leaders: 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!

 
sphairosCommented:
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
 
TBM1748Author Commented:
I use Windows 98
0
 
ExceterCommented:
>> 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
 
michaelwynneCommented:
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
 
brookdCommented:
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
 
ExceterCommented:
>> 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
 
michaelwynneCommented:
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
 
ExceterCommented:
>> 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
 
michaelwynneCommented:
No Worries :-)
0
 
Mayank SAssociate Director - Product EngineeringCommented:
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
 
Mayank SAssociate Director - Product EngineeringCommented:
How about rating it now?
0

Featured Post

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!

  • 4
  • 3
  • 2
  • +5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now