Thanks bill I may and download another compiler and see if I do any better all
the best. Alan
----- Original Message -----
From: Bill Cunningham
To: alan.dutton ; [email protected]
Sent: Friday, December 25, 2009 6:08 PM
Subject: Re: [c-prog] GNU compiler
----- Original Message -----
From: "alan.dutton" <[email protected]>
To: <[email protected]>
Sent: Friday, December 25, 2009 9:07 AM
Subject: Re: [c-prog] GNU compiler
> Hello bill can you help I am just starting C++ and have no knowledge of
> any
> other programming. I have got some books on C++ in the first one it gives
> a
> simple program. I am using DevC++ compiler 4.9.9.2.which I downloaded from
> their site. I go to new project type in the code compile and run works
> fine
> click on save all leave the name as first project then a box appears
> saying
> main in the title I save this and start the next program using console
> tick
> C++ default language when I come to save again it says project 2 so I save
> all but this time it says file already exist do I wish to overwrite it so
> I
> have changed the name to something like project 3 .dev but the file then
> seems to disappear and I cannot retrieve it can you tell me where I am
> going
> wrong.
>
> The programs work but not the saving. alan
It sounds like you are having a pronlem with Dev-c++. I don't use Devc++
so I can't help you there. I have a gcc compiler for my linux and djgpp to
run in the DOS box. Get the docs for devc++. Here's a simple hellow world
program in c++. I started with c++ then switched to c.
#include <iostream>
the above is a preprocessor directive to include the iostream library and
bring its functions into scope.*/
using namespace std;
/* namespaces are part of C++ OOP. Those in c-prog can help you with that.
The using directive says I am using C++'s standared namespace so I don't
have to always inclde the scoping operator :: */
int main(void)
{
cout<<"hello world\n";
return 0;
}
the directional operator << points to stdout or standard output. Nowadays
the screen. It sounds like you problem is with not knowing how to use
dev-c++ though.
Bill
[Non-text portions of this message have been removed]