dev-cpp-users Mailing List for Dev-C++ (Page 503)
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(15) |
Oct
(115) |
Nov
(154) |
Dec
(258) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(377) |
Feb
(260) |
Mar
(249) |
Apr
(188) |
May
(152) |
Jun
(150) |
Jul
(195) |
Aug
(202) |
Sep
(200) |
Oct
(286) |
Nov
(242) |
Dec
(165) |
| 2002 |
Jan
(245) |
Feb
(241) |
Mar
(239) |
Apr
(346) |
May
(406) |
Jun
(369) |
Jul
(418) |
Aug
(357) |
Sep
(362) |
Oct
(597) |
Nov
(455) |
Dec
(344) |
| 2003 |
Jan
(446) |
Feb
(397) |
Mar
(515) |
Apr
(524) |
May
(377) |
Jun
(387) |
Jul
(532) |
Aug
(364) |
Sep
(294) |
Oct
(352) |
Nov
(295) |
Dec
(327) |
| 2004 |
Jan
(416) |
Feb
(318) |
Mar
(324) |
Apr
(249) |
May
(259) |
Jun
(218) |
Jul
(212) |
Aug
(259) |
Sep
(158) |
Oct
(162) |
Nov
(214) |
Dec
(169) |
| 2005 |
Jan
(111) |
Feb
(165) |
Mar
(199) |
Apr
(147) |
May
(131) |
Jun
(163) |
Jul
(235) |
Aug
(136) |
Sep
(84) |
Oct
(88) |
Nov
(113) |
Dec
(100) |
| 2006 |
Jan
(85) |
Feb
(119) |
Mar
(33) |
Apr
(31) |
May
(56) |
Jun
(68) |
Jul
(18) |
Aug
(62) |
Sep
(33) |
Oct
(55) |
Nov
(19) |
Dec
(40) |
| 2007 |
Jan
(22) |
Feb
(49) |
Mar
(34) |
Apr
(51) |
May
(66) |
Jun
(43) |
Jul
(116) |
Aug
(57) |
Sep
(70) |
Oct
(69) |
Nov
(97) |
Dec
(86) |
| 2008 |
Jan
(32) |
Feb
(47) |
Mar
(106) |
Apr
(67) |
May
(28) |
Jun
(39) |
Jul
(31) |
Aug
(25) |
Sep
(18) |
Oct
(25) |
Nov
(5) |
Dec
(21) |
| 2009 |
Jan
(33) |
Feb
(27) |
Mar
(27) |
Apr
(22) |
May
(22) |
Jun
(10) |
Jul
(17) |
Aug
(9) |
Sep
(21) |
Oct
(13) |
Nov
(4) |
Dec
(11) |
| 2010 |
Jan
(10) |
Feb
(8) |
Mar
(4) |
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(8) |
Oct
(26) |
Nov
(9) |
Dec
(1) |
| 2011 |
Jan
(21) |
Feb
(16) |
Mar
(4) |
Apr
(19) |
May
(26) |
Jun
(9) |
Jul
(6) |
Aug
|
Sep
(4) |
Oct
(3) |
Nov
(2) |
Dec
(1) |
| 2012 |
Jan
(4) |
Feb
(7) |
Mar
(4) |
Apr
|
May
(1) |
Jun
(10) |
Jul
(1) |
Aug
(1) |
Sep
(18) |
Oct
(3) |
Nov
(1) |
Dec
(1) |
| 2013 |
Jan
(4) |
Feb
(2) |
Mar
(15) |
Apr
(6) |
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
(9) |
Dec
|
| 2014 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(4) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(4) |
| 2015 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(2) |
Oct
(9) |
Nov
(35) |
Dec
(6) |
| 2016 |
Jan
(7) |
Feb
(10) |
Mar
(10) |
Apr
(9) |
May
(13) |
Jun
(9) |
Jul
(1) |
Aug
(3) |
Sep
(3) |
Oct
(1) |
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Daniel G. <sp...@ho...> - 2002-10-23 10:54:49
|
This seems interesting, I'm working with Access at the moment. where ar
ethese instructions on the web?
Daniel
>From: Magnus Manske <mag...@ep...>
>To: dev...@li...
>Subject: [Dev-C++] mingw and mysql
>Date: Wed, 23 Oct 2002 12:44:11 +0200
>
>Hi all,
>
>I'm new to the list, so please don't lynch me if someone asked the same
>thing yesterday ;-)
>
>I work on W2K and try to write a C++ program that can access a mysql
>database ("normal" access will be fine, mysql++ not needed). My attempts to
>use/convert the mysqlclient.lib have so far been unseccessful, in spite of
>some instructions I found on the web.
>
>Does anyone
>* know how to convert it so I can link it using mingw
>* know a location where I can find an already converted lib
>
>Thanks,
>Magnus
>
>
>
>-------------------------------------------------------
>This sf.net emial is sponsored by: Influence the future of Java(TM)
>technology. Join the Java Community Process(SM) (JCP(SM)) program now.
>http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0002en
>_______________________________________________
>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
_________________________________________________________________
Internet access plans that fit your lifestyle -- join MSN.
http://resourcecenter.msn.com/access/plans/default.asp
|
|
From: Magnus M. <mag...@ep...> - 2002-10-23 10:43:58
|
Hi all,
I'm new to the list, so please don't lynch me if someone asked the same
thing yesterday ;-)
I work on W2K and try to write a C++ program that can access a mysql
database ("normal" access will be fine, mysql++ not needed). My attempts
to use/convert the mysqlclient.lib have so far been unseccessful, in
spite of some instructions I found on the web.
Does anyone
* know how to convert it so I can link it using mingw
* know a location where I can find an already converted lib
Thanks,
Magnus
|
|
From: Carlos d. M. <cg...@wo...> - 2002-10-23 10:10:17
|
Just, launch check for updated, click on start, then it connects to the s= erver for check what updates are there, when it finishes it presents you a list= with radiobuttons with the packages you can get, then select dev.hlp and downl= oad. =3D?gb2312?q?=3DB3=3DC2=3DD1=3DD3=3DCE=3DC4?=3D escribi=F3: > I launched Dev-C++ IDE. I open help menu and click > help on dev-c++;But I was reminded "Can't find any > c:\dev-cpp\devcpp.hlp". > I launched check for update command, but connect > update server. > How can i get devcpp.hlp? > Anyone email me a copy of devcpp.hlp?? > > _________________________________________________________ > Do You Yahoo!? > "=D4=B8=D2=E2=BB=A8=BC=B8=B7=D6=D6=D3=C0=B4=B8=C4=C9=C6=C4=FA=B5=C4=D1=C5= =BB=A2=B5=E7=D3=CA=B7=FE=CE=F1=C2=F0=A3=BF" > http://sweepstakes.yahoo.com/email_usage > > ------------------------------------------------------- > This sf.net emial is sponsored by: Influence the future > of Java(TM) technology. Join the Java Community > Process(SM) (JCP(SM)) program now. > http://ad.doubleclick.net/clk;4699841;7576301;v?http://www.sun.com/java= vote > _______________________________________________ > 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 |
|
From: Daniel G. <sp...@ho...> - 2002-10-23 09:48:54
|
lol oh sorry, yes a menu item of course.
I must get on with proper coding and get away from these other tasks I'm
delegated at the moment. Oh well.
>From: "Vlada Djurovic" <dj...@im...>
>To: "Daniel Glenfield"
><sp...@ho...>,<dev...@li...>
>Subject: Re: [Dev-C++] ChooseColor frustration
>Date: Tue, 22 Oct 2002 09:39:54 +0200
>
>
>----- Original Message -----
>From: "Daniel Glenfield" <sp...@ho...>
>To: <dj...@im...>; <dev...@li...>
>Sent: Monday, October 21, 2002 1:47 PM
>Subject: Re: [Dev-C++] ChooseColor frustration
>
>
> > Ah, I think you mean
> > switch (ID_CHOOSE_COLOR)
> > {
> > case: GREEN
> > {
> > // make green
> > }
> > break;
> >
> > case: BLUE
> > {
> > // etc.
> > }
> > break;
> >
> > default:
> > {
> > // make black
> > }
> > break;
> >
> > }
> >
> > The switch statement checks the variable passed in, and matches it to a
> > case.
>No, ID_CHOOSE_COLOR is a menu item ID, and "case ID_CHOOSE_COLOR:" is a
>part
>of message loop. What I had in mind is to display a ChooseColor dialog,
>choose a color and place its value in crCurColor variable, and then use it
>to draw lines. Anyway, I just figured out what was the problem: I forgot to
>select the pen! Prety stupid! Anyway, thanks for your help and sorry if I
>caused any trouble with this nonsense.
>
>Regards, Vlada
> >
> >
> > >From: "Vlada Djurovic" <dj...@im...>
> > >To: "'DevC++ help'" <dev...@li...>
> > >Subject: [Dev-C++] ChooseColor frustration
> > >Date: Mon, 21 Oct 2002 13:13:15 +0200
> > >
> > >Hi, everybody
> > >I have a problem with ChooseColor common dialog. I wrote the code, it
> > >compiled OK, but what ever color I choose, I get black. I can't figure
>out
> > >what's wrong. Here's the code, so if anyone can help me...thanks.
> > >
> > >case ID_CHOOSE_COLOR:
> > > {
> > > CHOOSECOLOR chColor;
> > > chColor.lStructSize=sizeof(CHOOSECOLOR);
> > > chColor.hwndOwner=hwnd;
> > > chColor.lpCustColors=crCustColor;
> > > chColor.Flags=CC_FULLOPEN;
> > >
> > > ChooseColor(&chColor);
> > > crCurColor=chColor.rgbResult; /*crCurColor is
> > >global variable*/
> > > }
> > > break;
> >
> >
> > _________________________________________________________________
> > Choose an Internet access plan right for you -- try MSN!
> > http://resourcecenter.msn.com/access/plans/default.asp
> >
_________________________________________________________________
Surf the Web without missing calls! Get MSN Broadband.
http://resourcecenter.msn.com/access/plans/freeactivation.asp
|
|
From: Marc H. <ma...@e-...> - 2002-10-23 07:49:10
|
Hi,
If you build an array of structs as you have below, you have a fixed number
of records. It might be a good idea to build your data structure (and I
suggest using a class which you can then use to validate data and perform
operations on your data) and then storing your "records" in a STL vector, or
similar. This allows you to dymaically change the number of employee, etc.
etc. etc. So you'd get something like:
A file called "employee.h", for example
_____________________________
#include <vector>
using namespace std;
class CEmployee
{
public:
CEmployee(); //constructor - init code
~CEmployee(); //destructor - clean up code
public:
BOOL SetId(int nId); //Get and set methods for props
int GetId(void);
BOOL SetAge(int nAge);
int GetAge(void);
BOOL SetSalary(float fSalary);
float GetSalary(void);
BOOL SetName(char *szName);
char* GetName(void);
private:
//private properties
int m_nId;
int m_nAge;
float m_fSalary;
char m_szName[25];
}
typedef vector<CEmployee*> EMPLOYEES_DATABASE;
_____________________________
And then use
_____________________________
#include <iostream>
#include "employee.h"
int main(void)
{
EMPLOYEES_DATABASE database;
CEmployee *employee = new CEmployee(); //Create new employee
employee->SetName("Marc Heiligers"); //Set employee properties
employee->SetAge(27);
employee->SetId(0);
employee->SetSalary(1000000.00);
database.push_back(employee); //Add employee to
end of vector
.
.
.
cout << "Number of employees: " << database.size() << endl;
//Use an iterator to loop through all employees and print their
names.
EMPLOYEES_DATABASE::iterator iter;
for (iter = database.begin(); iter != database.end; iter++)
{
employee = *iter;
cout << "Name: " << employee->GetName() << endl;
}
return 0;
}
_____________________________
So, to answer your question (umm, this may have been a bit of overkill),
yes, you can use employee_name[25] array. You would access each "record"
with a for loop. But there is no need to loop through the name array unless
you want to search the name for a particular character.
_____________________________
Marc Heiligers
-----Original Message-----
From: Rob Peacock [mailto:py...@ea...]
Sent: 22 October 2002 06:35 PM
To: dev...@li...
Subject: [Dev-C++] Question about structs...
OK, I'm back for more information. I'm looking at a slightly different way
of building the database I asked about yesterday.
The examples I have seen for a structure are typically a database. Here's
the one I have seen posted on several newbie sites:
#include <iostream.h>
struct database
{
int id_number;
int age;
float salary;
};
int main()
{
database employee;
employee.age=22;
employee.id_number=1;
employee.salary=120000.21;
return 0;
}
My question is this; this struct as it is written will only hold one record,
and all of the entries are int's. If I wanted to have multiple records using
the same struct, can I create a struct array (correct
terminology?) like this:
struct database[100]
{
int id_number;
char employee_name[25];
int age;
float salary;
};
To populate it, or to access the individual records within the array, I
would use the standard for() loops, correct? Same with the emplyee_name[]
array?
Thanks all,
--->Rob
|
|
From: Vlada D. <dj...@im...> - 2002-10-23 07:18:23
|
----- Original Message -----
From: "Daniel Glenfield" <sp...@ho...>
To: <dj...@im...>; <dev...@li...>
Sent: Monday, October 21, 2002 1:47 PM
Subject: Re: [Dev-C++] ChooseColor frustration
> Ah, I think you mean
> switch (ID_CHOOSE_COLOR)
> {
> case: GREEN
> {
> // make green
> }
> break;
>
> case: BLUE
> {
> // etc.
> }
> break;
>
> default:
> {
> // make black
> }
> break;
>
> }
>
> The switch statement checks the variable passed in, and matches it to a
> case.
No, ID_CHOOSE_COLOR is a menu item ID, and "case ID_CHOOSE_COLOR:" is a part
of message loop. What I had in mind is to display a ChooseColor dialog,
choose a color and place its value in crCurColor variable, and then use it
to draw lines. Anyway, I just figured out what was the problem: I forgot to
select the pen! Prety stupid! Anyway, thanks for your help and sorry if I
caused any trouble with this nonsense.
Regards, Vlada
>
>
> >From: "Vlada Djurovic" <dj...@im...>
> >To: "'DevC++ help'" <dev...@li...>
> >Subject: [Dev-C++] ChooseColor frustration
> >Date: Mon, 21 Oct 2002 13:13:15 +0200
> >
> >Hi, everybody
> >I have a problem with ChooseColor common dialog. I wrote the code, it
> >compiled OK, but what ever color I choose, I get black. I can't figure
out
> >what's wrong. Here's the code, so if anyone can help me...thanks.
> >
> >case ID_CHOOSE_COLOR:
> > {
> > CHOOSECOLOR chColor;
> > chColor.lStructSize=sizeof(CHOOSECOLOR);
> > chColor.hwndOwner=hwnd;
> > chColor.lpCustColors=crCustColor;
> > chColor.Flags=CC_FULLOPEN;
> >
> > ChooseColor(&chColor);
> > crCurColor=chColor.rgbResult; /*crCurColor is
> >global variable*/
> > }
> > break;
>
>
> _________________________________________________________________
> Choose an Internet access plan right for you -- try MSN!
> http://resourcecenter.msn.com/access/plans/default.asp
>
|
|
From: <cy...@ya...> - 2002-10-23 03:36:52
|
I launched Dev-C++ IDE. I open help menu and click help on dev-c++;But I was reminded "Can't find any c:\dev-cpp\devcpp.hlp". I launched check for update command, but connect update server. How can i get devcpp.hlp? Anyone email me a copy of devcpp.hlp?? _________________________________________________________ Do You Yahoo!? "愿意花几分钟来改善您的雅虎电邮服务吗?" http://sweepstakes.yahoo.com/email_usage |
|
From: <qa...@ho...> - 2002-10-22 21:13:46
|
Hi Mac=E1rio I think those headerfiles are needed when running in Unix (Linux as well I= suppose). What you need to do to make it work under Win is to include <windows.h> and= some other stuff. Take a look at this tutorial. http://www.ecst.csuchico.edu/~beej/guide/net/bgnet.pdf I strongly recommend that you read through the tutorial. It's long, but= it's worth reading. Very informative! Regards /J=F6rgen *********** REPLY SEPARATOR *********** On 2002-10-22 at 17:12 Andr=E9 Mac=E1rio Barros wrote: >Gentelmen, > I need your help... let me retransmit my question: >=3D=3D=3D >I need to run the client-server Douglas Comer example, but I didn't find > >the following include files in DevC++: > > socket.h > in.h > netdb.h > pwd.h > >Where can I find them? For Win'9x and Linux? > >Best Regards >Mac=E1rio > > > > > >------------------------------------------------------- >This sf.net emial is sponsored by: Influence the future >of Java(TM) technology. Join the Java Community >Process(SM) (JCP(SM)) program now. >http://ad.doubleclick.net/clk;4699841;7576301;v?http://www.sun.com/javavote= >_______________________________________________ >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 =FF |
|
From: Osmany V. <ov...@ic...> - 2002-10-22 20:38:02
|
I downloaded the Dev-Cpp program from the bloodshed site, i need to = download the help files, how can i do that ?. I tried with Tools >> Check for Updates/Packages but i could not = download the files. |
|
From: B. <ama...@uo...> - 2002-10-22 20:05:28
|
Gentelmen,
I need your help... let me retransmit my question:
=3D=3D=3D
I need to run the client-server Douglas Comer example, but I didn't find
the following include files in DevC++:
socket.h
in.h
netdb.h
pwd.h
Where can I find them? For Win'9x and Linux?
Best Regards
Mac=E1rio
|
|
From: Carlos d. M. <cg...@wo...> - 2002-10-22 19:52:01
|
Pffsssccsjcjshdj! Sorry for the last post, I have discovered I did a change in makeg95.env I shouldn't do now I ahve not that error. |
|
From: Per W. <pw...@ia...> - 2002-10-22 19:16:40
|
Try create a variable:
database employees[100];
instead.
employees[0].age = 22;
...
/Per W
On Tue, 22 Oct 2002, Rob Peacock wrote:
> OK, I'm back for more information. I'm looking at a slightly different way
> of building the database I asked about yesterday.
>
> The examples I have seen for a structure are typically a database. Here's
> the one I have seen posted on several newbie sites:
>
> #include <iostream.h>
>
> struct database
> {
> int id_number;
> int age;
> float salary;
> };
>
> int main()
> {
> database employee;
> employee.age=22;
> employee.id_number=1;
> employee.salary=120000.21;
>
> return 0;
> }
>
> My question is this; this struct as it is written will only hold one
> record, and all of the entries are int's. If I wanted to have multiple
> records using the same struct, can I create a struct array (correct
> terminology?) like this:
>
> struct database[100]
> {
> int id_number;
> char employee_name[25];
> int age;
> float salary;
> };
>
> To populate it, or to access the individual records within the array, I
> would use the standard for() loops, correct? Same with the emplyee_name[]
> array?
>
> Thanks all,
>
> --->Rob
>
>
>
> -------------------------------------------------------
> This sf.net emial is sponsored by: Influence the future
> of Java(TM) technology. Join the Java Community
> Process(SM) (JCP(SM)) program now.
> http://ad.doubleclick.net/clk;4699841;7576301;v?http://www.sun.com/javavote
> _______________________________________________
> 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
>
|
|
From: Carlos d. M. <cg...@wo...> - 2002-10-22 18:21:29
|
I decided give a try to wxwindows 233, what I achieve is that when I use msys ./configure, it says checking for flex... lex, after make it arrives a point when it pass over lexer.1 and says lex: command not found. With cmd.exe make -f makefile.g95 makedir cannot create dirs and cpy cannot copy (file does not exist) With msys make it starts to compile till a notebook.cpp, where it reports a lot of errors: undefined variables and parse errors. |
|
From: Rob P. <py...@ea...> - 2002-10-22 16:44:05
|
OK, I'm back for more information. I'm looking at a slightly different way
of building the database I asked about yesterday.
The examples I have seen for a structure are typically a database. Here's
the one I have seen posted on several newbie sites:
#include <iostream.h>
struct database
{
int id_number;
int age;
float salary;
};
int main()
{
database employee;
employee.age=22;
employee.id_number=1;
employee.salary=120000.21;
return 0;
}
My question is this; this struct as it is written will only hold one
record, and all of the entries are int's. If I wanted to have multiple
records using the same struct, can I create a struct array (correct
terminology?) like this:
struct database[100]
{
int id_number;
char employee_name[25];
int age;
float salary;
};
To populate it, or to access the individual records within the array, I
would use the standard for() loops, correct? Same with the emplyee_name[]
array?
Thanks all,
--->Rob
|
|
From: Abhijit S. <mu...@gm...> - 2002-10-22 14:57:02
|
Greets, Tomas. > Hi all, > Is it possible to get C syntax help within the Dev C++ ide? I can't see how ts done and I for one always require F1 hotkey help at times. > any workarounds anyone? > Tomas Try this file: http://www.borland.com/devsupport/borlandcpp/patches/BC52HLP1.ZIP It's a Win32 API reference. The standard C-library functions are not there, but most Win32 functions are. For the standard C-library, this page contains some CHM files. It was posted on this list some time back. http://mefriss1.swan.ac.uk/~jfonseca/gnu-win32/documentation/chm/index.html These two should help you find your way around. ___________________________________________________________ Abhijit Shylanath E-mail: mu...@gm... || ibr...@bi... Web-site: http://mudeth.tripod.com/ |
|
From: Tomas W. <tom...@ee...> - 2002-10-22 13:52:19
|
Hi Adrian, I think we were discussing two different things here, what I would like is to have "Help" on C syntax available from within Dev-C++. I have no problem using C in Dev-C++ my problem is best explained thus: say for example that I cannot remember the function prototype for the printf function, what do I do? In packages like RHIDE (or DJGPP) I would like to look it up in the usual C syntax help usually by highlighting the word "printf" and pressing F1. It seems this is not possible in Dev-C++, but I find this hard to believe I imagine I am just doing something wrong. Any ideas? Tomas On 22 October 2002 13:19, Adrian Williams [SMTP:pax...@ho...] wrote: > > > ok ansi C capability can be used within programs using the header file > ansidecl.h file in the include folder in the package full details of it's > use is found within the *.H file itself as remarks. > > Hope this is what u were looking for :) > > Ade > > > > > >From: Tomas Ward <tom...@ee...> > >Reply-To: "tom...@ee..." <tom...@ee...> > >To: 'Adrian Williams' <pax...@ho...> > >CC: "'dev...@li...'" > ><dev...@li...> > >Subject: RE: [Dev-C++] C Syntax help within DevC++ ? > >Date: Tue, 22 Oct 2002 10:08:29 +0100 > > > >Hi Adrian, > >Thanks for the help but I'm not quite sure what you mean, are you talking > >about a command line parameter here? Also I'm not sure what the demos are? > >sorry I'm not getting it > >Tomas > > > >On 21 October 2002 21:54, Adrian Williams [SMTP:pax...@ho...] > >wrote: > > > there is a way check the demos... I believe the command is :- > > > > > > USES "C" > > > > > > Hope this was of some help > > > > > > Ade > > > > > > > > > > > > > > > >From: Tomas Ward <tom...@ee...> > > > >Reply-To: "tom...@ee..." <tom...@ee...> > > > >To: "'dev...@li...'" > > > ><dev...@li...> > > > >Subject: [Dev-C++] C Syntax help within DevC++ ? > > > >Date: Mon, 21 Oct 2002 17:36:29 +0100 > > > > > > > >Hi all, > > > >Is it possible to get C syntax help within the Dev C++ ide? I can't see > >how > > > >ts done and I for one always require F1 hotkey help at times. > > > >any workarounds anyone? > > > >Tomas > > > > > > > > > > > >------------------------------------------------------- > > > >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 > > > > > > > > > _________________________________________________________________ > > > Broadband? Dial-up? Get reliable MSN Internet Access. > > > http://resourcecenter.msn.com/access/plans/default.asp > > > > > > _________________________________________________________________ > Broadband? Dial-up? Get reliable MSN Internet Access. > http://resourcecenter.msn.com/access/plans/default.asp > |
|
From: Santiago P. C. <San...@yd...> - 2002-10-22 08:57:21
|
Hi Roberto, Of course you can compile your code as 'C' with MinGW/gcc ;o) but the question is that you are (probably) mixing C style includes and C++ style= includes: =09- <stdio.h> is the 'C style include' while <iostream> is the 'C++ version' for the "same" behaviour: input/output. =09- <stdlib.h> is the 'C version' while <cstdlib> is the 'C++ include style of C functions' ;o) for the standard library. Talking about YOUR includes: if you are not using any C++ code you don't need to include <cstdlib> nor <iostream> and of course, you don't have to= put 'using namespace std;' in your code. But, if you are compiling gotoxy.cpp (which is supposed to be C++ code), you'll probably have to pu= t 'using namespace std;' because of the includes that I've seen (<cstdlib> = and <iostream>) which are C++ includes. BTW, it seems that your paths values are OK. Regards,=20 Santy -----Original Message----- From: Roberto Ricardi [mailto:rob...@ar...]=20 Sent: martes, 22 de octubre de 2002 3:20 To: 'Dev-C++ -Users-List' Cc: Santiago Palmier Campos Subject: Re: [Dev-C++] Dev-cpp 4.9.6.4 with last mingw 2.0.0.3 distributi= o n errors HI Santiago, Ok, I can compile it like c o c++, but almost 99% of code is ansi c or=20 near, not c++. Im not a c++ programer. My includes #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <conio.h> #include <dos.h> #include <math.h> A member group, Mr. Jason Hardman who send me a nice convert from my old = gotoxy dos style called gotoxy.cpp, it works great. Code includes used: #include <windows.h> #include <cstdlib> #include <iostream> I have not idea about namespaces mean. There is not in my code. More than this: I have my dev-cpp in C:\Dev-cpp and the new mingw in C:\mingw so: I traslated all Dev-cpp path to c:\mingw path (some maybe put both, for=20 testing) binaries C:\Dev-cpp\bin\ C:\Dev-cpp\lib\gcc-lib\mingw32\3.2 library C:\Dev-cpp\lib includes C:\Dev-cpp\include C:\Dev-cpp\c includes c++ C:\Dev-cpp\include C:\Dev-cpp\include\c++ All ' programs' pointing to c:\mingw\bin I put another copy here 'make.exe' from mingw32-make.exe without changes.= =BFMaybe some wrong path here? That=B4s all folk Thanks a lot for your attention Roberto. Santiago Palmier Campos wrote: >Hi Roberto, > >Are you sure you are not compiling 'C++' code but 'C' code ? >(Your statement "Im working in c just not c++." confuses me =3D8-O) > >I know that 'curiosity killed the cat', but (coz I'm not a cat ;oD)...=20 > Why do you need to use namespaces? > Are you including '<iostream>' or '<stdio.h>'? > >Regards, >Santy :o? > >-----Original Message----- >From: Roberto Ricardi [mailto:rob...@ar...] >Sent: lunes, 21 de octubre de 2002 3:36 >To: Dev...@li... >Subject: Re: [Dev-C++] Dev-cpp 4.9.6.4 with last mingw 2.0.0.3 distribut= ion >errors > > >Hi Horst, > >Nope, have not ' using namespace std;' in my code. > >Regards > >h.r...@gm... wrote: > > =20 > >>>Hi all, >>> >>>I=B4ve tried to use dev-cpp with new mingw 2.0.0.3, I read here some = >>>about make name changes, so I rename and copy min...-make.exe in=20 >>>make.exe (tryed with both) , I changed all the directories=20 >>>references, but some looks wrong. Im working in c just not c++. >>> >>>This is the dump compiler / linker results (help linker tell me some=20 >>>about generic error in your source) of course all work well with the=20 >>>distribution from dev-cpp. >>> >>>=BFAny ideas? >>> >>>[Linker error] undefined reference to `std::ios_base::Init::Init()' >>>[Linker error] undefined reference to `std::ios_base::Init::~Init()'=20 >>>[Linker error] undefined reference to `__gxx_personality_v0' =20 >>>C:\Dev-Cpp\c\Makefile.win [Build Error] make.exe: *** [Myprog.exe]=20 >>>Error 1 >>> >>>Thanks in advance >>> >>>Roberto >>> >>> =20 >>> >>> =20 >>> >>Hi, >> >>i use mingw 2.0.0.3 too and all works fine. >>You have included: >>using namespace std;=20 >>in your code ? >> >>Horst >> >>=20 >> >> =20 >> > > > > > >------------------------------------------------------- >This sf.net email is sponsored by: >Access Your PC Securely with GoToMyPC. Try Free Now=20 >https://www.gotomypc.com/s/OSND/DD >_______________________________________________ >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 >----------------------------------------------------------------------- >--------------- >This message and any files transmitted with it are confidential and intended solely=20 >for the use of the individual or entity to whom they are addressed. No confidentiality=20 >or privilege is waived or lost by any wrong transmission.=20 >If you have received this message in error, please immediately destroy i= t and kindly=20 >notify the sender by reply email. >You must not, directly or indirectly, use, disclose, distribute, print, = or copy any=20 >part of this message if you are not the intended recipient. Opinions, conclusions and=20 >other information in this message that do not relate to the official business of=20 >Ydilo Advanced Voice Solutions, S.A. shall be understood as neither give= n nor endorsed by it.=20 >------------------------------------------------------------------------= --- ----------- > > =20 > -------------------------------------------------------------------------= ------------- This message and any files transmitted with it are confidential and inten= ded solely=20 for the use of the individual or entity to whom they are addressed. No co= nfidentiality=20 or privilege is waived or lost by any wrong transmission.=20 If you have received this message in error, please immediately destroy it= =20and kindly=20 notify the sender by reply email. You must not, directly or indirectly, use, disclose, distribute, print, o= r copy any=20 part of this message if you are not the intended recipient. Opinions, con= clusions and=20 other information in this message that do not relate to the official busi= ness of=20 Ydilo Advanced Voice Solutions, S.A. shall be understood as neither given= =20nor endorsed by it.=20 -------------------------------------------------------------------------= ------------- |
|
From: Tomas W. <tom...@ee...> - 2002-10-22 08:53:53
|
Hi Adrian, Thanks for the help but I'm not quite sure what you mean, are you talking about a command line parameter here? Also I'm not sure what the demos are? sorry I'm not getting it Tomas On 21 October 2002 21:54, Adrian Williams [SMTP:pax...@ho...] wrote: > there is a way check the demos... I believe the command is :- > > USES "C" > > Hope this was of some help > > Ade > > > > > >From: Tomas Ward <tom...@ee...> > >Reply-To: "tom...@ee..." <tom...@ee...> > >To: "'dev...@li...'" > ><dev...@li...> > >Subject: [Dev-C++] C Syntax help within DevC++ ? > >Date: Mon, 21 Oct 2002 17:36:29 +0100 > > > >Hi all, > >Is it possible to get C syntax help within the Dev C++ ide? I can't see how > >ts done and I for one always require F1 hotkey help at times. > >any workarounds anyone? > >Tomas > > > > > >------------------------------------------------------- > >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 > > > _________________________________________________________________ > Broadband? Dial-up? Get reliable MSN Internet Access. > http://resourcecenter.msn.com/access/plans/default.asp > |
|
From: metalseb <met...@fr...> - 2002-10-22 06:56:24
|
Ioannis wrote : Hi again Ioannis > Regarding Longhorn, this is what i have read in various web sites: > "Longhorn will provide only Managed APIs". In any case, even if Win32 > API (together with its encapsulations like MFC etc), continues to be > supported, it will not be further developed. That's why I wanted to know. Win32 root will continue to be supported. At least. An emulation of Win32 base API through .NET ? What does MS so big is that there are zillions of applications available for their system, for every need. If now, Microsoft decides to get rid of the past and make a *brand new* system without any support for older applications (From 3.0 to XP !!!), they will smash down their empire and restart from ground zero. I cannot believe a word of that. What I understand from the MSDN article, is that there won't be any way in further Longhorn release of VC++ to write and compile proggies with only MFC or Win32 API. -- Seb |
|
From: Ioannis V. <no...@ho...> - 2002-10-22 04:47:53
|
-----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Santiago Sent: Monday, October 21, 2002 9:24 PM To: Carlos Garc=EDa del Monte; dev-cpp-users-list Subject: Re: [Dev-C++] Re: learning c++, best book So since .NET has nothing to do with C++, one doesn't need to learn C++ in order to learn .NET?? Also, Ioannis Vranos say: "Something very important. The next Windows version codenamed "Longhorn" will provide *only* managed .NET APIs. MS is committed to provide .NET APIs for all its products. " So, does that mean win32API applications won't work on "Longhorn"?=20 You can use .NET from within any language (with a compiler that supports .NET). =20 Regarding Longhorn, this is what i have read in various web sites: "Longhorn will provide only Managed APIs". In any case, even if Win32 API (together with its encapsulations like MFC etc), continues to be supported, it will not be further developed. =20 =20 Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com <http://www.noicys.freeurl.com/>=20 * Alternative URL: http://run.to/noicys |
|
From: Ioannis V. <no...@ho...> - 2002-10-22 04:41:42
|
=20
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...] On Behalf Of J=F6rgen
Sent: Monday, October 21, 2002 7:08 PM
To: dev...@li...
Subject: [Dev-C++] STL list problem
Hello all,
=20
I get an errormessage when I compile and I can't figure out what the
problem is.
Here's the code
=20
#include <iostream>
#include <list>
=20
int main(int argc, char *argv[]){=20
using namespace std;
=20
list<int> initialWeightList;
for(int i=3D0; i<10; i++)
initialWeightList.push_back(i); =20
list<int>::iterator iter;
for(
iter =3D initialWeightList.begin();=20
iter < initialWeightList.end(); // <--- error ?!?!?!
iter++
){
cout << "Here i do something" << endl;
} =20
}
=20
and here's the errormessage
=20
12 D:\Programmering\IDE\Dev-Cpp\__Projects\Test\main.cpp
no match for `_List_iterator<int,int &,int *> & < _List_iterator<int,int
&,int *>'
The for-statement is split up so I can locate the error
Any ideas?
If I replace all list<int> by vector<int>, and include <vector>
ofcourse, it works just fine.
=20
Yes list doesn't support this kind of iterators. Use !=3D instead:
=20
for(
iter =3D initialWeightList.begin();=20
iter !=3D initialWeightList.end();
++iter
)
=20
=20
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.freeurl.com
<http://www.noicys.freeurl.com/>=20
* Alternative URL: http://run.to/noicys
|
|
From: Ioannis V. <no...@ho...> - 2002-10-22 04:23:31
|
> -----Original Message----- > From: dev...@li...=20 > [mailto:dev...@li...] On Behalf=20 > Of metalseb > Sent: Monday, October 21, 2002 12:16 PM > To: devcpp mailing list > Subject: Re: [Dev-C++] learning c++, best book >=20 >=20 >=20 >=20 > Ioannis Vranos wrote: >=20 >=20 > > Something very important. The next Windows version=20 > codenamed "Longhorn" > > will provide *only* managed .NET APIs.=20 >=20 >=20 > I don't understand really fine Ioannis. Does this mean that=20 > billions of apps=20 > written using the standard Win32 API (This including those=20 > developped with MFC)=20 > will no longer work with Longhorn ? >=20 > As far as I can read in the MSDN article, it does not tell=20 > that. They only mean=20 > that future Visual studios release will not support Win32 anymore. >=20 > Can you be more precise about this ? I can't be more precise about this since this is what i have seen. MS says that Longhorn will provide only managed apis (at least in some areas?). What we can safely assume from this is that at least no further Win32/MFC etc development will occur. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL: http://run.to/noicys |
|
From: Ioannis V. <no...@ho...> - 2002-10-22 04:20:54
|
> -----Original Message----- > From: Per Westermark [mailto:pw...@ia...] > Sent: Monday, October 21, 2002 1:46 PM > To: Ioannis Vranos > Cc: dev...@li... > Subject: RE: [Dev-C++] Make switch condition an enum > > > Most compilers support float and double too, but if the underlying > processor doesn't support it and the c libraries have to > supply a software > emulation, the performance of the program will really suck. Well it will support some floating point type, willn't it? float can be the same with double. > > The trick is to know the target environment before starting to code... > When the target OS doesn't have wide character support, the > use of wchar_t > isn't recommended. Why? wchar_t can be the same as an int for example. While everything will work, like wprintf() etc why not use it? Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL: http://run.to/noicys |
|
From: Roberto R. <rob...@ar...> - 2002-10-22 01:19:54
|
HI Santiago, Ok, I can compile it like c o c++, but almost 99% of code is ansi c or near, not c++. Im not a c++ programer. My includes #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <conio.h> #include <dos.h> #include <math.h> A member group, Mr. Jason Hardman who send me a nice convert from my old gotoxy dos style called gotoxy.cpp, it works great. Code includes used: #include <windows.h> #include <cstdlib> #include <iostream> I have not idea about namespaces mean. There is not in my code. More than this: I have my dev-cpp in C:\Dev-cpp and the new mingw in C:\mingw so: I traslated all Dev-cpp path to c:\mingw path (some maybe put both, for testing) binaries C:\Dev-cpp\bin\ C:\Dev-cpp\lib\gcc-lib\mingw32\3.2 library C:\Dev-cpp\lib includes C:\Dev-cpp\include C:\Dev-cpp\c includes c++ C:\Dev-cpp\include C:\Dev-cpp\include\c++ All ' programs' pointing to c:\mingw\bin I put another copy here 'make.exe' from mingw32-make.exe without changes. ¿Maybe some wrong path here? That´s all folk Thanks a lot for your attention Roberto. Santiago Palmier Campos wrote: >Hi Roberto, > >Are you sure you are not compiling 'C++' code but 'C' code ? >(Your statement "Im working in c just not c++." confuses me =8-O) > >I know that 'curiosity killed the cat', but (coz I'm not a cat ;oD)... > Why do you need to use namespaces? > Are you including '<iostream>' or '<stdio.h>'? > >Regards, >Santy :o? > >-----Original Message----- >From: Roberto Ricardi [mailto:rob...@ar...] >Sent: lunes, 21 de octubre de 2002 3:36 >To: Dev...@li... >Subject: Re: [Dev-C++] Dev-cpp 4.9.6.4 with last mingw 2.0.0.3 distribution >errors > > >Hi Horst, > >Nope, have not ' using namespace std;' in my code. > >Regards > >h.r...@gm... wrote: > > > >>>Hi all, >>> >>>I´ve tried to use dev-cpp with new mingw 2.0.0.3, I read here some >>>about make name changes, so I rename and copy min...-make.exe in >>>make.exe (tryed with both) , I changed all the directories references, >>>but some looks wrong. Im working in c just not c++. >>> >>>This is the dump compiler / linker results (help linker tell me some >>>about generic error in your source) of course all work well with the >>>distribution from dev-cpp. >>> >>>¿Any ideas? >>> >>>[Linker error] undefined reference to `std::ios_base::Init::Init()' >>>[Linker error] undefined reference to `std::ios_base::Init::~Init()' >>>[Linker error] undefined reference to `__gxx_personality_v0' >>>C:\Dev-Cpp\c\Makefile.win [Build Error] make.exe: *** [Myprog.exe] >>>Error 1 >>> >>>Thanks in advance >>> >>>Roberto >>> >>> >>> >>> >>> >>Hi, >> >>i use mingw 2.0.0.3 too and all works fine. >>You have included: >>using namespace std; >>in your code ? >> >>Horst >> >> >> >> >> > > > > > >------------------------------------------------------- >This sf.net email is sponsored by: >Access Your PC Securely with GoToMyPC. Try Free Now >https://www.gotomypc.com/s/OSND/DD >_______________________________________________ >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 >-------------------------------------------------------------------------------------- >This message and any files transmitted with it are confidential and intended solely >for the use of the individual or entity to whom they are addressed. No confidentiality >or privilege is waived or lost by any wrong transmission. >If you have received this message in error, please immediately destroy it and kindly >notify the sender by reply email. >You must not, directly or indirectly, use, disclose, distribute, print, or copy any >part of this message if you are not the intended recipient. Opinions, conclusions and >other information in this message that do not relate to the official business of >Ydilo Advanced Voice Solutions, S.A. shall be understood as neither given nor endorsed by it. >-------------------------------------------------------------------------------------- > > > |
|
From: Per W. <pw...@ia...> - 2002-10-22 00:32:32
|
Never include standard files as "iostream.h".
For old-time compatibility, you could use <iostream.h>, but preferably you
should go for <iostream> and use namespace std in the program.
The dice.h does contain a number of method implementations. Unless there
is a need to specifically use inline code for the methods, their
implementation should normally be placed in a separated dice.cpp file.
Frog.cpp also have to #include "frog.h". It isn't enough that main.cpp
contains an #include.
I'm assuming that your reference to error while debugging is in fact error
while compiling. No. All versions of Dev-Cpp - and of course all versions
of gcc (MinGW) - does support include files in a meaningful way. Did you
place your include files in a directory where the compiler searches for
them? In this case your own include files - dice.h and frog.h should
normally be placed in the same directory as the source main.cpp.
If MinGW can find the h file, it will point any compile errors in the
correct incldue. If not, your compile error should specify that it can't
locate include file xx.
One little side issue.
You have encapsulated the random number generator within the dice class,
and you specifically calls srand(time % INT_MAX).
An end user of the dice class would probably assume that he may declare
any number of dice objects, and they would each perform in a well-behaved
manner. Not so in this case.
Example. Create one dice, roll and print. Directly create another new
dice, roll and print. There is a very large proability that clock() will
return the same value both times, resulting in the roll of the second dice
returning the same value as the roll of the first dice.
In a well-behaved world, you should make sure that you only initialize the
random number generator once, independent of number of created dices.
One other thing about random numbers.
(rand() % sides) will have a higher probability of returning low numbers
for most combinations of sides. Let's assume that INT_MAX is only 8.
sides=2 divides 8, so no problem.
sides=3 doesn't, so answer may be 1,2,3,1,2,3,1,2 - extra chance of 1,2.
sides=4 divides 8, so no problem.
sides=5 doesn't, so answer may be 1,2,3,4,5,1,2,3 - extra chance of 1,2,3.
sides=6 doesn't, so answer may be 1,2,3,4,5,6,1,2 - extra chance of 1,2.
sides=7 doesn't, so answer may be 1,2,3,4,5,6,7,1 - extra chance of 1.
sides=8 divides 8, so no problem.
Depending on the number span compared to the span supported by rand(),
this skew in output might lead to significant problems. When sides gets
within a factor two of the range of rand(), the lower rolls will get TWICE
the probability of the high rolls...
/Per W
On Mon, 21 Oct 2002, Gregory Hart wrote:
> I'm having a problem with includes. When I include in main.cpp a header file
> that I created, the debugger gets passed main.cpp without any of the header
> files included and this causes errors while debugging, such as undelcared
> functions, so that I cannot compile the program. It also makes it difficult
> to find other errors in my program. I have tried just copying and pasting
> the header file and all other linked files into my code and it compiled
> successfully, but I'm programming for a class and the teacher will not let
> me copy and paste the header file into main.cpp for my final code. I'm using
> version 4.9.6.0. Does anybody know of any way to include these files so that
> I don't have to copy and paste, or does anybody know which version this
> should work in? I've included my four codes below:
>
> /* MAIN.CPP */
> // Make a frog move so many steps.
> // Created By: Gregory Hart
>
> // Includes
> #include "iostream.h"
> #include "frog.h"
>
> // Main function
> int main()
> {
> // Declare variables
> int position = 0, steps = 0, blanks;
> frog myFrog;
>
> // Get number of steps
> cout << "How many steps would you like the frog to travel? ";
> cin >> steps;
>
> // Print out frog
> while (position < steps) {
> blanks = 40 + myFrog.move();
> for (int a=0; a < blanks; ++a)
> cout << " ";
> cout << "*" << endl;
> ++position;
> }
> cout << "The final position is " << (blanks + 1);
>
> // End program
> return 0;
> }
>
> /* FROG.H */
> // Frog class
> // Created By: Gregory Hart
>
> #ifndef _FROG_H
> #define _FROG_H
>
> // Includes
> #include "dice.h"
>
> class frog
> {
> public:
> frog();
> int move();
> int getSteps() const;
> private:
> int mySteps;
> int myPosition;
> dice myDice;
> };
>
> #include "frog.cpp"
>
> #endif
>
> /* DICE.H */
> // Metrowerks and Visual version
>
> #ifndef DICE_H
> #define DICE_H
>
> #include <stdlib.h> // srand() and rand() are inside of stdlib.h
> #include <time.h>
> #include <limits.h>
>
> class dice{
> public:
> dice(int sides); // constructor
> int roll(); // return the random roll
> int numSides(); // returns how many sides on die
> long numRolls(); // returns # times this die has been rolled
> private:
> int mySides;
> long myRollCount;
> };
>
> dice::dice(int sides)
> // postcondition: all private fields initialized
> // randomize() called to set random number generator
> {
> long time = clock();
>
> srand(time % INT_MAX);
> myRollCount = 0;
> mySides = sides;
> }
>
> int dice::roll()
> // postcondition: # of rolls updated, returns random die roll
> {
> myRollCount++;
> return (rand() % mySides) + 1;
> }
>
> int dice::numSides()
> // postcondition: return # of sides of die
> {
> return mySides;
> }
>
> long dice::numRolls()
> // postcondition: return # times die has been rolled
> {
> return myRollCount;
> }
>
> #endif
>
> /* FROG.CPP */
> frog::frog()
> : mySteps(0), myPosition(0), myDice(2)
> {
> // used precondition
> }
>
> int frog::move()
> {
> ++mySteps;
> int n = myDice.roll();
> if (myDice.roll() == 1)
> --myPosition;
> else
> ++myPosition;
> return myPosition;
> }
>
> int frog::getSteps() const
> {
> return mySteps;
> }
>
>
>
>
>
> -------------------------------------------------------
> This sf.net emial is sponsored by: Influence the future
> of Java(TM) technology. Join the Java Community
> Process(SM) (JCP(SM)) program now.
> http://ad.doubleclick.net/clk;4699841;7576298;k?http://www.sun.com/javavote
> _______________________________________________
> 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
>
|