dev-cpp-users Mailing List for Dev-C++ (Page 731)
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: Stein N. <tem...@of...> - 2001-01-19 07:10:37
|
Well, for the exampleprogram that you refered to, it isn't necesary to use a
switch... but anyway, mail me if you need to anyhow.
Here how to do some key-stuff:
#include <stdio.h>
#include <conio.h>
void main(void)
{
int keydown=3D0;
while(keydown !=3D 27) /*While ESC-key is NOT pressed!*/
{
keydown =3D getch(); /*Store the keypress-value*/
printf("%c", keydown); /*Print the key-press-value*/
}
}
----- Original Message -----
From: Frazell Thomas
To: Dev...@Li...
Sent: Wednesday, January 17, 2001 2:18 PM
Subject: [Dev-C++] Switches
I was referred to use this instead of if / else statements I=92m trying to
understand how to use it I have read the article on MSDN I ask can someone
write a small program that will get the variable from the keyboard and a small
action for instance if you enter 1 it says the number 1 detected or Z would
say the letter z detected as when I see this in use I can fully understand how
to use it thanks :O)
-------------
#define stone
|
|
From: Stein N. <tem...@of...> - 2001-01-19 07:09:59
|
Try this; :-)
1)
#include <stdio.h>
#include <conio.h>
#include <time.h>
void get_answer(void)
{
clock_t start, end;
start = clock(); /*Start the timer*/
while(!kbhit()) /*While no one presses a
key*/
{
end = clock(); /*Get the new time*/
if((end-start)/CLK_TCK >= 5) /*Max time for question-answer is
5seconds*/
{
printf("Out of time!"); /*Some
out-of-time-message*/
return; /*Exit the
answer-function*/
}
}
if(getch() == '1') /*If the right answer
should be key 1 pressed*/
printf("YES, that's the right answer!");
else /*If key different
from '1' is pressed*/
printf("NO, that's not it!");
}
2)
#include <dos.h>
void main(void)
{
sound(440); /*Play a sound with frequency 440*/
delay(1000); /*Wait 1 second*/
nosound(); /*Stop playing sound*/
}
Mail if something does'nt work!... hope it does! :)
----- Original Message -----
From: "Ian Weston" <lak...@ho...>
To: <dev...@li...>
Sent: Wednesday, January 17, 2001 10:02 AM
Subject: [Dev-C++] Timing
> hi there, i've got two questions if someone could answer them for me.
>
> does anyone know:
> 1) how to do a function that only gives a limited time for you to
> answer a question?
>
> 2) how to produce a tone through the pc's internal speaker?
>
> it would be much appreciated if anyone could shed some light on this.
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
-------------
#define stone
|
|
From: Stein N. <tem...@of...> - 2001-01-19 07:09:59
|
Try this; :-)
1)
#include <stdio.h>
#include <conio.h>
#include <time.h>
void get_answer(void)
{
clock_t start, end;
start = clock(); /*Start the timer*/
while(!kbhit()) /*While no one presses a
key*/
{
end = clock(); /*Get the new time*/
if((end-start)/CLK_TCK >= 5) /*Max time for question-answer is
5seconds*/
{
printf("Out of time!"); /*Some
out-of-time-message*/
return; /*Exit the
answer-function*/
}
}
if(getch() == '1') /*If the right answer
should be key 1 pressed*/
printf("YES, that's the right answer!");
else /*If key different
from '1' is pressed*/
printf("NO, that's not it!");
}
2)
#include <dos.h>
void main(void)
{
sound(440); /*Play a sound with frequency 440*/
delay(1000); /*Wait 1 second*/
nosound(); /*Stop playing sound*/
}
Mail if something does'nt work!... hope it does! :)
----- Original Message -----
From: "Ian Weston" <lak...@ho...>
To: <dev...@li...>
Sent: Wednesday, January 17, 2001 10:02 AM
Subject: [Dev-C++] Timing
> hi there, i've got two questions if someone could answer them for me.
>
> does anyone know:
> 1) how to do a function that only gives a limited time for you to
> answer a question?
>
> 2) how to produce a tone through the pc's internal speaker?
>
> it would be much appreciated if anyone could shed some light on this.
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
-------------
#define stone
|
|
From: <em...@te...> - 2001-01-19 04:33:04
|
I have been told that it is somehow possible to convert integers to strings using #include <strstream> and #include <string> using std::strstream and std::string But I have not been able to figure out how. Does anyone have any comments, suggestions, or an idea of how to do it? ^^;; |
|
From: Shaddow <Sh...@ti...> - 2001-01-19 01:36:38
|
//- The "proper" syntax for including standard header files in C++ is
sans-
// the .h
#include <cstdlib>
#include <iostream>
#include <ctime> // Needed to seed the random number generator.
//- Function to roll a single die. Call this function once for each die
needed.
int rollDie( void )
{
// use the modulo to determine the value of the die roll.
return ( ::rand( ) % 6 ) + 1;
}
int main(int argc, char *argv[])
{
//- Seed the random number generator so we don't get the same
// result each time.
::srand( ::time( 0 ) );
// Declare and set the die values
int die_1 = rollDie( );
int die_2 = rollDie( );
// Output the die values
cout << "You rolled a " << die_1 + die_2 << endl;
cout << " The first die is: " << die_1;
cout << " The second die is: " << die_2;
return 0;
}
tayo odesanya wrote:
> Intranet Compilers
> Compilation Results
>
> 1 #include <iostream.h>
> 2 #include <stdlib.h>
> 3
> 4 int dice_1;
> 5 int dice_2;
> 6 int roll()
> 7 {
> 8 randomize();
> 9 dice_1 = random(6) + 1;
> 10 dice_2 = random(6) + 1;
> 11 return dice_1;
> 12 return dice_2;
> 13 }
> 14 int die1()
> 15 {
> 16 return dice_1;
> 17 }
> 18 int dice_2()
> 19 {
> 20 return dice_2;
> 21 }
> 22 int main()
> 23 {
> 24 cout<<" the value rolled is : "<<roll()<<endl;
> 25 cout <<" the first die was : "<<die1()<<endl;
> 26 cout<<" the second die was:"<<die2()<<endl;
> 27 return 0;
> 28 }
>
> language: C and C++
> options: Display all warnings
> options: Include math library during linking
>
> prog.cpp: In function `int roll()':
> prog.cpp:8: implicit declaration of function `int
> randomize(...)'
> c:/djgpp/include/stdlib.h:121: too many arguments to
> function `long int random()'
> prog.cpp:9: at this point in file
> c:/djgpp/include/stdlib.h:121: too many arguments to
> function `long int random()'
> prog.cpp:10: at this point in file
> prog.cpp: In function `int dice_2()':
> prog.cpp:5: previous non-function declaration `int
> dice_2'
> prog.cpp:19: conflicts with function declaration
> `int dice_2()'
> prog.cpp: In function `int main()':
> prog.cpp:26: implicit declaration of function `int
> die2(...)'
>
> Errors Found!
>
> You need to correct the errors so that the program
> compiles. The compiler was executed remotely from
> MarketCache1.netcarrier.net/209.140.169.18 on
> Thursday, January 18, 101, 8:51.
>
>
> Send comments to:ole...@ie....
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: ropbert d b. <lon...@ju...> - 2001-01-19 01:03:47
|
Thanks to Ionnis... Here is the completed game. Enjoy!
#include <iostream.h>
#include <stdlib.h>
#include <time.h>
int roll(void); // protypes
int dice_1; // Declared globals
int dice_2;
int roll()
{
// srand(6);
do
{
dice_1 = (rand() + 1); // dev-c++ does not have random function
}while(dice_1 >7);
do
{
dice_2 = (rand() + 1); // that i can find . use bcc55 for this
}while(dice_2 >7);
return dice_1; // anyone else have information on
random??
}
int main()
{
int through = 0, point = 0;;
int lose =0, first = 1, win ;
do
{
win = 0;
roll();
cout<<" the value rolled is : "<<(dice_1+dice_2)<<endl;
cout <<" the first die was : "<<dice_1<<endl; // changed to int
cout<<" the second die was: "<<dice_2<<endl;
if(first == 1) point = (dice_1 + dice_2);
if(dice_1+dice_2 == 11 && first ==1)
{
lose =1;
cout<<endl<<"Sorry You Lose"<<endl;
through = 1;
}
if(dice_1+dice_2 == 7 && first == 0)
{
lose =1;
cout<<endl<<"Sorry You Lose"<<endl;
through = 1;
}
if(first == 0 && (dice_1+dice_2) == point || first == 1 && point ==7)
{
cout<<endl<<"HAY You WIN!!!"<< endl;
first = win = 1;
}
if(win != 1)first = 0;
cout<<"Enter 1 to quit " ;
cin>>through;
}while(through != 1 || lose ==0);
return 0; // screen in console
mode
}
On Thu, 18 Jan 2001 07:02:35 -0800 (PST) tayo odesanya <ta...@ya...>
writes:
> Intranet Compilers
> Compilation Results
>
> 1 #include <iostream.h>
> 2 #include <stdlib.h>
> 3
> 4 int dice_1;
> 5 int dice_2;
> 6 int roll()
> 7 {
> 8 randomize();
> 9 dice_1 = random(6) + 1;
> 10 dice_2 = random(6) + 1;
> 11 return dice_1;
> 12 return dice_2;
> 13 }
> 14 int die1()
> 15 {
> 16 return dice_1;
> 17 }
> 18 int dice_2()
> 19 {
> 20 return dice_2;
> 21 }
> 22 int main()
> 23 {
> 24 cout<<" the value rolled is : "<<roll()<<endl;
> 25 cout <<" the first die was : "<<die1()<<endl;
> 26 cout<<" the second die was:"<<die2()<<endl;
> 27 return 0;
> 28 }
>
> language: C and C++
> options: Display all warnings
> options: Include math library during linking
>
> prog.cpp: In function `int roll()':
> prog.cpp:8: implicit declaration of function `int
> randomize(...)'
> c:/djgpp/include/stdlib.h:121: too many arguments to
> function `long int random()'
> prog.cpp:9: at this point in file
> c:/djgpp/include/stdlib.h:121: too many arguments to
> function `long int random()'
> prog.cpp:10: at this point in file
> prog.cpp: In function `int dice_2()':
> prog.cpp:5: previous non-function declaration `int
> dice_2'
> prog.cpp:19: conflicts with function declaration
> `int dice_2()'
> prog.cpp: In function `int main()':
> prog.cpp:26: implicit declaration of function `int
> die2(...)'
>
> Errors Found!
>
> You need to correct the errors so that the program
> compiles. The compiler was executed remotely from
> MarketCache1.netcarrier.net/209.140.169.18 on
> Thursday, January 18, 101, 8:51.
>
>
>
> Send comments to:ole...@ie....
>
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> yahoo.com/
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: Chris B. <bu...@te...> - 2001-01-18 23:08:21
|
|
From: Matt H. <wm...@ne...> - 2001-01-18 22:44:49
|
My programs compile and link fine but after clicking on run, my Dev-C++ =
screen minimizes, the program shows up, and then returns to Dev-C++ =
screen in a matter of 1/2 of a second. I have tried the FAQ page to no =
avail. I have made sure that "Do not create a console" is UN-checked in =
Project Options. I have even put in a - system ("pause");
Please help if you can find time, thanx!
|
|
From: Ioannis V. <no...@ya...> - 2001-01-18 21:42:57
|
In <stdlib.h> there is rand() and srand(). Ioannis * Ioannis Vranos * Programming pages: http://members.nbci.com/noicys * Alternative URL: http://run.to/noicys > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...]On Behalf Of > tayo odesanya > Sent: Thursday, January 18, 2001 11:36 PM > To: dev...@li... > Subject: Re: [Dev-C++] Please help with program bugs, i tried, no luck. > > > Thanks for helping me out. > I appreciate this. > Tayo. |
|
From: tayo o. <ta...@ya...> - 2001-01-18 21:36:21
|
Thanks for helping me out.
I appreciate this.
Tayo.
--- ropbert d baugh <lon...@ju...> wrote:
> Here is a program which will run. NOTE: Random not
> available in dev-c++
> libray that I can find.
> #include <iostream.h>
> #include <stdlib.h>
> #include <time.h>
>
> int roll(void); // protypes
>
> int dice_1; // Declared globals
> int dice_2;
>
> int roll()
> {
>
> dice_1 = 1;
> dice_2 = 2;
> // dice_1 = (random(6) + 1); // dev-c++
> does not have random
> function
> // dice_2 = (random(6) + 1); // that i can
> find . use bcc55 for
> this
> return dice_1; // anyone else
> have information on
> random??
> // return dice_2; // only one return value
> allowed
> }
> //int die1() // don't need these functions
> because
> //{ // dice declared global
> // return dice_1;
> //}
> //int die2_2()
> //{
> // return dice_2;
> //}
> int main()
> {
> // randomize();
> cout<<" the value rolled is : "<<roll()<<endl;
> cout <<" the first die was : "<<dice_1<<endl;
> // changed to int
> cout<<" the second die was: "<<dice_2<<endl;
> system("pause");
> // added pause so you
> can see
> return 0;
> // screen in console
> mode
>
> }
> On Thu, 18 Jan 2001 07:02:35 -0800 (PST) tayo
> odesanya <ta...@ya...>
> writes:
> > Intranet Compilers
> > Compilation Results
> >
> > 1 #include <iostream.h>
> > 2 #include <stdlib.h>
> > 3
> > 4 int dice_1;
> > 5 int dice_2;
> > 6 int roll()
> > 7 {
> > 8 randomize();
> > 9 dice_1 = random(6) + 1;
> > 10 dice_2 = random(6) + 1;
> > 11 return dice_1;
> > 12 return dice_2;
> > 13 }
> > 14 int die1()
> > 15 {
> > 16 return dice_1;
> > 17 }
> > 18 int dice_2()
> > 19 {
> > 20 return dice_2;
> > 21 }
> > 22 int main()
> > 23 {
> > 24 cout<<" the value rolled is :
> "<<roll()<<endl;
> > 25 cout <<" the first die was :
> "<<die1()<<endl;
> > 26 cout<<" the second die was:"<<die2()<<endl;
> > 27 return 0;
> > 28 }
> >
> > language: C and C++
> > options: Display all warnings
> > options: Include math library during linking
> >
> > prog.cpp: In function `int roll()':
> > prog.cpp:8: implicit declaration of function
> `int
> > randomize(...)'
> > c:/djgpp/include/stdlib.h:121: too many
> arguments to
> > function `long int random()'
> > prog.cpp:9: at this point in file
> > c:/djgpp/include/stdlib.h:121: too many
> arguments to
> > function `long int random()'
> > prog.cpp:10: at this point in file
> > prog.cpp: In function `int dice_2()':
> > prog.cpp:5: previous non-function declaration
> `int
> > dice_2'
> > prog.cpp:19: conflicts with function declaration
> > `int dice_2()'
> > prog.cpp: In function `int main()':
> > prog.cpp:26: implicit declaration of function
> `int
> > die2(...)'
> >
> > Errors Found!
> >
> > You need to correct the errors so that the
> program
> > compiles. The compiler was executed remotely from
> > MarketCache1.netcarrier.net/209.140.169.18 on
> > Thursday, January 18, 101, 8:51.
> >
> >
> >
> > Send comments to:ole...@ie....
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Get email at your own domain with Yahoo! Mail.
> > yahoo.com/
> >
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> >
>
http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
>
http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
|
|
From: ropbert d b. <lon...@ju...> - 2001-01-18 19:49:11
|
Here is a program which will run. NOTE: Random not available in dev-c++
libray that I can find.
#include <iostream.h>
#include <stdlib.h>
#include <time.h>
int roll(void); // protypes
int dice_1; // Declared globals
int dice_2;
int roll()
{
dice_1 = 1;
dice_2 = 2;
// dice_1 = (random(6) + 1); // dev-c++ does not have random
function
// dice_2 = (random(6) + 1); // that i can find . use bcc55 for
this
return dice_1; // anyone else have information on
random??
// return dice_2; // only one return value allowed
}
//int die1() // don't need these functions because
//{ // dice declared global
// return dice_1;
//}
//int die2_2()
//{
// return dice_2;
//}
int main()
{
// randomize();
cout<<" the value rolled is : "<<roll()<<endl;
cout <<" the first die was : "<<dice_1<<endl; // changed to int
cout<<" the second die was: "<<dice_2<<endl;
system("pause"); // added pause so you
can see
return 0; // screen in console
mode
}
On Thu, 18 Jan 2001 07:02:35 -0800 (PST) tayo odesanya <ta...@ya...>
writes:
> Intranet Compilers
> Compilation Results
>
> 1 #include <iostream.h>
> 2 #include <stdlib.h>
> 3
> 4 int dice_1;
> 5 int dice_2;
> 6 int roll()
> 7 {
> 8 randomize();
> 9 dice_1 = random(6) + 1;
> 10 dice_2 = random(6) + 1;
> 11 return dice_1;
> 12 return dice_2;
> 13 }
> 14 int die1()
> 15 {
> 16 return dice_1;
> 17 }
> 18 int dice_2()
> 19 {
> 20 return dice_2;
> 21 }
> 22 int main()
> 23 {
> 24 cout<<" the value rolled is : "<<roll()<<endl;
> 25 cout <<" the first die was : "<<die1()<<endl;
> 26 cout<<" the second die was:"<<die2()<<endl;
> 27 return 0;
> 28 }
>
> language: C and C++
> options: Display all warnings
> options: Include math library during linking
>
> prog.cpp: In function `int roll()':
> prog.cpp:8: implicit declaration of function `int
> randomize(...)'
> c:/djgpp/include/stdlib.h:121: too many arguments to
> function `long int random()'
> prog.cpp:9: at this point in file
> c:/djgpp/include/stdlib.h:121: too many arguments to
> function `long int random()'
> prog.cpp:10: at this point in file
> prog.cpp: In function `int dice_2()':
> prog.cpp:5: previous non-function declaration `int
> dice_2'
> prog.cpp:19: conflicts with function declaration
> `int dice_2()'
> prog.cpp: In function `int main()':
> prog.cpp:26: implicit declaration of function `int
> die2(...)'
>
> Errors Found!
>
> You need to correct the errors so that the program
> compiles. The compiler was executed remotely from
> MarketCache1.netcarrier.net/209.140.169.18 on
> Thursday, January 18, 101, 8:51.
>
>
>
> Send comments to:ole...@ie....
>
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> yahoo.com/
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: ropbert d b. <lon...@ju...> - 2001-01-18 19:49:11
|
Here is a better program. Still have no idea why random not in dev-c++
lib. Anybody got any clue??
#include <iostream.h>
#include <stdlib.h>
#include <time.h>
int roll(void); // protypes
int dice_1; // Declared globals
int dice_2;
int roll()
{
dice_1 = (random(6) + 1); // dev-c++ does not have random
function
dice_2 = (random(6) + 1); // that i can find . use bcc55 for
this
return dice_1; // anyone else have information on
random??
}
int main()
{
int through = 0;
randomize();
do
{
roll();
cout<<" the value rolled is : "<<(dice_1+dice_2)<<endl;
cout <<" the first die was : "<<dice_1<<endl; // changed to int
cout<<" the second die was: "<<dice_2<<endl;
cout<<"Enter 1 to quit " ;
cin>>through;
// system("pause"); // not needed now
}while(through != 1);
return 0; // screen in console
mode
}
On Thu, 18 Jan 2001 07:02:35 -0800 (PST) tayo odesanya <ta...@ya...>
writes:
> Intranet Compilers
> Compilation Results
>
> 1 #include <iostream.h>
> 2 #include <stdlib.h>
> 3
> 4 int dice_1;
> 5 int dice_2;
> 6 int roll()
> 7 {
> 8 randomize();
> 9 dice_1 = random(6) + 1;
> 10 dice_2 = random(6) + 1;
> 11 return dice_1;
> 12 return dice_2;
> 13 }
> 14 int die1()
> 15 {
> 16 return dice_1;
> 17 }
> 18 int dice_2()
> 19 {
> 20 return dice_2;
> 21 }
> 22 int main()
> 23 {
> 24 cout<<" the value rolled is : "<<roll()<<endl;
> 25 cout <<" the first die was : "<<die1()<<endl;
> 26 cout<<" the second die was:"<<die2()<<endl;
> 27 return 0;
> 28 }
>
> language: C and C++
> options: Display all warnings
> options: Include math library during linking
>
> prog.cpp: In function `int roll()':
> prog.cpp:8: implicit declaration of function `int
> randomize(...)'
> c:/djgpp/include/stdlib.h:121: too many arguments to
> function `long int random()'
> prog.cpp:9: at this point in file
> c:/djgpp/include/stdlib.h:121: too many arguments to
> function `long int random()'
> prog.cpp:10: at this point in file
> prog.cpp: In function `int dice_2()':
> prog.cpp:5: previous non-function declaration `int
> dice_2'
> prog.cpp:19: conflicts with function declaration
> `int dice_2()'
> prog.cpp: In function `int main()':
> prog.cpp:26: implicit declaration of function `int
> die2(...)'
>
> Errors Found!
>
> You need to correct the errors so that the program
> compiles. The compiler was executed remotely from
> MarketCache1.netcarrier.net/209.140.169.18 on
> Thursday, January 18, 101, 8:51.
>
>
>
> Send comments to:ole...@ie....
>
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> yahoo.com/
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: tayo o. <ta...@ya...> - 2001-01-18 15:02:34
|
Intranet Compilers
Compilation Results
1 #include <iostream.h>
2 #include <stdlib.h>
3
4 int dice_1;
5 int dice_2;
6 int roll()
7 {
8 randomize();
9 dice_1 = random(6) + 1;
10 dice_2 = random(6) + 1;
11 return dice_1;
12 return dice_2;
13 }
14 int die1()
15 {
16 return dice_1;
17 }
18 int dice_2()
19 {
20 return dice_2;
21 }
22 int main()
23 {
24 cout<<" the value rolled is : "<<roll()<<endl;
25 cout <<" the first die was : "<<die1()<<endl;
26 cout<<" the second die was:"<<die2()<<endl;
27 return 0;
28 }
language: C and C++
options: Display all warnings
options: Include math library during linking
prog.cpp: In function `int roll()':
prog.cpp:8: implicit declaration of function `int
randomize(...)'
c:/djgpp/include/stdlib.h:121: too many arguments to
function `long int random()'
prog.cpp:9: at this point in file
c:/djgpp/include/stdlib.h:121: too many arguments to
function `long int random()'
prog.cpp:10: at this point in file
prog.cpp: In function `int dice_2()':
prog.cpp:5: previous non-function declaration `int
dice_2'
prog.cpp:19: conflicts with function declaration
`int dice_2()'
prog.cpp: In function `int main()':
prog.cpp:26: implicit declaration of function `int
die2(...)'
Errors Found!
You need to correct the errors so that the program
compiles. The compiler was executed remotely from
MarketCache1.netcarrier.net/209.140.169.18 on
Thursday, January 18, 101, 8:51.
Send comments to:ole...@ie....
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
|
|
From: Ioannis V. <no...@ya...> - 2001-01-18 12:26:01
|
I do not know about control devices or PLCs but i know that C/C++ are the ideal general programming languages used for programming the biggest mainframes to the smallest embedded devices. If you want to choose between C & C++ i suggest you learn C++ and begin learning directly C++ and not C first (as i unfortunately did). Also take a look at: http://www.research.att.com/~bs/esc99.html , at http://www.research.att.com/~bs/ and make a search on the web for the data you are looking for. Best regards, Ioannis > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...]On Behalf Of > Richard P. Evans > Sent: Thursday, January 18, 2001 2:22 AM > To: dev...@li... > Subject: [Dev-C++] Personal help question involving C/C++ and engineering. > > > This is an open question to all members concerning C/C++ program > applications. I hope you will freely offer your advice. > > I am an engineer who, for the first time in his life, is suddenly > unemployed. All the job ads include working knowledge of C/C++ and/or > Visual Basic in addition to all the other prerequisites, such as MMI > programming and PLC programming. I have years of experience in > the latter > but no working experience in C/C++ or Visual Basic. I did take a formal > course at the local community college in beginning C/C++ about > three years > ago because I forsaw the future need. Non of my past positions have > required its use so I have no working experience. I also have no idea of > how it is being used in engineering applications for machine control. I > have worked in Instrumentation and Controls and also worked on > the edge of > Robotic applications. The robotics always involved interfacing to the > system through the PLC I was using for the other controls that > made up the > application. My questions are as follows: > > 1. What is a typical control application where a C/C++ > program would be used? > 2. Could you give me an example of such a problem? > 3. Could you give me an example of how such problem was > solved using a C/C++ > program? > 4. I'm assuming that a card is used to affect a real world > interface to a > computer and > the program interfaces the computer to the card or some other > peripheral equipment? > 5. It's a lot to ask, but I need to know how to direct my > programming and > learning efforts > to directly address my lack of real experience. > > I hope some one will take the time and patience to give me some direction > in my efforts. I know you have been generous with your help in my > programming efforts in the past and the help has been right on the > money. Thank you. > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
|
From: Frazell T. <fr...@fl...> - 2001-01-18 10:05:30
|
Would you be able to give me an example I guess I'm leaving beginner
territory :O)
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...]On Behalf Of Jared
Eckersley
Sent: Thursday, January 18, 2001 4:43 AM
To: dev...@li...
Subject: RE: [Dev-C++] Switches
you would use a cin or cin.get statement
At 10:40 PM 1/17/2001 -0500, you wrote:
>How do get it to read keyboard responses etc.
>
>-----Original Message-----
>From: dev...@li...
>[mailto:dev...@li...]On Behalf Of Jared
>Eckersley
>Sent: Wednesday, January 17, 2001 7:05 PM
>To: dev...@li...
>Subject: Re: [Dev-C++] Switches
>
>Here is a little snip for you,
>switch (myvar) {
> case 1:
> cout << "Number 1 detected" << endl;
> break;
> case 2:
> cout << "Number 2 detected" << endl;
> break;
> case 3:
> cout << "Number 3 detected" << endl;
> break;
> default:
> cout << "Anything but 1, 2, or 3 was detected" << endl;
> }
>
>Hope that helps you understand switches a little more.
>
>
>At 05:18 PM 1/17/2001 -0500, you wrote:
>
> >I was referred to use this instead of if / else statements I m trying
to
> >understand how to use it I have read the article on MSDN I ask can
someone
> >write a small program that will get the variable from the keyboard
and a
> >small action for instance if you enter 1 it says the number 1
detected or
> >Z would say the letter z detected as when I see this in use I can
fully
> >understand how to use it thanks :O)
>
>
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: Frazell T. <fr...@fl...> - 2001-01-18 09:58:21
|
MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAaCAJIAEggllQ29u dGVudC1UeXBlOiB0ZXh0L3BsYWluOw0KCWNoYXJzZXQ9InVzLWFzY2lpIg0KQ29udGVudC1UcmFu c2Zlci1FbmNvZGluZzogN2JpdA0KDQpXb3VsZCB5b3UgYmUgYWJsZSB0byBnaXZlIG1lIGFuIGV4 YW1wbGUgSSBndWVzcyBJJ20gbGVhdmluZyBiZWdpbm5lcg0KdGVycml0b3J5IDpPKQ0KDQotLS0t LU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KRnJvbTogZGV2LWNwcC11c2Vycy1hZG1pbkBsaXN0cy5z b3VyY2Vmb3JnZS5uZXQNClttYWlsdG86ZGV2LWNwcC11c2Vycy1hZG1pbkBsaXN0cy5zb3VyY2Vm b3JnZS5uZXRdT24gQmVoYWxmIE9mIEphcmVkDQpFY2tlcnNsZXkNClNlbnQ6IFRodXJzZGF5LCBK YW51YXJ5IDE4LCAyMDAxIDQ6NDMgQU0NClRvOiBkZXYtY3BwLXVzZXJzQGxpc3RzLnNvdXJjZWZv cmdlLm5ldA0KU3ViamVjdDogUkU6IFtEZXYtQysrXSBTd2l0Y2hlcw0KDQp5b3Ugd291bGQgdXNl IGEgY2luIG9yIGNpbi5nZXQgc3RhdGVtZW50DQoNCkF0IDEwOjQwIFBNIDEvMTcvMjAwMSAtMDUw MCwgeW91IHdyb3RlOg0KPkhvdyBkbyBnZXQgaXQgdG8gcmVhZCBrZXlib2FyZCByZXNwb25zZXMg ZXRjLg0KPg0KPi0tLS0tT3JpZ2luYWwgTWVzc2F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TP1ZlcmlTaWduIENsYXNzIDEg Q0EgSW5kaXZpZHVhbCBTdWJzY3JpYmVyLVBlcnNvbmEgTm90IFZhbGlkYXRlZAIQI2uRjBjzPl4L O1kSL0PsujAJBgUrDgMCGgUAoIIByjAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3 DQEJBTEPFw0wMTAxMTgwOTU4MTZaMCMGCSqGSIb3DQEJBDEWBBRznqGXeOylwKvkOsqTyHkXPG7V EjB2BgkqhkiG9w0BCQ8xaTBnMAoGCCqGSIb3DQMHMA4GCCqGSIb3DQMCAgIAgDAHBgUrDgMCBzAH BgUrDgMCBzANBggqhkiG9w0DAgIBKDAHBgUrDgMCGjAHBgUrDgMCGjAKBggqhkiG9w0CBTAKBggq hkiG9w0CBTCB8gYJKwYBBAGCNxAEMYHkMIHhMIHMMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEf MB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazFGMEQGA1UECxM9d3d3LnZlcmlzaWduLmNv bS9yZXBvc2l0b3J5L1JQQSBJbmNvcnAuIEJ5IFJlZi4sTElBQi5MVEQoYyk5ODFIMEYGA1UEAxM/ VmVyaVNpZ24gQ2xhc3MgMSBDQSBJbmRpdmlkdWFsIFN1YnNjcmliZXItUGVyc29uYSBOb3QgVmFs aWRhdGVkAhAja5GMGPM+Xgs7WRIvQ+y6MA0GCSqGSIb3DQEBAQUABEBgXyTFRRZm4TCasUz6wm9v vUlfsJc/JiyIbRAQRaaE4YISPBVS/L8Xe+gGrXUs6ID/lVdZv1WxEjgFAk5mwsfDAAAAAAAA |
|
From: Jared E. <ja...@vo...> - 2001-01-18 09:45:55
|
you would use a cin or cin.get statement
At 10:40 PM 1/17/2001 -0500, you wrote:
>How do get it to read keyboard responses etc.
>
>-----Original Message-----
>From: dev...@li...
>[mailto:dev...@li...]On Behalf Of Jared
>Eckersley
>Sent: Wednesday, January 17, 2001 7:05 PM
>To: dev...@li...
>Subject: Re: [Dev-C++] Switches
>
>Here is a little snip for you,
>switch (myvar) {
> case 1:
> cout << "Number 1 detected" << endl;
> break;
> case 2:
> cout << "Number 2 detected" << endl;
> break;
> case 3:
> cout << "Number 3 detected" << endl;
> break;
> default:
> cout << "Anything but 1, 2, or 3 was detected" << endl;
> }
>
>Hope that helps you understand switches a little more.
>
>
>At 05:18 PM 1/17/2001 -0500, you wrote:
>
> >I was referred to use this instead of if / else statements I m trying to
> >understand how to use it I have read the article on MSDN I ask can someone
> >write a small program that will get the variable from the keyboard and a
> >small action for instance if you enter 1 it says the number 1 detected or
> >Z would say the letter z detected as when I see this in use I can fully
> >understand how to use it thanks :O)
>
>
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: Jared E. <ja...@vo...> - 2001-01-18 09:44:40
|
Your best bet is to start with a "Hello World" Program. Learn to crawl first. At 03:07 AM 1/18/2001 +0000, you wrote: >yea...that's why i wanted to know how to start this program off and >stuff...thanks >>From: Jared Eckersley <ja...@vo...> >>Reply-To: dev...@li... >>To: dev...@li... >>Subject: Re: [Dev-C++] help with program... >>Date: Wed, 17 Jan 2001 13:53:56 -1000 >> >>Are you new to C++ ? >> >>At 04:55 PM 1/17/2001 +0000, you wrote: >>>I have recently purchased a c++ book...and it asked to do the following >>>program: >>>A perfect number is a positive integer such that the sum of the proper >>>divisors equals to the number. Thus, 28=1+2+4+7+14 is a perfect number. If >>>the sum of the divisors is less than the number, it is deficient. If the >>>sum exceeds the number, it's abundant. >>>a) Write an interactive program that allows the user to enter a positive >>>integer and then displays the result, indicating whether the number >>>entered is perfect, deficient, or abundant. >>>b) Wrtie another interactive program that allows the user to enter a >>>positive integer N and then displays all perfect numbers less than or >>>equal to N. >>>*Program should allows the user the option of continuing or quitting* >>> >>>Any help would be appreciated...thanks! >>>_________________________________________________________________ >>>Get your FREE download of MSN Explorer at http://explorer.msn.com >>> >>> >>>_______________________________________________ >>>Dev-cpp-users mailing list >>>Dev...@li... >>>http://lists.sourceforge.net/lists/listinfo/dev-cpp-users >> >> >>_______________________________________________ >>Dev-cpp-users mailing list >>Dev...@li... >>http://lists.sourceforge.net/lists/listinfo/dev-cpp-users > >_________________________________________________________________ >Get your FREE download of MSN Explorer at http://explorer.msn.com > > >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >http://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Frazell T. <fr...@fl...> - 2001-01-18 03:49:36
|
How do get it to read keyboard responses etc.
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...]On Behalf Of Jared
Eckersley
Sent: Wednesday, January 17, 2001 7:05 PM
To: dev...@li...
Subject: Re: [Dev-C++] Switches
Here is a little snip for you,
switch (myvar) {
case 1:
cout << "Number 1 detected" << endl;
break;
case 2:
cout << "Number 2 detected" << endl;
break;
case 3:
cout << "Number 3 detected" << endl;
break;
default:
cout << "Anything but 1, 2, or 3 was detected" << endl;
}
Hope that helps you understand switches a little more.
At 05:18 PM 1/17/2001 -0500, you wrote:
>I was referred to use this instead of if / else statements I m trying to
>understand how to use it I have read the article on MSDN I ask can someone
>write a small program that will get the variable from the keyboard and a
>small action for instance if you enter 1 it says the number 1 detected or
>Z would say the letter z detected as when I see this in use I can fully
>understand how to use it thanks :O)
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: Roosevelt B. <ult...@ho...> - 2001-01-18 03:07:36
|
yea...that's why i wanted to know how to start this program off and stuff...thanks >From: Jared Eckersley <ja...@vo...> >Reply-To: dev...@li... >To: dev...@li... >Subject: Re: [Dev-C++] help with program... >Date: Wed, 17 Jan 2001 13:53:56 -1000 > >Are you new to C++ ? > >At 04:55 PM 1/17/2001 +0000, you wrote: >>I have recently purchased a c++ book...and it asked to do the following >>program: >>A perfect number is a positive integer such that the sum of the proper >>divisors equals to the number. Thus, 28=1+2+4+7+14 is a perfect number. If >>the sum of the divisors is less than the number, it is deficient. If the >>sum exceeds the number, it's abundant. >>a) Write an interactive program that allows the user to enter a positive >>integer and then displays the result, indicating whether the number >>entered is perfect, deficient, or abundant. >>b) Wrtie another interactive program that allows the user to enter a >>positive integer N and then displays all perfect numbers less than or >>equal to N. >>*Program should allows the user the option of continuing or quitting* >> >>Any help would be appreciated...thanks! >>_________________________________________________________________ >>Get your FREE download of MSN Explorer at http://explorer.msn.com >> >> >>_______________________________________________ >>Dev-cpp-users mailing list >>Dev...@li... >>http://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >http://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com |
|
From: Garling G B. I. <tim...@mi...> - 2001-01-18 03:04:42
|
Thanks for the info ----- Original Message ----- From: "Ramana Kumar" <ra...@my...> To: <dev...@li...> Sent: Tuesday, January 16, 2001 8:28 PM Subject: RE: [Dev-C++] RE: Regarding weird characters - for Garland > I have the book, this n with a ~ above it is a typo, it doesn't mean > anything (in the context of the exercise). > > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...]On Behalf Of timeridder > Sent: Wednesday, January 17, 2001 5:54 AM > To: ala...@3n...; dev...@li... > Subject: [Dev-C++] RE: Regarding weird characters - for Garland > > The code is from the book C++ in 21 Days by Sams Pg. 86 Ex. 2 > > ---- Original Message ---- > From: ala...@3n... > To: dev...@li..., > Subject: RE: Regarding weird characters - for Garland > Date: Tue, 16 Jan 2001 07:55:21 -0500 > > >Garland, > > Did you get this code off this list or off some > >other email? > >Could it be that the extra junk is really a result of somebody > >sending you > >an email in HTML format? I`ve seen that in some emails on this > >list, esp. > >with the "3D." > > > >Alan > > > >From: "Garling G Beard III" <tim...@mi...> > >Date: Mon, 15 Jan 2001 15:55:47 -0600 > >Subject: [Dev-C++] C++ > > > >I came across a piece of code that looks funny, it has a n with ~ > >above = > >it. Ex. c = (anc) with ~ above the n. What does it mean, and how > >do = > >you put the ~ above the n. > > > > > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: blalock <wi...@ea...> - 2001-01-18 02:38:42
|
would this book be part of say............. a college text? |
|
From: Richard P. E. <ev...@ma...> - 2001-01-18 00:21:21
|
This is an open question to all members concerning C/C++ program applications. I hope you will freely offer your advice. I am an engineer who, for the first time in his life, is suddenly unemployed. All the job ads include working knowledge of C/C++ and/or Visual Basic in addition to all the other prerequisites, such as MMI programming and PLC programming. I have years of experience in the latter but no working experience in C/C++ or Visual Basic. I did take a formal course at the local community college in beginning C/C++ about three years ago because I forsaw the future need. Non of my past positions have required its use so I have no working experience. I also have no idea of how it is being used in engineering applications for machine control. I have worked in Instrumentation and Controls and also worked on the edge of Robotic applications. The robotics always involved interfacing to the system through the PLC I was using for the other controls that made up the application. My questions are as follows: 1. What is a typical control application where a C/C++ program would be used? 2. Could you give me an example of such a problem? 3. Could you give me an example of how such problem was solved using a C/C++ program? 4. I'm assuming that a card is used to affect a real world interface to a computer and the program interfaces the computer to the card or some other peripheral equipment? 5. It's a lot to ask, but I need to know how to direct my programming and learning efforts to directly address my lack of real experience. I hope some one will take the time and patience to give me some direction in my efforts. I know you have been generous with your help in my programming efforts in the past and the help has been right on the money. Thank you. |
|
From: Jared E. <ja...@vo...> - 2001-01-18 00:09:43
|
Here is a little snip for you,
switch (myvar) {
case 1:
cout << "Number 1 detected" << endl;
break;
case 2:
cout << "Number 2 detected" << endl;
break;
case 3:
cout << "Number 3 detected" << endl;
break;
default:
cout << "Anything but 1, 2, or 3 was detected" << endl;
}
Hope that helps you understand switches a little more.
At 05:18 PM 1/17/2001 -0500, you wrote:
>I was referred to use this instead of if / else statements I m trying to
>understand how to use it I have read the article on MSDN I ask can someone
>write a small program that will get the variable from the keyboard and a
>small action for instance if you enter 1 it says the number 1 detected or
>Z would say the letter z detected as when I see this in use I can fully
>understand how to use it thanks :O)
|
|
From: Jared E. <ja...@vo...> - 2001-01-17 23:56:56
|
Are you new to C++ ? At 04:55 PM 1/17/2001 +0000, you wrote: >I have recently purchased a c++ book...and it asked to do the following >program: >A perfect number is a positive integer such that the sum of the proper >divisors equals to the number. Thus, 28=1+2+4+7+14 is a perfect number. If >the sum of the divisors is less than the number, it is deficient. If the >sum exceeds the number, it's abundant. >a) Write an interactive program that allows the user to enter a positive >integer and then displays the result, indicating whether the number >entered is perfect, deficient, or abundant. >b) Wrtie another interactive program that allows the user to enter a >positive integer N and then displays all perfect numbers less than or >equal to N. >*Program should allows the user the option of continuing or quitting* > >Any help would be appreciated...thanks! >_________________________________________________________________ >Get your FREE download of MSN Explorer at http://explorer.msn.com > > >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >http://lists.sourceforge.net/lists/listinfo/dev-cpp-users |