Thread: [Dev-C++] RE: rookie question... Getting the current directory// Win exe files do not run / Ansi C
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <Ger...@ne...> - 2002-12-27 02:23:39
|
Message: 1
From: "Danny Roelofs" <dro...@ho...>
To: <dev...@li...>
Date: Thu, 26 Dec 2002 02:36:28 +0100
Subject: [Dev-C++] rookie question... Getting the current directory
This is a multi-part message in MIME format.
------=_NextPart_000_0014_01C2AC87.978DF2E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
Just started today picking my programming hobby after 10 years when i =
used an amiga and a whole different programming
enviroment, i feel like a rookie again in the world of programming with =
c++ with dev4 & windows.....
Can someone tell me how to get the current directory, i think it would =
be something like this:
string test;
void main(void)
{
test =3D GetCurrentDir();
return 0;
}
But ofcourse, this doesnt work.... someone.. enlighten me..
i tryed all kinds of material but couldn't find something that worked =
with dev4 and i dont know where i have to find the problem.
thanks for your help
Danny.
//i dont know if its valid in C++, but with C, please do not void man()...
//it should return integer. otherwise, the behaviour is undefined. :)
Message: 7
Date: Thu, 26 Dec 2002 10:48:25 -0500
To: "Tri Nguyen" <tr...@ge...>, dev...@li...>
From: Matthews <dematthews@uwaterloo.c>
Subject: Re: [Dev-C++] Win exe files do not run / Ansi C or pure C
If I understand your problem corrrectly, you are unable to see the "Hello
world." message that is supposed to print out. To rectify this, add
#include <stdlib.h> and in the line preceeding the return 0 command add
system("PAUSE");
Also, I do not understand why you #included windows.h. There's no reason
to at all.
At 12:52 PM 26/12/2002 +0100, Tri Nguyen wrote:
Hej all,
I would like to learn C and make win exe.
I'm using Win98 SE and DevC++ version 4 (not the newest).
The installed dir is C:\dev-C++ with Ming compile system (incl. in the
package)
My problem is I can not se whether the exe file runs or not.
There are no error message after compiling.
The c files are just a "Hello world" print out.
All the files are in 2 zip files, one for proj03 and the second for proj04.
The second question is the different between Ansi C and C and which is most
suitable with DevC++.
Thanks a lot
TriMy,
---
//for your second question, on ANSI C. Actually the pure C your refering to
//is the ANSI C. It is the standard from which all implementations of the
//language is based. Borland, GCC, LCC, and MS VC++ supports this standards
//however lame or strong their implementations is. And of course, they also
//have their own extensions of the language.
__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp
Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/
|
|
From: Sebastien M. <seb...@te...> - 2002-12-29 04:16:05
|
The command is getcwd() under linux.
On Thu, Dec 26, 2002 at 09:23:21PM -0500, Ger...@ne... wrote=
:
> Message: 1
> From: "Danny Roelofs" <dro...@ho...>
> To: <dev...@li...>
> Date: Thu, 26 Dec 2002 02:36:28 +0100
> Subject: [Dev-C++] rookie question... Getting the current directory
>=20
> This is a multi-part message in MIME format.
>=20
> ------=3D_NextPart_000_0014_01C2AC87.978DF2E0
> Content-Type: text/plain;
> charset=3D"iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>=20
> Hi,
>=20
> Just started today picking my programming hobby after 10 years when i =3D
> used an amiga and a whole different programming
> enviroment, i feel like a rookie again in the world of programming with=
=3D
> c++ with dev4 & windows.....
>=20
> Can someone tell me how to get the current directory, i think it would =
=3D
> be something like this:
>=20
> string test;
>=20
> void main(void)
> {
>=20
> test =3D3D GetCurrentDir();
>=20
>=20
>=20
> return 0;
> }
>=20
> But ofcourse, this doesnt work.... someone.. enlighten me..
>=20
> i tryed all kinds of material but couldn't find something that worked =3D
> with dev4 and i dont know where i have to find the problem.
>=20
> thanks for your help
>=20
> Danny.
>=20
> //i dont know if its valid in C++, but with C, please do not void man()=
...
> //it should return integer. otherwise, the behaviour is undefined. :)
>=20
>=20
> Message: 7
> Date: Thu, 26 Dec 2002 10:48:25 -0500
> To: "Tri Nguyen" <tr...@ge...>, dev...@li....=
net>
> From: Matthews <dematthews@uwaterloo.c>
> Subject: Re: [Dev-C++] Win exe files do not run / Ansi C or pure C
>=20
> If I understand your problem corrrectly, you are unable to see the "Hel=
lo
> world." message that is supposed to print out. To rectify this, add
> #include <stdlib.h> and in the line preceeding the return 0 command add
> system("PAUSE");
>=20
> Also, I do not understand why you #included windows.h. There's no reas=
on
> to at all.
>=20
> At 12:52 PM 26/12/2002 +0100, Tri Nguyen wrote:
> Hej all,
> I would like to learn C and make win exe.
> I'm using Win98 SE and DevC++ version 4 (not the newest).
> The installed dir is C:\dev-C++ with Ming compile system (incl. in the
> package)
> My problem is I can not se whether the exe file runs or not.
> There are no error message after compiling.
> The c files are just a "Hello world" print out.
> All the files are in 2 zip files, one for proj03 and the second for pro=
j04.
>=20
> The second question is the different between Ansi C and C and which is =
most
> suitable with DevC++.
>=20
> Thanks a lot
>=20
> TriMy,
> ---
> //for your second question, on ANSI C. Actually the pure C your referin=
g to=20
> //is the ANSI C. It is the standard from which all implementations of t=
he=20
> //language is based. Borland, GCC, LCC, and MS VC++ supports this stand=
ards
> //however lame or strong their implementations is. And of course, they =
also=20
> //have their own extensions of the language.
>=20
> __________________________________________________________________
> The NEW Netscape 7.0 browser is now available. Upgrade now! http://chan=
nels.netscape.com/ns/browsers/download.jsp=20
>=20
> Get your own FREE, personal Netscape Mail account today at http://webma=
il.netscape.com/
>=20
>=20
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>=20
--=20
Time remaining: 26 weeks 2 days 2 hours 43 minutes
"Ceux qui sont mari=E9s sont nombreux et ceux qui se repentent de s'=EAtr=
e mari=E9s ne le sont pas moins."
[ Proverbe Espagnol ]
|