Thread overview
Where Do I Write My Programs, Again? (reposted)
Sep 17, 2002
Aurura
Sep 17, 2002
Walter
I typed in your suggestion in Notepad and tried to save the file...
Sep 17, 2002
Aurura
Sep 17, 2002
bw
It worked! Finally!
Sep 17, 2002
Aurura
Sep 17, 2002
Walter
Sep 17, 2002
Chris
Sep 20, 2002
Frank Albe
Thank You!
Sep 20, 2002
Aurura
September 17, 2002
I had already posted this under a different topic, but I was concerned that it might not get read by many ppl, since it was so far down the tree...  So I reposted it as an independent.

Aurura
+++++++++++++++++++++++++++++++++

..it would seem that I don't even *have* hello.cpp  .  I did a Find in My Computer, and it didn't find it anywhere.  Was this supposed to be there once I unzipped DigiMars?

I'm a bit confused now-  Am I supposed to be writing programs in Notepad, or the DigiMars compiler?  Which .exe file is the one I'm supposed to use to create programs in the MSDOS prompt?

Up front, I really have appreciated everyone's kindness in response to my inquiries.  Any further help is appreciated.

Thank You,

Me


September 17, 2002
Try this:

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


"Aurura" <aurura@ev1.net> wrote in message news:am622v$hcn$1@digitaldaemon.com...
> I had already posted this under a different topic, but I was concerned
that it
> might not get read by many ppl, since it was so far down the tree...  So I reposted it as an independent.
>
> Aurura
> +++++++++++++++++++++++++++++++++
>
> ..it would seem that I don't even *have* hello.cpp  .  I did a Find in My Computer, and it didn't find it anywhere.  Was this supposed to be there
once I
> unzipped DigiMars?
>
> I'm a bit confused now-  Am I supposed to be writing programs in Notepad,
or the
> DigiMars compiler?  Which .exe file is the one I'm supposed to use to
create
> programs in the MSDOS prompt?
>
> Up front, I really have appreciated everyone's kindness in response to my inquiries.  Any further help is appreciated.
>
> Thank You,
>
> Me
>
>


September 17, 2002
...as "hello.cpp", but it saved it as "hello.cpp.txt".

I'm guessing that this is why, in the DOSprompt, I'm getting :

"Fatal error: unable to open input file 'hello' --- error level 1"

Is there anything else (free) out there beside Notepad that I can use to create
programs?

Also, I'm unsure as to where I should be saving the hello.cpp to; the dm, or bin file?  Or, do I create a new folder in my DigiMars folder?

Each time I open the MSDOS Prompt, I have to type the following:

C:\cd program files\digmars\dm\bin\<whatever specific file>

Should I not have Digital Mars in my Program Files?  If not, where should it be?

Thanks,

Me


September 17, 2002
geez, i'm sorry!  i guess in later versions of windows they have changed notepad to always add the txt extension?  well you can rename it from the dos prompt unless they have outlawed that too... a good text editor is hard to find you'll just have to check out a few until you find something you like, try download.com maybe.

maybe you can "subst s: c:\progra~1\digmars\dm\bin\" to get around that long cd every time, that way you can just type s: and you are there, or a batch file can save you some typing too.  if you're not really into the dosprompt thing it's kinda confusing.. that's why IDDE programs are really great.  most of them incorporate help too so when there's an error you can get an immediate reference to figure out what the compiler's talking about.

hey congratulations on not being a weenie, lotta people would probably given up by now, a dos box can really abuse ya sometimes!!

L8r,
bw

In article <am7mhk$2ctd$1@digitaldaemon.com>, Aurura says...
>
>...as "hello.cpp", but it saved it as "hello.cpp.txt".
<snip>
>C:\cd program files\digmars\dm\bin\<whatever specific file>
>



September 17, 2002
Thank you bw and Walter for your help and patience with me -- I finally got it to work!

My question from this experience is:

When I look in my bin file now, I also see 'hello.obj' and 'hello.map'.  Were these developed in order for hello.cpp to be linked with the kernel?  What do these two extensions mean?

Very grateful for any help offered until I can afford a BOOK,

Me







September 17, 2002
.obj files are generated by the compiler, .map files by the linker.

"Aurura" <aurura@ev1.net> wrote in message news:am84uq$2t3q$1@digitaldaemon.com...
> Thank you bw and Walter for your help and patience with me -- I finally
got it
> to work!
>
> My question from this experience is:
>
> When I look in my bin file now, I also see 'hello.obj' and 'hello.map'.
Were
> these developed in order for hello.cpp to be linked with the kernel?  What
do
> these two extensions mean?
>
> Very grateful for any help offered until I can afford a BOOK,
>
> Me
>
>
>
>
>
>
>


September 17, 2002
On Tue, 17 Sep 2002 16:03:50 -0500, "Aurura" <aurura@ev1.net> wrote:

>Thank you bw and Walter for your help and patience with me -- I finally got it to work!
>
>My question from this experience is:
>
>When I look in my bin file now, I also see 'hello.obj' and 'hello.map'.  Were these developed in order for hello.cpp to be linked with the kernel?  What do these two extensions mean?
>

the obj is basically the output of the compiler for the .cpp or .c with the same name. Think of it as file containing your code translated into assembler and list specifying what the obj needs and what it offers.  It is a binary file, but if you run it through Obj2Asm, you'll get the assembler code of the obj.

The linker uses this to combine your obj's with others (lib files contains collection of obj's) to produce the .exe. To find out what went where the linker can produce a .map file, which is a text file detailing which routines came from where and the place in the .exe they ended up.

Map files can be used to trace incorrect linkage (the linker choose another obj than the one you wanted) or even runtime errors.

Regards, Chris
>Very grateful for any help offered until I can afford a BOOK,
>
>Me
>
>
>
>
>
>

September 20, 2002
On Tue, 17 Sep 2002 16:03:50 -0500, "Aurura" <aurura@ev1.net> wrote:

>Thank you bw and Walter for your help and patience with me -- I finally got it to work!
>
>My question from this experience is:
>
>When I look in my bin file now, I also see 'hello.obj' and 'hello.map'.  Were these developed in order for hello.cpp to be linked with the kernel?  What do these two extensions mean?
>
>Very grateful for any help offered until I can afford a BOOK,
>
>Me
>
>

One book that got pretty good reviews was Steve Heller's "Who's Afraid
of C++" There's a web version here:

http://www.steveheller.com/whos/index.htm

It's written for a beginner.


There is a free downloadable copy of Bruce Eckel's "Thinking in C++" at:

http://www.mindview.net/Books

You can get it in HTML or PDF. This one might rely too heavily on the "standard library" to be useful with DMC at the present time.


 ../frank
September 20, 2002
I really appreciate the link.  I know I'll be needing it!

Right now, I'm studying the basics of C.  I'm at a pretty complicated chapter right now (complicated mostly because I'm not that confident in my math skills). I'm chugging away at it daily, tho.

Thanks, Again,

Me