Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

C thread

Name: Anonymous 2008-08-19 2:59

I'm starting to program C , and I made a basic C program hello.c
and I've written it on notepad. I want to compile it on DOS. How do I do that? Is it a problem if the file is written as hello.c.txt in dos? I did gcc hello.c but it wouldn't work. How do I compile C programs on dos?

Name: Anonymous 2008-08-19 3:36

I don't think you know what DOS is.

Name: Anonymous 2008-08-19 3:39

if you're not going to be helpful then don't post

Name: Anonymous 2008-08-19 3:44

Name: Anonymous 2008-08-19 3:49

hmm ok but why won't gcc compile my program, I've written it on notepad so it should be compatible

Name: Anonymous 2008-08-19 3:59

This had better be a troll.

Name: Anonymous 2008-08-19 3:59

man pthreads

Name: Anonymous 2008-08-19 4:05

ok tell me at what step i went wrong:
1.create a notepad file called hello.c
2.write

#include <stdio.h>
main()
{ printf("hello world\n");
  return(0);
}

3.save the file
4.open command prompt
5.go to folder where my file is stored
6.in command prompt write: gcc hello.c
7. i get error:
gcc: hello.c: no such file or directory
gcc: no input files

Name: Anonymous 2008-08-19 4:16

>>8
Did you enter dir to make sure the file is there?  I'm guessing dir is the Windows equivalent of ls in loonix.

Name: Anonymous 2008-08-19 4:18

yea its there, but its written hello.c.txt

Name: Anonymous 2008-08-19 4:22

u dumass

open the file
click save as
where it says "TEXT DOCUMENT" click the drop down menu
click "ALL FILES"
then s-save and it should like, be .c now dude


woah


fuck

computers are smart!

Name: Anonymous 2008-08-19 4:24

no it still shows up as hello.c.txt

Name: Anonymous 2008-08-19 4:28

can someone who uses windows xp make a step by step guide to writing a c program in notepad and compiling using gcc on ms-dos

Name: Anonymous 2008-08-19 4:35

forget it you guys suck, i'm just gona use cygwin

Name: Anonymous 2008-08-19 5:09

troll or incredibly retarded idiot that doesn't know what file extensions are

Name: Anonymous 2008-08-19 5:16

>>15
dude he's pretty smart he managed to dualboot xp and dos.

Name: Anonymous 2008-08-19 6:58

read SICP

Name: Anonymous 2008-08-19 7:53

Name: Anonymous 2008-08-19 8:41

3/10

Name: Anonymous 2008-08-19 9:07

Upgrade your OS to Vista so that you have the ability to rename files.  It's a complex feature that takes 4GB of RAM and a couple of TB of harddrive to implement.

Name: Anonymous 2008-08-19 12:07


rename hello.c.txt hello.c

Name: Anonymous 2008-08-19 13:02

>>21
Usage: rename [-v] [-n] [-f] perlexpr [filenames]

Name: Anonymous 2008-08-19 13:23

rename /?

Name: Trollbot9000 2009-07-01 10:01


Org/wiki/dos.

Name: Anonymous 2011-02-02 23:24

Don't change these.
Name: Email:
Entire Thread Thread List