C++ For Text Editor?

This is a discussion on C++ For Text Editor? within the C++ Programming forums, part of the General Programming Boards category; I'm kind of confused still on what C++ can do and what Visual C++ can do.. Is it the same ...

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    7

    C++ For Text Editor?

    I'm kind of confused still on what C++ can do and what Visual C++ can do.. Is it the same language, but different compiler? Can I make a text editor program like Microsoft Word and wordpad with C++? Can I make games that link with DirectX with C++? I got Visual C++ compiler, and Dev C++, but I'm not sure which to learn first.

  2. #2
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    C++ is the language, Dev C++ and Visual C++ are compilers.

  3. #3
    Registered User
    Join Date
    Apr 2005
    Posts
    7
    yeah, i got a dev C++ compiler, but whats the difference between that and a bisual C++ compiler?

  4. #4
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    Visual C++ is made by Microsoft, and as the name suggests, it's got a different interface allows you to design your program more visually than from just typing a procedure in code.

    To clarify:

    Dev-C++ and Visual C++ are actually IDEs - Integrated Development Environments. They are programs that include a text editor, a compiler, and all the other tools you need to make a C++ program. A compiler is just the program that converts source code into machine code. Dev-C++ uses the MinGW compiler and Visual C++ uses Microsoft's C++ compiler (I'm not sure of the name).

  5. #5
    Registered User
    Join Date
    Jan 2005
    Posts
    7
    thanks

  6. #6
    Registered User
    Join Date
    Apr 2003
    Posts
    2,662
    I'm kind of confused still on what C++ can do and what Visual C++ can do..
    It took me about 6 mths to figure that out too. Visual C++ is like a super text editor--they call super editors like that an IDE (Integrated Development Environment). You can run your C++ programs in them and use them like a simple text editor. But, if your programs get more complicated, then you can use the 'super' part of the Visual C++ editor. Those features help you organize your programs and allow you to easily navigate around a program.

    In addition, if you get into what's called 'windows programming', the Visual C++ editor is very sophisticated. For windows programming, there are actually several types of editors that launch automatically depending on what types of things you are programming. All the Visual C++ features make it much, much simpler to write windows programs, and they automatically take care of a lot of mundane things you would normally have to do. I think this aspect of the Visual C++ editor is what causes the most confusion as to what Visual C++ actually is. Often times, the terms "Visual C++" and "windows programming" seem to describe the same thing. For instance, you will see books called "Visual C++ Programming". In those books, they teach you how to do windows programming while using the Visual C++ editor. However, you can do windows programming with other editors, and even with other languages, like C for instance. But, if you just think of Visual C++ as windows programming, then I think it will make things clearer for you--even if that isn't technically correct.

    The above explanation may leave you with a new question in your mind: what the heck is the difference between C++ and windows programming. C++ has no fancy graphics or windows like the browser window that contains this page. Instead, C++ displays output in a dreary DOS window or writes output to text files on your computer. However, you can use C++ to write programs that produce windows and graphics, but to do that you have to interact with the Windows system--hence the name windows programming. In essence, with windows programming, you write programs that display windows with nice graphics to the users of your program, and you interact with the users through those windows. For instance, your browser is a windows program. You probably click on an icon, and the program starts executing, and then it presents a browser window to you with lots of buttons on it, and it has places for you to type in addresses of websites. That is the way most people are used to interacting with a computer program--through windows.

    I find that MS Visual C++ 6 is really poor when used as a simple text editor. Since I am used to a commercial text editor that has all kinds of autocomplete features and syntax highlighting, as well as spell checking, the MS Visual C++ 6 editor seems archaic, and it can be very frustrating for me to use. I feel like I have type ever little thing, where in my commercial editor I can use autocomplete to type a lot of stuff automatically.
    Last edited by 7stud; 04-04-2005 at 08:44 PM.

  7. #7
    Registered User
    Join Date
    Feb 2005
    Posts
    5
    A computer language , some concepts , theorys.

    Compiler convert the computer language source code to machine code. It implement the computer language concept.

    Computer language has its Standard.

    The compiler support computer language Standard, and it was built in its own way.

  8. #8
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    Quote Originally Posted by bmroyer
    Can I make a text editor program like Microsoft Word and wordpad with C++? Can I make games that link with DirectX with C++?
    Yes.

    Quote Originally Posted by 7stud
    I find that MS Visual C++ 6 is really poor when used as a simple text editor. Since I am used to a commercial text editor that has all kinds of autocomplete features and syntax highlighting, as well as spell checking, the MS Visual C++ 6 editor seems archaic, and it can be very frustrating for me to use.
    MSVC++ 6 Dose have some autocomplete features and dose do syntax highlighting but no spell check. Are you talking about using it to write none-source code documents?

  9. #9
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    Quote Originally Posted by sean_mackrory
    Dev-C++ uses the MinGW compiler
    just a little clarification - Dev-C++ uses the MingW port of GCC - a compiler originally built into *nix systems.

    I would go with Dev-C++ at first because it follows the standards more closely than does VC++.
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  10. #10
    Registered User
    Join Date
    Apr 2003
    Posts
    2,662
    MSVC++ 6 Dose have some autocomplete features and dose do syntax highlighting but no spell check. Are you talking about using it to write none-source code documents?
    No. You are right is has some syntax highlighting and some autocomplete, but I've been using a commercial text editor called EditPlus for java, php, and javascript, and I can avoid a lot of annoying typing by changing the autocomplete file on the fly.

    I think there is a way to setup EditPlus so it interfaces with VC6, so I can compile programs without ever having to leave EditPlus, but I haven't figured out how yet. Currently, I have EditPlus set up so that it interfaces with the Java compiler for Java, IE6 for javascript, and a localhost for php, and I never have to leave EditPlus to run those types of programs.

    Maybe I just don't know how to use VC6 well enough. Can you setup your own autocomplete files in VC6? How about templates that automatically insert the basic outlines of a new program depending on the file type? Custom syntax highlighting?
    Last edited by 7stud; 04-04-2005 at 11:52 PM.

  11. #11
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    you'd probably have to look through VC6's menus to find out where it's compiler is located and link up directly with that.
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  12. #12
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    When creating a new project in VC++ there is a basic template for that project type, I don't know if you can add your own templates. You can insert classes from a file which is where I keep template classes

    I don't think there is custom syntax highligting or custom autocomplete since I've never looked for them.

    Is there a trial version EditPlus? I might take a look.

  13. #13
    Registered User
    Join Date
    Apr 2003
    Posts
    2,662
    Is there a trial version EditPlus? I might take a look.
    Yes. But, I'm not sure it is the best one anymore. google EditPlus and you can get to their website. There is another one called TextPad, which I think is better for Java. Since I was having trouble running Java programs in EditPlus, I was searching around recently, and I found some open source text editors that look pretty powerful. They start off as simple text editors(but much better than something like Notepad), and then you can download whatever plugins you want to increase their functionality. Check out jEdit for instance.

    I also saw a VC6 add on recently that improved the autocomplete and syntax highlighting for something like $90. Someone commented that it was well worth the money, but I can't remember where I saw that.

    Just so you know, you would never use EditPlus for windows programming with MFC. Clearly VC6 is much more powerful for that. But, for basic typing while coding C++ programs, here is what you can do in EditPlus, so you know what I am talking about:

    1) I have icons for different types of programs on a toolbar, and when I click on one to open a new file, it automatically opens the file with a basic program template, like:
    Code:
    #include <iostream>
    using namespace std;
    
    int main()
    {
    
        return 0;
    }
    There are different template files for all the different program types, and you can change them yourself very easily.

    2) Every type of program has it's own autocomplete file. If I have a program with a long variable name, I can quickly add it to the autocomplete file. By typing a few letters I specify in the autocomplete file, and then hitting the space bar, the variable name is completed for me. For instance, I never have to type out a for-loop. I just type 'for' and hit the space bar, and the whole loop is typed out for me. The cursor ends up where the loop conditional goes, and I type in what I want there:
    Code:
    for(int i = 0; i < |; i++)
    {
    
    }
    You get to decide where the cursor ends up after an autocomplete.

    3) Syntax highlighting can be changed to whatever you want and whatever colors you want.

    4) You can create your own user tools that do the things you want, like call up a Java compiler located on your computer somewhere and compile the current program in the editor.

    5) A lot of different search capabilities including being able to search your files with regular expressions. You can search for matching braces.
    Last edited by 7stud; 04-05-2005 at 04:02 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WYSIWYG editor problem
    By Akkernight in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 04-01-2009, 09:50 AM
  2. Replies: 19
    Last Post: 05-30-2007, 06:47 PM
  3. Replies: 12
    Last Post: 08-05-2003, 03:16 PM
  4. OpenGL terrain demo (EDITOR)
    By Jeremy G in forum Game Programming
    Replies: 2
    Last Post: 03-30-2003, 08:11 PM
  5. PFE (prorgammers file editor, for Windows)
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 06-09-2002, 12:01 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21