auto correct for compilers, does it exist?

Recommended Posts

alway616    122
Is there an auto correct menu on the Dev C++ compiler (kinda like the one on microsoft word)? if so where is it? the reason i want one, is: A: im lazy, i get tired of putting the #include........ B: with an auto correct on my compiler i would be able to make code 10 times faster because then i could have my own syntax for the sytax (ex:type 'i..' and it auto corrects it to #include <iostream> or somethin like that) if there isn't one i will just have to start typing my programs in microsoft word then copy and pastin em into my compiler

Share on other sites
templewulf    526
Quote:
 Original post by alway616Is there an auto correct menu on the Dev C++ compiler (kinda like the one on microsoft word)? if so where is it?the reason i want one, is:A: im lazy, i get tired of putting the #include........B: with an auto correct on my compiler i would be able to make code 10 times faster because then i could have my own syntax for the sytax (ex:type 'i..' and it auto corrects it to #include or somethin like that)if there isn't one i will just have to start typing my programs in microsoft word then copy and pastin em into my compiler

Intellisense does that. Or, at least, close enough to it for me. I hate MS Word because it won't stop trying to "correct" me.

EDIT:
Intellisense on wikipedia

It won't do #include for you (as far as I know), but it keeps me from having to remember other people's capitalization schemes.

Share on other sites
pulpfist    528
You just gave me a nice idea for a little development utility.
Thanks =)

alway616    122
he said it best:
Thanks

Share on other sites
Simian Man    1022
I have never used it, but there is a Visual Studio Plugin called Visual Assist that provides such features. There is a product review here on GameDev. It sounds pretty nifty, but $149 is a bit rich for my blood [smile]. Share this post Link to post Share on other sites TheAdmiral 1122 I second the vote for Visual Assist. It has changed my life [rolleyes]. Be warned that it doesn't support Visual Studio Express Edition, though. If only it did, I'd be free to upgrade to 2005 and my world would be complete [sad]. Regards Admiral Share this post Link to post Share on other sites alway616 122 it looks good and all but i second the part about$149 being to much...
plus its not truely auto correct, u can't enter in sytaxes that it will auto correct into the right thing, u have to reach up and click or press enter key...
plus u have to type in part of the syntax, with autocorrect u could make it so if you type in for instance "newprog" and have it auto correct it to
___________
#include <iostream>
using namespace std;
int main()
{
___________

making life alot easier

Share on other sites
CmpDev    100
Quote:
 Original post by alway616it looks good and all but i second the part about \$149 being to much...plus its not truely auto correct, u can't enter in sytaxes that it will auto correct into the right thing, u have to reach up and click or press enter key...plus u have to type in part of the syntax, with autocorrect u could make it so if you type in for instance "newprog" and have it auto correct it to___________#include using namespace std;int main(){___________making life alot easier

lol yes alt+a alt+i scroll enter is far to much to ask for the following
#include <windows.h>LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow){    static TCHAR szAppName[] = TEXT ("");    HWND         hwnd;    MSG          msg;    WNDCLASSEX   wndclassex = {0};    wndclassex.cbSize        = sizeof(WNDCLASSEX);    wndclassex.style         = CS_HREDRAW | CS_VREDRAW;    wndclassex.lpfnWndProc   = WndProc;    wndclassex.cbClsExtra    = 0;    wndclassex.cbWndExtra    = 0;    wndclassex.hInstance     = hInstance;    wndclassex.hIcon         = LoadIcon (NULL, IDI_APPLICATION);    wndclassex.hCursor       = LoadCursor (NULL, IDC_ARROW);    wndclassex.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH);    wndclassex.lpszMenuName  = NULL;    wndclassex.lpszClassName = szAppName;    wndclassex.hIconSm       = wndclassex.hIcon;	    if (!RegisterClassEx (&wndclassex))    {        MessageBox (NULL, TEXT ("RegisterClassEx failed!"), szAppName, MB_ICONERROR);        return 0;    }    hwnd = CreateWindowEx (WS_EX_OVERLAPPEDWINDOW, 		                  szAppName,         		          TEXT ("WindowTitle"),                		  WS_OVERLAPPEDWINDOW,		                  CW_USEDEFAULT,         		          CW_USEDEFAULT,                 		  CW_USEDEFAULT, 		                  CW_USEDEFAULT,         		          NULL,                 		  NULL, 		                  hInstance,        		          NULL); 						      ShowWindow (hwnd, iCmdShow);    UpdateWindow (hwnd);	    while (GetMessage (&msg, NULL, 0, 0))    {        TranslateMessage (&msg);        DispatchMessage (&msg);    }    return msg.wParam;}LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam){    HDC hdc;    PAINTSTRUCT ps;    switch (message)    {    case WM_CREATE:        return (0);		    case WM_PAINT:        hdc = BeginPaint (hwnd, &ps);        TextOut (hdc, 0, 0, "A Window!", 27);        EndPaint (hwnd, &ps);        return (0);		    case WM_DESTROY:        PostQuitMessage (0);        return (0);    }    return DefWindowProc (hwnd, message, wParam, lParam);}

Yes you can also enter you own autotext inserts.
The price is very good for what it gives you and the time it saves, as the saying goes "time is money".

Share on other sites
Off-topic, on-tangent:

It's the flawless prediction of the next variable I'm going to use that charms me most. However, it has somewhat corrupted my coding karma, as I'm in the habit of only ever typing '.' and having it auto-corrected to '->' when appropriate [help].

Regards

Share on other sites
benryves    1999
Visual Studio provides a mechanism entitled Code Snippets that can do this for you.

Share on other sites
Ashkan    451
Syntactic errors are not the hard ones to catch and fix; compiler warnings and errors are fine by me. Semantics are the hardies.

Share on other sites
ApochPiQ    23005
There can never be a true auto-corrector for code, though; the reason is actually pretty simple. In a programming language, making up words is perfectly normal (for instance, FooFunction). In any nontrivial program, I will have to write some words that the auto-corrector has never seen before (at least in the current program, or maybe even ever). This means that, for any nontrivial program, there will be at least one instance where I type something that is right that the auto-corrector will think is wrong (since it's never seen it before).

English, however, tends to be rather less lenient with the inventiagation of newlicious verbiliations.

Share on other sites
alway616    122
Quote:
 Original post by ApochPiQThere can never be a true auto-corrector for code, though; the reason is actually pretty simple. In a programming language, making up words is perfectly normal (for instance, FooFunction). In any nontrivial program, I will have to write some words that the auto-corrector has never seen before (at least in the current program, or maybe even ever). This means that, for any nontrivial program, there will be at least one instance where I type something that is right that the auto-corrector will think is wrong (since it's never seen it before).English, however, tends to be rather less lenient with the inventiagation of newlicious verbiliations.

which is why you would use words and such that you would never use for example my example of 'i..' because where on earth would you use 'i..'????