Like Tree2Likes

put your programs on a website

This is a discussion on put your programs on a website within the Tech Board forums, part of the Community Boards category; hey y'all . i want to be able to put my programs on my website so that they turn out ...

  1. #1
    Registered User
    Join Date
    Feb 2012
    Posts
    99

    put your programs on a website

    hey y'all . i want to be able to put my programs on my website so that they turn out the way they do in these forums. by that i mean they end up looking the way it does below except with code in it, not just ....... obviously ha. does anybody know? cheers
    Code:
     ...........
    .

  2. #2
    Registered User
    Join Date
    Dec 2011
    Posts
    795
    What? Are you really this dumb? Copy and paste your code in.

    Code:
    LOOK, I COPIED SOMETHING!!
    
    LOOK, I COPIED THE URL http://cboard.cprogramming.com/c-programming/146546-put-your-programs-website.html

  3. #3
    Registered User
    Join Date
    Feb 2012
    Posts
    99
    thanks i wouldnt consider myself dumb now , im just not as smart as you

  4. #4
    Registered User
    Join Date
    Feb 2012
    Posts
    99
    actually that didn't work. i copied and pasted it into the html on my website and only the text came up helpp

  5. #5
    Registered User
    Join Date
    Dec 2011
    Posts
    795
    > thanks i wouldnt consider myself dumb now , im just not as smart as you
    I never said I was smart, but this is just common sense..

    Unless it was a dumb moment and you just weren't thinking?

  6. #6
    Registered User
    Join Date
    Feb 2012
    Posts
    99
    read my comment above yours

  7. #7
    Registered User
    Join Date
    Dec 2011
    Posts
    795
    Wait...what? That sounds like something you should know if you're coding HTML, and not a C problem at all. (i thought you were having trouble with formatting etc. initially, never mind)

    I don't know HTML much anymore, but there's most likely something like a [ code ] tag, you'd have to look on google. Edit: and just to clarify, it probably isn't called a code tag.

  8. #8
    Registered User
    Join Date
    Feb 2012
    Posts
    99
    alright ye ive never done html but the website im using has a html box which you can copy code into but im certain there is a way of copying c code in with tags before and after etc.. but i want my c programs to end up in a box like on this website you know what i mean? i dont want it to look like plain text.

  9. #9
    Registered User
    Join Date
    Dec 2011
    Posts
    795
    Show me the website and/or its source.

    Also, would this > HTML Basic help at all?

  10. #10
    Registered User
    Join Date
    Jan 2009
    Posts
    1,485
    Try Googling for javascript syntax highlight or something like that. I found this one right now for example: syntaxhighlighter - Free syntax highlighter written in Java Script - Google Project Hosting
    There's more to choose from if you search a bit.

  11. #11
    Registered User
    Join Date
    Feb 2012
    Posts
    99
    Quote Originally Posted by memcpy View Post
    Show me the website and/or its source.

    Also, would this > HTML Basic help at all?
    ah cheers memcpy ill read into that now for a while thanks.

  12. #12
    Registered User
    Join Date
    Feb 2012
    Posts
    99
    Quote Originally Posted by Subsonics View Post
    Try Googling for javascript syntax highlight or something like that. I found this one right now for example: syntaxhighlighter - Free syntax highlighter written in Java Script - Google Project Hosting
    There's more to choose from if you search a bit.
    thanks for the help ill look into that too.

  13. #13
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    I presume you mean, you want your code formatted in html with syntax highlighting. There's surely a lot of ways to do that, one I've used before is a perl module, Text::VimColor, which is pretty nice because it pipes thru vim, and vim probably has syntax highlighting for more languages and protocols than any other app around.

    If you're not a perl user (and don't have vim installed), that might not be the best route. Which is no big deal, because any tool which does this will probably highlight C/C++.

    A quick google turned this up:

    Online syntax highlighting

    Presto! If that's not good enough, post this on the tech board and you'll get more suggestions.
    Tech Board
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  14. #14
    Registered User
    Join Date
    Feb 2012
    Posts
    99
    wud you know what to do on the online syntzx highlighting? like do i print my code in and then it can get converted to html in which then i can paste into the html on my website which in turn will produce the programs i have written but not in plain text mode?

  15. #15
    Registered User
    Join Date
    Feb 2012
    Posts
    99
    Quote Originally Posted by MK27 View Post
    I presume you mean, you want your code formatted in html with syntax highlighting. There's surely a lot of ways to do that, one I've used before is a perl module, Text::VimColor, which is pretty nice because it pipes thru vim, and vim probably has syntax highlighting for more languages and protocols than any other app around.

    If you're not a perl user (and don't have vim installed), that might not be the best route. Which is no big deal, because any tool which does this will probably highlight C/C++.



    A quick google turned this up:

    Online syntax highlighting

    Presto! If that's not good enough, post this on the tech board and you'll get more suggestions.
    Tech Board

    oh my god it worked thank you so much . i appreciate the help ten fold ha thanks

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 11-09-2009, 07:03 AM
  2. My Website
    By */Death*/ in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 10-06-2006, 05:33 AM
  3. website..
    By 1veedo in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 01-08-2004, 05:43 PM
  4. Programs opening programs
    By LinuxPLC in forum C Programming
    Replies: 1
    Last Post: 11-21-2002, 12:50 PM
  5. a website for simple c programs for beginners
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 02-06-2002, 09:38 PM

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