Need Help with Text Editor and Compiler for C Programming?

  • Thread starter jbmiller
  • Start date
  • Tags
    Text
In summary, the conversation revolved around the need for a text editor and compiler for programming in C. Suggestions were made for downloading Microsoft Visual, NetBeans, or Eclipse. The importance of using a C compiler instead of a different language was discussed. Links were provided for downloading the suggested software. Tips were given for creating a new project and editing C code using Visual C++ Express.
  • #1
jbmiller
122
0
Hey everyone,

Recently I bought a programming book for C, I've been waiting eagerly to start, but I can't because I don't have a text editor or complier.

A couple of people have suggested that I download Microsoft Visual. I did this and I tried to write a simple program from the beginning of the book, but sadly, It wouldn't let me.

If anyone could help me out and give me a good solution, I would greatly appreciate it.

Also, sorry if it seems like I have no clue what I'm talking about (which I don't).

Thanks!
 
Technology news on Phys.org
  • #2
How about Eclipse or NetBeans? I've used both but prefer Netbeans since many of the more common plugins are available in Netbeans bas download.

NetBeans IDE can be used to develop Java or C/C++ projects. However n Windows you may still need to download a C/C++ compiler such as the GNU C/C++ compiler.

Both IDEs have builtin lexical editors for Java and C/C++ source code.
 
  • #3
A small nice IDE is Code::blocks. I have it in my Windows OS. I usually code C++ but I am sure it works for C as well.

Windows does have a text editor (default one is NotePad). If you want to write C code, you will have to save it as a .c extension. Then you can use your compiler to compile the code.
 
  • #4
jedishrfu said:
How about Eclipse or NetBeans? I've used both but prefer Netbeans since many of the more common plugins are available in Netbeans bas download.

NetBeans IDE can be used to develop Java or C/C++ projects. However n Windows you may still need to download a C/C++ compiler such as the GNU C/C++ compiler.

Both IDEs have builtin lexical editors for Java and C/C++ source code.

Could you give me a link to all of the things you mentioned, sorry but I'm new to programming. :frown:
 
  • #5
jbmiller said:
A couple of people have suggested that I download Microsoft Visual. I did this and I tried to write a simple program from the beginning of the book, but sadly, It wouldn't let me.
I will suggest it again; I've found it to be a rather good editor and IDE. What wen't wrong for you?

Also, are you sure the program you downloaded was something like "Microsoft Visual C++ 2010 Express"? Visual Studio works with a number of languages, and you want to make sure you're using the C++ one. e.g. you do not want "C#", "Visual Basic", or anything ".NET".
 
  • #6
Hurkyl said:
I will suggest it again; I've found it to be a rather good editor and IDE. What wen't wrong for you?

Also, are you sure the program you downloaded was something like "Microsoft Visual C++ 2010 Express"? Visual Studio works with a number of languages, and you want to make sure you're using the C++ one. e.g. you do not want "C#", "Visual Basic", or anything ".NET".

http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express

Is this the one you're talking about?
 
  • #7
One quick question. Why C instead of C++?
 
  • #8
Whovian said:
One quick question. Why C instead of C++?

I've been told it's better to start with C instead of C++.
 
  • #9
Really?

Getting the whole language in C++ is a bit harder, but after the first half of most C++ tutorials, you're pretty much able to do anything you could do in C in C++. So that half isn't any harder to grasp than the C bit. C also teaches "bad habits" from an Object-oriented point of view.
 
  • #10
for eclipse: www.eclipse.org and for netbeans: www.netbeans.org both are free

both handle C/C++ and Java and several other languages. The editors understand the syntax of your code and will warn you when you go astray. Notepad on windows won't do any of that but for a true hacker notepad would be a luxury.

Another low-cost editor would be vim, also free, while you might have to get used to vi editing style its saving grace is that it and/or vi are available on every platform imaginable ie windows, macos, linux flavors. It will show your code in color and handle brace checking.

Also anytime someone suggests something without a website you could try googling for it before asking. Its always good to be somewhat proactive and independent in learning about new things.
 
  • #11
jedishrfu said:
for eclipse: www.eclipse.org and for netbeans: www.netbeans.org both are free

both handle C/C++ and Java and several other languages. The editors understand the syntax of your code and will warn you when you go astray. Notepad on windows won't do any of that but for a true hacker notepad would be a luxury.

Another low-cost editor would be vim, also free, while you might have to get used to vi editing style its saving grace is that it and/or vi are available on every platform imaginable ie windows, macos, linux flavors. It will show your code in color and handle brace checking.

Also anytime someone suggests something without a website you could try googling for it before asking. Its always good to be somewhat proactive and independent in learning about new things.

http://netbeans.org/downloads/start.html?platform=windows&lang=en&option=cpp

Is this the version I should download?
 
  • #12
I downloaded the Netbeans software. Looking at it I've come to realize that I have absolutely no clue what to do );
 
  • #13
visual c++ express should work, even for a c program. It might be easier to create a new project following these steps: Create a new directory. Create a small .c file in that directory. Start visual c++ express. Select create new (win32) project, and enter the directory name you created as the project name, then click next. Click on "empty project" (otherwise you get stuff you won't want). This should open up the main project window. Click on project, then click on "add existing item" and select the c file you created. Optionally, click on project, properties, configuration properties, then select "all configurations" (instead of just debug), then "character set" and change from "unicode" to "not set". Then click on file and save all.

You can then start entering your c program from the book, compile it, and debug it step by step.
 
Last edited:
  • #14
rcgldr said:
visual c++ express should work, even for a c program. It might be easier to create a new project following these steps: Create a new directory. Create a small .c file in that directory. Start visual c++ express. Select create new project, and enter the directory name you created as the project name, then click next. Click on "empty project" (otherwise you get stuff you won't want). This should open up the main project window. Click on project, then click on "add existing item" and select the c file you created. Optionally, click on project, properties, configuration properties, then select "all configurations" (instead of just debug), then "character set" and change from "unicode" to "not set". Then click on file and save all.

You can then start entering your c program from the book, compile it, and debug it step by step.

Thanks, this helped alot! :approve:
 

1. What is a text editor?

A text editor is a software program that is used to create and edit text-based files. It is often used by programmers to write and edit code, as well as by writers to create and edit written content.

2. What is the difference between a text editor and a compiler?

A text editor is used to write and edit code, while a compiler is used to convert that code into a form that can be understood and executed by a computer. A compiler takes the code written in a high-level programming language and translates it into machine code, which is a series of instructions that the computer can understand and execute.

3. Can I use any text editor to write code?

Yes, you can use any text editor to write code. However, some text editors are specifically designed for coding and offer features such as syntax highlighting, autocomplete, and debugging tools that can make coding easier and more efficient.

4. What is the purpose of a compiler?

The purpose of a compiler is to translate code written in a high-level programming language into machine code, which can be understood and executed by a computer. This allows programmers to write code in a more human-readable format, making it easier to understand and maintain.

5. Do I need to use a compiler for all programming languages?

No, not all programming languages require a compiler. Some languages, such as JavaScript and Python, are interpreted languages, meaning that the code is executed line by line without the need for a separate compilation step.

Similar threads

  • Programming and Computer Science
Replies
29
Views
2K
Replies
6
Views
1K
  • Programming and Computer Science
Replies
1
Views
1K
  • Programming and Computer Science
Replies
4
Views
3K
  • Programming and Computer Science
Replies
17
Views
1K
  • Programming and Computer Science
Replies
2
Views
1K
  • Programming and Computer Science
Replies
2
Views
1K
  • Programming and Computer Science
Replies
3
Views
1K
  • Programming and Computer Science
Replies
32
Views
2K
  • Programming and Computer Science
Replies
23
Views
5K
Back
Top