Compaq ?
October 2, 2009 at 19:57:24
Specs: Windows 98, ?
I have a problem. If I use the
 tag, it doesn't work:
<pre><code class="c">

it displays on the page:


How can I fix this?

See More: C n HTML

Report •

October 3, 2009 at 01:58:52
If you're trying to use "C functions", then <code> is just an html tag that is used to set off any "code" in a fixed font for formatting purposes... it doesn't parse / compile C code.

Or do you mean something else?

Report •

October 3, 2009 at 11:59:36
I'm trying to use C functions. How do I do this? Thanx

Report •

October 3, 2009 at 23:52:45
You'd need to compile as a binary and upload into the cgi-bin folder... your host would also have to allow execution.

#include <stdio.h>

int main(void) {

   printf("Content-type: text/html\n\n"); // always needed
   printf("head elements\n");
   printf("body elements\n");

   return (0);

If your host allows for php, then it has similar functions to C including printf.


Report •

Related Solutions

October 4, 2009 at 11:01:21
How would I compile as binary?

Report •

October 4, 2009 at 19:44:15
You'd need a C / C++ compiler and create an executable; here's gcc from gnu or you can mill over others here.

Here's a resource with source code and a few tips that may also help. However, if you're just using a few functions, then you really may want to consider a server side scripting language instead...

Good luck.

Report •

Ask Question