Directly viewing C or C++ Files in your Web browser

There are basically 2 ways in which you can make your browser understand that the C or C++ (CPP) files are basically TEXT files, with a c / cpp extension.

METHOD 1  (Simpler faster, and usually satisfactory.)
    1 >   Click on one of the links to the C / CPP file.
    2>   The browser gives a dialog box saying
                "This file could contain malicious data....   "
                "( )   Open                                            <<<   Radio button
                "( )   Save to disk                                 <<<   Radio button
                "[ ]   Dont ask me this question again.   <<<   Check Box

NOTE THAT ONCE YOU SAY dont ask me again AND CLICK ON OK, THE BORWSER WILL NEVER EVER ASK YOU AGAIN ABOUT THE FILE TYPE, SO BE VERY CAREFUL WITH THAT BOX.
3>   Cilck OPEN and DONT ASK THIS AGAIN,  so your browser will be the default opener for the type c/cpp
 
METHOD  2  (Better way, all of Windows understands what you want):
For NETSCAPE COMMUNICATOR users:
1>  Under the EDIT menu click Preferences.
2>  Under the Navigaor menu,  find & click the Sub option named Applications.
3>  Click on NEW FILE TYPE.

4>  in the box Description, enter C/C++ file
5>  in the box Extension,    enter c cpp   (separate it by a SPACE)
6>  in the box MIME Tpye  enter text/plain  (IN LOWERCASE)
7>  in the box ApplicationLEAVE BLANK.
8>  Press OK.  (if it does not accept it, give some generic app. name like c:\windows\notepad.exe.  this will be the best, as you can skip the subsequent steps.)

9>  click on the new file type you just created.  (it will be  in the list box on left side of the window).
10> Click EDIT,  and under  Handled By  click on NAVIGATOR. (so that the Ask before opening is Deactivated.)

Back to   Main Page   SE Comp Page   Assignments Page

Page Last Updated:  17 December 1998