dev-cpp-users Mailing List for Dev-C++ (Page 749)
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: Jay S. <mys...@op...> - 2000-12-12 10:11:53
|
Where can I get graphics.h? The only ones I found from surfing were =
custom-made ones that didn't have those functions. -.-
mystojay
----- Original Message -----=20
From: prakyath pai=20
To: dev...@li...=20
Sent: Tuesday, December 12, 2000 3:01 AM
Subject: Re: [Dev-C++] background color
to change the background color,you have the function
bkgroundcolor() defined in graphics.h
for eg
#include<graphics>
main()
{
int gd=3DDETECT,gm;
initgraph(&gd,&gm,"");
/*initialises graphics system*/
bkgroundcolor(15);
textcolor(6);
cout<<"Life is beautiful";
getch()
closegraph();
}
--- Bruce Young <y2...@ho...> wrote:=20
<HR>
<html><DIV>
<P><BR>how do i change the background color of the
console... say - white.</P></DIV><br
clear=3Dall><hr>Get more from the Web. FREE MSN
Explorer download : <a
=
href=3D"http://explorer.msn.com">http://explorer.msn.com</a><br></p></htm=
l>
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users
__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users
|
|
From: <pra...@ya...> - 2000-12-12 08:00:10
|
to change the background color,you have the function
bkgroundcolor() defined in graphics.h
for eg
#include<graphics>
main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"");
/*initialises graphics system*/
bkgroundcolor(15);
textcolor(6);
cout<<"Life is beautiful";
getch()
closegraph();
}
--- Bruce Young <y2...@ho...> wrote:
<HR>
<html><DIV>
<P><BR>how do i change the background color of the
console... say - white.</P></DIV><br
clear=all><hr>Get more from the Web. FREE MSN
Explorer download : <a
href="http://explorer.msn.com">http://explorer.msn.com</a><br></p></html>
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users
__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/
|
|
From: Nick <en...@ho...> - 2000-12-12 07:48:37
|
Hello,
> In fact the following stuff can be used in C++ only.
>
> char s1[20], s2[20];
> ...
>
> if(s1==s2)
> ...
>
> The overloaded string operator == accepts 2 strings (objects) and the
> C-style strings are "upgraded" to temporary strings so as the
> comparison to work.
You can use == as long as one of the arguments is a (C++) string
object. In your example above, it does not use the string operator.
#include <iostream>
#include <cstring>
#include <string>
using namespace std;
int main(){
char temp1[20], temp2[20];
string temp3;
strcpy(temp1,"John");
strcpy(temp2,"John");
temp3 = "John";
if (temp1 == temp2) cout << "temp1 == temp2" << endl;
else cout << "temp1 != temp2" << endl;
if (temp3 == temp1) cout << "temp3 == temp1" << endl;
else cout << "temp3 != temp1" << endl;
if (temp2 == temp3) cout << "temp2 == temp3" << endl;
else cout << "temp2 != temp3" << endl;
system("pause");
return(0);
}
> But the better is string s1, s2; to be used instead (including the
> <string>).
Agreed.
--
regards,
Nick
|
|
From: zhusain <zh...@bo...> - 2000-12-12 06:19:27
|
I am new to the CPP.I have downloaded devcpp4 on my hard disk.I am not = able to operate the programme.Are there any special requirements for = installing and initialising the programme? Please some body help me. Thanks - Husain |
|
From: Ioannis V. <no...@ya...> - 2000-12-12 03:34:01
|
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...]On Behalf Of
> prakyath pai
> Sent: Monday, December 11, 2000 11:47 AM
> To: dev...@li...
> Subject: RE: [Dev-C++] I am new to C ++ and need some help
>
>
> hey u used the wrong logic!
> you cannot use the statement
> if(char c=='bruce')
> {cout<<"Thankk You";
> you will have to use the following commands:-
>
> #include<string>
> char c[25];
> cout<<"enter your name";
> if(strcmp(c,"bruce")==0)
> cout<<"Thank You";
> else
> cout<<"You are not granted access";
> exit(0);
> }
In fact the following stuff can be used in C++ only.
char s1[20], s2[20];
...
if(s1==s2)
...
The overloaded string operator == accepts 2 strings (objects) and the
C-style strings are "upgraded" to temporary strings so as the comparison to
work.
But the better is string s1, s2; to be used instead (including the
<string>).
Ioannis
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
|
|
From: Bruce Y. <y2...@ho...> - 2000-12-12 03:20:16
|
<html><DIV> <P><BR>how do i change the background color of the console... say - white.</P></DIV><br clear=all><hr>Get more from the Web. FREE MSN Explorer download : <a href="http://explorer.msn.com">http://explorer.msn.com</a><br></p></html> |
|
From: <ma...@ju...> - 2000-12-12 02:37:18
|
Hi I know it's a newbie question, but one that bears asking. I'm not averse to learning old C or Perl but since I have the skills now, why not? Thanks everyone ________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/tagj. |
|
From: Jay S. <mys...@op...> - 2000-12-12 01:48:19
|
syntax
--------
do{
cout<<"Enter two positive integers. ";
cin>>x>>y;
}while(x<=3D0||y<=3D0);
--------
If I enter a char while using that, (x and y declared as ints), it gives =
me an endless loop. How would I do safeguard against a user entering an =
char? -.-
mystojay
|
|
From: Vesa N. <wa...@dl...> - 2000-12-11 20:02:35
|
> > The correct method is to use the standard C function strcmpi (string > > compare, case insensitive) > strcmp() which is declared in string.h strcmp is case sensitive which probably isn't what one wants for this application -Vesa |
|
From: Kuriyama H. <hs...@ho...> - 2000-12-11 19:25:13
|
Well, there is a textcolor() function in <conio.c>
#include <iostream>
#include <conio.c>
using namespace std;
int main(){
textcolor(10); //Lightgreen
cout << "Text displayed as lightgreen.";
return(0);
}
Hsutaro
>From: JESSE SALAS <sec...@ya...>
>Reply-To: dev...@li...
>To: dev...@li...
>Subject: [Dev-C++] text color in a console
>Date: Sun, 10 Dec 2000 18:40:09 -0800 (PST)
>Hello. I am kinda new to C++ and i was wondering how
>to change the text color and/or font in a console. can
>some one send me the source. Thanks
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Shopping - Thousands of Stores. Millions of Products.
>http://shopping.yahoo.com/
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users
_____________________________________________________________________________________
Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com
|
|
From: Chad S. <ho...@ho...> - 2000-12-11 17:14:11
|
>From: "Chad Simmons" <ho...@ho...>
>Reply-To: dev...@li...
>To: dev...@li...
>Subject: RE: [Dev-C++] I am new to C ++ and need some help
>Date: Mon, 11 Dec 2000 08:37:06 -0800
> else
> cout << "Your name isn't John, go away. << endl;
The above should read
else
cout << "Your name isn't John, go away." << endl;
_____________________________________________________________________________________
Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com
|
|
From: Chad S. <ho...@ho...> - 2000-12-11 16:37:11
|
>From: prakyath pai <pra...@ya...>
>Reply-To: dev...@li...
>To: dev...@li...
>Subject: RE: [Dev-C++] I am new to C ++ and need some help
>Date: Mon, 11 Dec 2000 01:47:06 -0800 (PST)
>
>hey u used the wrong logic!
>you cannot use the statement
>if(char c=='bruce')
>{cout<<"Thankk You";
>you will have to use the following commands:-
>
>#include<string>
>char c[25];
>cout<<"enter your name";
>if(strcmp(c,"bruce")==0)
>cout<<"Thank You";
>else
>cout<<"You are not granted access";
>exit(0);
>}
If you bothered to look at the post, you'd see that he didn't use a char in
the comparison. Nor did he use a C style string (char *). He instead used a
C++ string class, which does support the == operator to another string for
evaluation.
So to finally kill this thread...
If you are programming in C you'd use:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{
char Name[5];
puts("What is your name??");
fgets(Name, 5, stdin);
if(!strcmp(Name, "John") || !strcmp(Name, "john")
|| !strcmp(Name, "JOHN"))
{
puts("Hello John.");
}
else
puts("Your name isn't John, go away.");
return 0;
}
If you are using C++ use:
int main()
{
string Name;
cout << "What is your name??" << endl;
cin >> Name;
if((Name == "John") || (Name == "JOHN") || (Name == "john"))
{
cout << "Hello John" << endl;
}
else
cout << "Your name isn't John, go away. << endl;
return 0;
}
Chad Simmons
_____________________________________________________________________________________
Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com
|
|
From: <pra...@ya...> - 2000-12-11 09:50:28
|
hey u used the wrong logic!
you cannot use the statement
if(char c=='bruce')
{cout<<"Thankk You";
you will have to use the following commands:-
#include<string>
char c[25];
cout<<"enter your name";
if(strcmp(c,"bruce")==0)
cout<<"Thank You";
else
cout<<"You are not granted access";
exit(0);
}
--- Bruce Young <y2...@ho...> wrote:
<HR>
<html><DIV>
<P>be sure to include the: #include
<string></P>
<P><BR>#include <iostream.h><BR>#include
<stdlib.h><BR>#include <string></P>
<P>int main()<BR>{<BR> string
name;</P>
<P> do<BR> { cout <<
"\nPlease enter your name:
";<BR> cin >>
name;</P>
<P> cout <<
"\nName = " << name << endl;</P>
<P> if (name == "John"
|| name ==
"john")<BR>
cout << "\nThank
you!!\n";<BR>
else<BR>
cout << "\nNo. Try again";</P>
<P> }<BR> while(name != "John" ||
name != "john");</P>
<P> </P>
<P>
system("PAUSE");<BR>
return 0;<BR>}</P></DIV><br clear=all><hr>Get more
from the Web. FREE MSN Explorer download : <a
href="http://explorer.msn.com">http://explorer.msn.com</a><br></p></html>
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users
__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/
|
|
From: JESSE S. <sec...@ya...> - 2000-12-11 02:40:15
|
Hello. I am kinda new to C++ and i was wondering how to change the text color and/or font in a console. can some one send me the source. Thanks __________________________________________________ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.com/ |
|
From: <ma...@ju...> - 2000-12-11 02:12:08
|
Hi I love this software except for one thing...when I run a program that takes in input as an array variable, it ignores the info!! All it prints out is hexadecimal gobbledygook. It compiles fine, and it runs fine at my school's lab where I use Microsoft (ugh) to compile my homework (I'm beginning going on intermediate). Is it my resource files being badly placed?? Someone help! Thanks, MAC ________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/tagj. |
|
From: Bruce Y. <y2...@ho...> - 2000-12-11 00:46:05
|
<html><DIV>
<P>be sure to include the: #include <string></P>
<P><BR>#include <iostream.h><BR>#include <stdlib.h><BR>#include <string></P>
<P>int main()<BR>{<BR> string name;</P>
<P> do<BR> { cout << "\nPlease enter your name: ";<BR> cin >> name;</P>
<P> cout << "\nName = " << name << endl;</P>
<P> if (name == "John" || name == "john")<BR> cout << "\nThank you!!\n";<BR> else<BR> cout << "\nNo. Try again";</P>
<P> }<BR> while(name != "John" || name != "john");</P>
<P> </P>
<P> system("PAUSE");<BR> return 0;<BR>}</P></DIV><br clear=all><hr>Get more from the Web. FREE MSN Explorer download : <a href="http://explorer.msn.com">http://explorer.msn.com</a><br></p></html>
|
|
From: Ioannis V. <no...@ya...> - 2000-12-11 00:09:30
|
A better and working version in C++ of this, is the following:
#include <iostream>
#include <string>
using namespace std;
int main()
{
string John;
cout << "Please enter your name.." <<endl;
cin>>John;
if (John == "John")
cout << "Thank you";
else
cout << "Nope";
return 0;
}
A corrected version of the original posting, so as to work is:
#include <iostream>
using namespace std;
int main ()
{
char John [5];
cout << "please enter your name.." <<endl;
cin>>John;
if (John == "John")
cout << "Thank you";
else
cout << "Nope";
}
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...]On Behalf Of Matthew
FitzGerald
Sent: Sunday, December 10, 2000 9:47 PM
To: dev...@li...
Subject: Re: [Dev-C++] I am new to C ++ and need some help
Try this:
include <iostream.h>
int main (void)
{
char John [5];
cout << "please enter your name.." <<endl;
cin>>John;
if (John == "John")
{
cout << "Thank you";
}
else (John != "John")
{
cout << "Nope";
}
}
|
|
From: Ioannis V. <no...@ya...> - 2000-12-10 23:18:25
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...]On Behalf Of Vesa Norilo > Sent: Monday, December 11, 2000 12:35 AM > To: dev...@li... > Subject: Re: [Dev-C++] I am new to C ++ and need some help > > > Hi, > > In C you can't compare strings with: > > name == "blahblah" since the value of a string is the memory location > where it is. > > The correct method is to use the standard C function strcmpi (string > compare, case insensitive) strcmp() which is declared in string.h __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com |
|
From: David M. <dav...@ei...> - 2000-12-10 22:42:31
|
#include <iostream.h>
int main (void)
{
char John [5];
=20
cout << "please enter your name.." <<endl;
cin>>John;
if (John =3D=3D "John")
cout << "Thank you";
else=20
cout << "Nope";
=20
}
----- Original Message -----=20
From: J R=20
To: dev...@li...=20
Sent: Sunday, December 10, 2000 10:16 PM
Subject: Re: [Dev-C++] I am new to C ++ and need some help
Nope that still isnt working any other suggestions anyone??
Thanks,
J
=20
Matthew FitzGerald <fit...@ho...> wrote:=20
Try this:
include <iostream.h>
int main (void)
{
char John [5];
=20
cout << "please enter your name.." <<endl;
cin>>John;
if (John =3D=3D "John")
{
cout << "Thank you";
}
else (John !=3D "John")
{
cout << "Nope";
}
}
----- Original Message -----=20
From: J R=20
To: dev...@li...=20
Sent: Sunday, December 10, 2000 10:50 AM
Subject: [Dev-C++] I am new to C ++ and need some help
Now I'm sure to all you long time C++ ediotrs out there this =
question will be obvious but I just can't figure it out. here goes. I =
want a program that asks for your name and then I want it so if you =
enter John as your name it will say thanks and if you enter anything =
else it will say Nope I have tried and tried but to no avail. =
Here is what I have
#include <iostream.h>
#include <stdlib.h>
int main()
{
unsigned short int name,john;
cout << "Please enter your name: ";
cin >> name;
if (name=3Djohn)
cout << "\nThanks!\n";
else
cout << "\nNope!\n";
system("PAUSE");
return 0;
}
As of now it says thanks no matter what. I have tried and =
tried but nothing will work and I'm sure I did something stupid to make =
it not work. If you could rewrite what I did wrong or just write a =
brand new code it would be greatly appreciated.
Thanks,
J
-------------------------------------------------------------------------=
-
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
-------------------------------------------------------------------------=
-----
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
|
|
From: Vesa N. <wa...@dl...> - 2000-12-10 22:34:14
|
Hi,
In C you can't compare strings with:
name == "blahblah" since the value of a string is the memory location
where it is.
The correct method is to use the standard C function strcmpi (string
compare, case insensitive)
if (strcmpi(name,"john")==0)
{
name is john
}
|
|
From: J R <ray...@ya...> - 2000-12-10 22:16:15
|
Nope that still isnt working any other suggestions anyone??
Thanks,
J
Matthew FitzGerald <fit...@ho...> wrote:
Try this:
include <iostream.h>
int main (void)
{
char John [5];
cout << "please enter your name.." <<endl;
cin>>John;
if (John == "John")
{
cout << "Thank you";
}
else (John != "John")
{
cout << "Nope";
}
}
----- Original Message -----
From: J R
To: dev...@li...
Sent: Sunday, December 10, 2000 10:50 AM
Subject: [Dev-C++] I am new to C ++ and need some help
Now I'm sure to all you long time C++ ediotrs out there this question will be obvious but I just can't figure it out. here goes. I want a program that asks for your name and then I want it so if you enter John as your name it will say thanks and if you enter anything else it will say Nope I have tried and tried but to no avail. Here is what I have
#include <iostream.h>
#include <stdlib.h>
int main()
{
unsigned short int name,john;
cout << "Please enter your name: ";
cin >> name;
if (name=john)
cout << "\nThanks!\n";
else
cout << "\nNope!\n";
system("PAUSE");
return 0;
}
As of now it says thanks no matter what. I have tried and tried but nothing will work and I'm sure I did something stupid to make it not work. If you could rewrite what I did wrong or just write a brand new code it would be greatly appreciated.
Thanks,
J
---------------------------------
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
---------------------------------
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products. |
|
From: Matthew F. <fit...@ho...> - 2000-12-10 19:48:41
|
Try this:
include <iostream.h>
int main (void)
{
char John [5];
=20
cout << "please enter your name.." <<endl;
cin>>John;
if (John =3D=3D "John")
{
cout << "Thank you";
}
else (John !=3D "John")
{
cout << "Nope";
}
}
----- Original Message -----=20
From: J R=20
To: dev...@li...=20
Sent: Sunday, December 10, 2000 10:50 AM
Subject: [Dev-C++] I am new to C ++ and need some help
Now I'm sure to all you long time C++ ediotrs out there this question =
will be obvious but I just can't figure it out. here goes. I want a =
program that asks for your name and then I want it so if you enter =
John as your name it will say thanks and if you enter anything else it =
will say Nope I have tried and tried but to no avail. Here is =
what I have
#include <iostream.h>
#include <stdlib.h>
int main()
{
unsigned short int name,john;
cout << "Please enter your name: ";
cin >> name;
if (name=3Djohn)
cout << "\nThanks!\n";
else
cout << "\nNope!\n";
system("PAUSE");
return 0;
}
As of now it says thanks no matter what. I have tried and tried =
but nothing will work and I'm sure I did something stupid to make it not =
work. If you could rewrite what I did wrong or just write a brand new =
code it would be greatly appreciated.
Thanks,
J
-------------------------------------------------------------------------=
-----
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
|
|
From: Matthew F. <fit...@ho...> - 2000-12-10 19:44:11
|
Can't you take the GMP.h and GMP.o and put them in the C:\Dev-C++\Lib and C:\Dev-C++\include directorys? I think that should do it, I = included the Allegro game programming library like that. I am not = positive though, I am not familiar with the GMP library. ----- Original Message -----=20 From: Wien Hong=20 To: dev...@li...=20 Sent: Sunday, December 10, 2000 4:44 AM Subject: [Dev-C++] GMP library and Dev-C++ Does anyone knows how can I use GMP library under the Dev-C++ environments?=20 I need to deal with arbitrary precision arithmetic, and I know GMP library can do this for me. However, I don't know how to=20 install it so that the Dev-C++ can use it.=20 I appreciate your help. Thanks Wien Hong |
|
From: J R <ray...@ya...> - 2000-12-10 18:50:17
|
Now I'm sure to all you long time C++ ediotrs out there this question will be obvious but I just can't figure it out. here goes. I want a program that asks for your name and then I want it so if you enter John as your name it will say thanks and if you enter anything else it will say Nope I have tried and tried but to no avail. Here is what I have
#include <iostream.h>
#include <stdlib.h>
int main()
{
unsigned short int name,john;
cout << "Please enter your name: ";
cin >> name;
if (name=john)
cout << "\nThanks!\n";
else
cout << "\nNope!\n";
system("PAUSE");
return 0;
}
As of now it says thanks no matter what. I have tried and tried but nothing will work and I'm sure I did something stupid to make it not work. If you could rewrite what I did wrong or just write a brand new code it would be greatly appreciated.
Thanks,
J
---------------------------------
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products. |
|
From: Wien H. <hon...@ms...> - 2000-12-10 13:23:06
|
Does anyone knows how can I use GMP library under the Dev-C++ environments?=20 I need to deal with arbitrary precision arithmetic, and I know GMP library can do this for me. However, I don't know how to=20 install it so that the Dev-C++ can use it.=20 I appreciate your help. Thanks Wien Hong |