dev-cpp-users Mailing List for Dev-C++ (Page 623)
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: Flavio de S. <fla...@ne...> - 2002-02-12 20:30:05
|
Thank you Bob, I will try to check these resources. Fl=E1vio. 10/02/02 16:59:58, "Bob Campbell" <rc...@ps...> wrote: >Hi, >Here's a couple of suggestions: > >Download MySQL and the MySQL C++ API from www.mysql.com. >The API has a manual and examples of working code. > >Register at www.informit.com , go to the Free Library. There is a comple= te >online copy of the "Sams Teach Yourself Database Programming with Visua= l >C++ 6 in 21 Days." It will give you enough material to apply the >code/concepts to other compilers and IDE's. > >Bob > > >----- Original Message ----- >From: "Flavio de Souza" <fla...@ne...> >To: <Dan...@ao...>; "Dev-cpp" <dev...@li...= t> >Sent: Sunday, February 10, 2002 12:42 PM >Subject: [Dev-C++] Re: Database program (how do i do that?) > > > > Flavio de Souza fla...@ne... ICQ:78458203 Sert=E3ozinho - SP - Brasil |
|
From: Jason S. <mys...@op...> - 2002-02-12 20:27:03
|
Can someone either get this guy to turn the thing off (sent an email asking, no response...) or something of the such? I mean sure it's only an email among the million other mailing list ones, but seeing the same subject day after day after day.... >:) Jay ----- Original Message ----- From: A. Erdogan Horzum To: dev...@li... Sent: Tuesday, February 12, 2002 3:10 PM Subject: [Dev-C++] Auto Respond Your mail received. Thank You, A. Erdogan Horzum www.zetamuhendislik.com _______________________________________________ Dev-cpp-users mailing list Dev...@li... https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: A. E. H. <ze...@ze...> - 2002-02-12 20:11:03
|
Your mail received. Thank You, A. Erdogan Horzum www.zetamuhendislik.com |
|
From: patche <pa...@ro...> - 2002-02-12 19:36:14
|
I am new to programming and have a huge story on all of the compiler/IDEs=
that I've tried until I found DevCPP kudos to everyone involved.
There was a question that was asked about gett cin.get() to work. I don't=
know why but I had the same problem and the book with which I am teaching=
myself or some other tutorial I was reading can't recall, suggested that I=
use cin.get() twice, like so:
//template.cpp - Template for CPP
#include <iostream>
using namespace std;
int main()
{
cin.get();
cin.get();
return 0;
}
So far, I haven't found any conflicts. With what I know I will suggest=
that the problem lies in the language itself. I was studying the section=
concerning strings and began to notice that the compiler actually hides=
alot of useful stuff that would be good to know. For instance, the=
compiler will take a carriage return [ENTER] for a "\n" character and then=
the newline character will be replaced with a null value "\0" of course=
the "\0" represents yet another number.
I don't know if the explanation helps but I am sure putting it in twice=
will.
Thanks
Patche
|
|
From: David M. <ci...@ya...> - 2002-02-12 19:03:10
|
>Hello... > >I have a question about closing a terminal window during a C++ program >execution. I am using Dev C++ 4.01 as my compiler. At >http://www.cprogramming.com/close.html, it says that inserting the line >cin.get() before the return 0 line will keep the terminal window open >until I press enter. This I find is true for the following program: > >#include <iostream.h> >int main() >{ > cout<<"The Compiler Works"; > cin.get() > return 0; >} > > >However for the following code, I type my number, press enter, and the window >closes immediately. Why doesn't the compiler display "You entered: ", >then my >number, and then close the terminal window once I push enter (which would be >the second time)?? Am I putting the cin.get() statement in the wrong spot?? >Check out the code I'm using. > >#include <iostream.h> >int main() >{ > int thisisanumber; > cout<<"Please enter a number:"; > cin>>thisisanumber; > cout<<"You entered: "<<thisisanumber; > cin.get() > return 0; >} > >I'm stuck, and I'm trying to teach myself C++. Your help is greatly >appreciated. > >Sincerly, >Aaron There are 2 ways to do what you want the first requires you to replace the cin.get(); with system("PAUSE"); N.B. To use system("PAUSE") you must include stdlib.h The system is in common letters and the PAUSE is all capital since you are learning I will include a snippet that does the exact same thing /* This does the same thing as system("PAUSE") */ cin.ignore(256, '\n'); cout << "Press ENTER to continue..." << endl; cin.get(); The cin.ignore will keep reading from input and throwing it away until it gets to '\n' (for your purposes the equivalent of the enter key) in other word it flushes the buffer so the program will have nothing in the input buffer when it gets to the cin.get and should wait I have tested this in Dev-c++ |
|
From: <ja...@xs...> - 2002-02-12 18:23:14
|
Hi all.. I want to connect to a Postgresql database using devc++ (mingw) but I can't seem to find the nescesary library.. does anyone know these exist and where to find them? At the postgress site there is only the complte download for a postgress install, but i need only the client libs.. I found some pre-compiled lib/dll but the header-files are missing so they are useless.. John |
|
From: A. E. H. <ze...@ze...> - 2002-02-12 18:16:50
|
Your mail received. Thank You, A. Erdogan Horzum www.zetamuhendislik.com |
|
From: Mitchell, T. (HNA) <Tam...@hj...> - 2002-02-12 18:07:42
|
Does any one have sample programs arrays and prime numbers?
I have a program Due Friday and am totally confused.
Can anyone point me in the right direction
Here is my exercise.
(The Sieve of Eratosthenes) A prime integer is any integer that is easily
divisible only by itself and 1. The Sieve of Eratosthenes is a method of
finding prime numbers. It operates as follows
a). Create an array with all elements initialized to 1 (true).
Array elements with prime subscripts will remain 1. All other array
elements will eventually be set to zero.
b). Starting with array subscript 2 (subscripts 1 must be prime),
every time an array element is found whose value is 1, loop through the
remainder of the array and set to zero every element whose subscript is
a multiple of the subscript for the element with value 1. For array
subscript 2, all elements beyond 2 in the array that are multiples of 2
will be set to zero(subscripts 4, 6, 8, 10, etc.) for array subscript 3, all
elements beyond 3 in the array that a are multiples of 3 will be set to zero
(subscripts 6, 9, 12, 15 etc) and so on.
When this process is complete, the array elements that are still set to one
indicate that the subscript is a prime number. These subscripts can then be
printed. Write a program that uses an array of 1000 elements to determine
and print the prime numbers between 1 and 999. Ignore element 0 of the
array.
This is what I have so far
#include<iostream>
using std::cout;
using std::endl;
#include<iomanip>
int main()
{
const int i[1000];
}
Not much.
Tamra Y. Mitchell
Heinz North America
Database & Operating Systems Analyst
(412) 237-5232 Work
(412) 996-9078 Cell Phone
|
|
From: <gi...@li...> - 2002-02-12 17:41:23
|
Hello Javier,
I've tried the code that you posted with both the CLI version of gdb (I
mean the one you get together with Dev-C++) and the GUI version (the one
you used). I had no problem, the program worked as expected. So I can't
tell you what is wrong.
There are a few things about your code, though, which I do not understand.
1. I see that you are worried about casting the value returned by some
functions (like "fprintf" or "fclose") to "void", even if you assign the
return value to no variable.
2. The function "ckopen" is not supposed to modify the value of "name", but
you use a "char*" instead of a "const char*". This also applies to the
other argument and to the function "fatalf".
When I compiled your code the gcc compiler complained (i.e. issued a
warning message) that "b.txt" is a "const char*" and you are passing it to
a function ("ckopen") that expects a "char*".
3. You test for the ASCII character 0.
4. You test for the ASCII character 32 instead of the character literal ' '.
I have rearranged your code and am sending you the result, in the hope that
it helps.
At 14:32 11/02/02 -0600, Javier Martinez wrote:
>...
> > I would like to help solving your problem, but I
> > need a little more
> > informations:
> > (1) which debugger are you using: the command line
> > "gdb" or the GUI cygwin
> > version of gdb?
>
>I'm using the GUI cygwin the insight program for
>win32.
>
> > (2) Couild you post a small program where the
> > behavior you experienced occurs?
>
>sure I have a complete small program that presents
>also the bad behavior...
>
> > I need a bit more code to understand the way you set
> > the value of the
> > variable "name".
>
>BEGIN---------------------------
>#include <stdio.h>
>#include <stdlib.h>
>
>
>int fatalf(char *msg, char *val)
>{
> (void) fprintf(stderr, msg, val);
> (void) putc('\n', stderr);
> exit(1);
>}
>
>FILE *ckopen(char *name, char *mode)
>{
> FILE *fp;
>
> if ((fp = fopen(name, mode)) == NULL)
> fatalf("Cannot open %s.", name);
> return(fp);
>}
>
>
>int main(int argc, char *argv[])
>{
> FILE *Ap;
> int M,symbol;
>
> Ap = ckopen("b.txt", "r");
> for (M = 0; ( symbol = getc(Ap)) != EOF ; )
> if ( symbol != '\n' && (symbol != 32) && (symbol
>!= 0))
> ++M;
> (void) fclose(Ap);
>
> printf("%d",M);
> return 0;
>}
>
>END-----------------------------
>
>Notes:
>1* This program just take a text file and counts the
>number of characters in it...
>
>2* b.txt is a text file that really exist.. and when I
>run the program it works...
>
>3* but if I try to debug the program the debugger
>fails to open it. when reads the fopen instruction
>doesn't get a address for the text file to be open,
>just returns NULL...
>
>
>Javier
>
> > --
> > gisan
--
gisan
gi...@li... |
|
From: Ioannis V. <no...@ya...> - 2002-02-11 23:28:21
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of aar...@ut... > Sent: Monday, February 11, 2002 10:28 PM > To: dev...@li... > Subject: [Dev-C++] Dev C++ Question > > > Hello... > > I have a question about closing a terminal window during a > C++ program > execution. I am using Dev C++ 4.01 as my compiler. At > http://www.cprogramming.com/close.html, it says that > inserting the line > cin.get() before the return 0 line will keep the terminal window open > until I press enter. This I find is true for the following program: > > #include <iostream.h> > int main() > { > cout<<"The Compiler Works"; > cin.get() > return 0; > } > > > However for the following code, I type my number, press > enter, and the window > closes immediately. Why doesn't the compiler display "You > entered: ", then my > number, and then close the terminal window once I push enter > (which would be > the second time)?? Am I putting the cin.get() statement in > the wrong spot?? Check out the code I'm using. > > #include <iostream.h> > int main() > { > int thisisanumber; > cout<<"Please enter a number:"; > cin>>thisisanumber; > cout<<"You entered: "<<thisisanumber; > cin.get() > return 0; > } > > I'm stuck, and I'm trying to teach myself C++. Your help is greatly > appreciated. After the cin>>this number; the '\n' remains in the stream and is picked by the next cin.get(). If you want to pause you must enter 2 cin.get(): #include <iostream> int main() { using namespace std; int thisisanumber; cout<<"Please enter a number:"; cin>>thisisanumber; cin.get(); cout<<"You entered: "<<thisisanumber; cin.get(); return 0; } Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.d2g.com * Alternative URL: http://run.to/noicys |
|
From: Bob C. <rc...@ps...> - 2002-02-11 21:39:43
|
You forgot the semi-colon at the end of cin.get() it should be cin.get(); ----- Original Message ----- From: <aar...@ut...> To: <dev...@li...> Sent: Monday, February 11, 2002 3:28 PM Subject: [Dev-C++] Dev C++ Question > Hello... > > I have a question about closing a terminal window during a C++ program > execution. I am using Dev C++ 4.01 as my compiler. At > http://www.cprogramming.com/close.html, it says that inserting the line > cin.get() before the return 0 line will keep the terminal window open > until I press enter. This I find is true for the following program: > > #include <iostream.h> > int main() > { > cout<<"The Compiler Works"; > cin.get() > return 0; > } > > > However for the following code, I type my number, press enter, and the window > closes immediately. Why doesn't the compiler display "You entered: ", then my > number, and then close the terminal window once I push enter (which would be > the second time)?? Am I putting the cin.get() statement in the wrong spot?? > Check out the code I'm using. > > #include <iostream.h> > int main() > { > int thisisanumber; > cout<<"Please enter a number:"; > cin>>thisisanumber; > cout<<"You entered: "<<thisisanumber; > cin.get() > return 0; > } > > I'm stuck, and I'm trying to teach myself C++. Your help is greatly > appreciated. > > Sincerly, > Aaron > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
|
From: Jason S. <mys...@op...> - 2002-02-11 20:41:22
|
Try using this,
#include <iostream.h>
int main()
{
int thisisanumber;
cout<<"Please enter a number:";
cin>>thisisanumber;
cout<<"You entered: "<<thisisanumber<<endl;
cin.get()
return 0;
}
I don't have access to any compilers at the moment, but I believe you need a endl or the such there...not quite sure though. :)
Jason
----- Original Message -----
From: aar...@ut...
To: dev...@li...
Sent: Monday, February 11, 2002 3:28 PM
Subject: [Dev-C++] Dev C++ Question
However for the following code, I type my number, press enter, and the window
closes immediately. Why doesn't the compiler display "You entered: ", then my
number, and then close the terminal window once I push enter (which would be
the second time)?? Am I putting the cin.get() statement in the wrong spot??
Check out the code I'm using.
#include <iostream.h>
int main()
{
int thisisanumber;
cout<<"Please enter a number:";
cin>>thisisanumber;
cout<<"You entered: "<<thisisanumber;
cin.get()
return 0;
}
|
|
From: <aar...@ut...> - 2002-02-11 20:28:49
|
Hello... I have a question about closing a terminal window during a C++ program execution. I am using Dev C++ 4.01 as my compiler. At http://www.cprogramming.com/close.html, it says that inserting the line cin.get() before the return 0 line will keep the terminal window open until I press enter. This I find is true for the following program: #include <iostream.h> int main() { cout<<"The Compiler Works"; cin.get() return 0; } However for the following code, I type my number, press enter, and the window closes immediately. Why doesn't the compiler display "You entered: ", then my number, and then close the terminal window once I push enter (which would be the second time)?? Am I putting the cin.get() statement in the wrong spot?? Check out the code I'm using. #include <iostream.h> int main() { int thisisanumber; cout<<"Please enter a number:"; cin>>thisisanumber; cout<<"You entered: "<<thisisanumber; cin.get() return 0; } I'm stuck, and I'm trying to teach myself C++. Your help is greatly appreciated. Sincerly, Aaron |
|
From: <Ech...@ne...> - 2002-02-11 20:23:55
|
I think that gcc uses AT&T(?) syntax, could it be that you are using intel syntax, and that the difference between the 2 is causing all the errors?
You might want to look at the "netwide asembler" (nasm) program it doesn't you GCC's syntax. I think that if you use it then the asm would have to be in a different file, but I am not sure. Actualy I've never used nasm, but I have hear it is gcc compatable and uses non gcc syntax
>Message: 4
>Reply-To: "Nick J" <Jam...@wo...>
>From: "Nick J" <Jam...@wo...>
>To: <dev...@li...>
>Date: Sun, 10 Feb 2002 20:00:16 -0600
>...
>This stuff is messed. asm("command") gives lotso errors...
>
>19 c:\windows\temp\ccwflegb.s
>Error: too many memory references for `mov'
. . .
>22 c:\windows\temp\ccwflegb.s
>Error: Ignoring junk `h' after exprpa:22:ny memory references foO SmTvM
>
>I hate VGA...
>
>PLEEASSEEE help me...
>
>P.S. Sorry for posting all errors, but...
--
__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/
Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/
|
|
From: A. E. H. <ze...@ze...> - 2002-02-11 20:12:43
|
Your mail received. Thank You, A. Erdogan Horzum www.zetamuhendislik.com |
|
From: Benjamin W. <ben...@ho...> - 2002-02-11 16:49:58
|
<html><div style='background-color:'><DIV>
<P>Morning,</P></DIV>
<P>I don't know too much about using assembly from within C/C++, but I believe that the standard usage is something like:</P>
<P>__asm xor bx, bx /* double underscores and no semi-colon */</P>
<P>-or-</P>
<P>__asm /* double underscore */<BR>{<BR> mov ax, 0e07h /* again no semi-colons */<BR> xor bx, bx<BR>} /* no semi-colon here either */</P>
<P> </P>
<P>I hope that helps out some.</P>
<DIV></DIV>
<DIV><FONT face="Geneva, Arial, Sans-serif" size=2>Benjamin Wheeless</FONT></DIV>
<DIV></DIV>
<DIV><FONT face="Geneva, Arial, Sans-serif" size=2><STRONG>Network Systems - Delta Airlines, Inc.</STRONG></FONT></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2><STRONG>Atlanta, GA - USA 30320</STRONG></FONT></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2><STRONG>==============================</STRONG></FONT></DIV>
<DIV> </DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>>From: "Nick J" <JAM...@WO...>
<DIV></DIV>>Reply-To: "Nick J" <JAM...@WO...>
<DIV></DIV>>To: <DEV...@LI...>
<DIV></DIV>>Subject: [Dev-C++] Asm once again...
<DIV></DIV>>Date: Sun, 10 Feb 2002 20:00:16 -0600
<DIV></DIV>>
<DIV></DIV>>...
<DIV></DIV>>This stuff is messed. asm("command") gives lotso errors...
<DIV></DIV>>
<DIV></DIV>>19 c:\windows\temp\ccwflegb.s
<DIV></DIV>> Error: too many memory references for `mov'
<DIV></DIV>>
<DIV></DIV>>20 c:\windows\temp\ccwflegb.s
<DIV></DIV>> Error: Ignoring junk `h' after expression
<DIV></DIV>>
<DIV></DIV>>20 c:\windows\temp\ccwflegb.s
<DIV></DIV>> Error: suffix or operands invalid for `int'
<DIV></DIV>>
<DIV></DIV>>21 c:\windows\temp\ccwflegb.s
<DIV></DIV>> Error: too many memory references for `mov'
<DIV></DIV>>
<DIV></DIV>>22 c:\windows\temp\ccwflegb.s
<DIV></DIV>> Error: Ignoring junk `h' after expression
<DIV></DIV>>
<DIV></DIV>>22 c:\windows\temp\ccwflegb.s
<DIV></DIV>> Error: suffix or operands invalid for `int'
<DIV></DIV>>
<DIV></DIV>>19 c:\windows\temp\ccwflegb.s
<DIV></DIV>> Error: too many memory references for `mov'
<DIV></DIV>>
<DIV></DIV>>22 c:\windows\temp\ccwflegb.s
<DIV></DIV>> Error: Ignoring junk `h' after exprpa:22:ny memory references foO SmTvM
<DIV></DIV>>
<DIV></DIV>>I hate VGA...
<DIV></DIV>>
<DIV></DIV>>PLEEASSEEE help me...
<DIV></DIV>>
<DIV></DIV>>P.S. Sorry for posting all errors, but...
<DIV></DIV></div><br clear=all><hr>Get your FREE download of MSN Explorer at <a href='http://go.msn.com/bql/hmtag_etl_EN.asp'>http://explorer.msn.com</a>.<br></html>
|
|
From: Daniel G. <sp...@ho...> - 2002-02-11 13:04:38
|
<html><div style='background-color:'><DIV> <P>Hey that's interesting, thanks!</P> <P>I wonder how many unemployed programmers (like me) there are out there...<BR><BR></P></DIV> <DIV></DIV> <DIV></DIV>>From: "Ioannis Vranos" <NO...@YA...> <DIV></DIV>>To: "Dev-C++" <DEV...@LI...> <DIV></DIV>>Subject: [Dev-C++] (no subject) <DIV></DIV>>Date: Mon, 11 Feb 2002 03:07:16 +0200 <DIV></DIV>> <DIV></DIV>>Something useful: <DIV></DIV>> <DIV></DIV>> <DIV></DIV>>Recently, a report by IDC indicated that there are over 2.6 million <DIV></DIV>>professional developers worldwide using C/C++ as their primary language <DIV></DIV>>and over a million professional developers worldwide using Java as their <DIV></DIV>>primary language. This means over 37% of all developers worldwide are <DIV></DIV>>using these languages and the numbers continue to grow. <DIV></DIV>> <DIV></DIV>> <DIV></DIV>>Ioannis <DIV></DIV>> <DIV></DIV>>* Ioannis Vranos <DIV></DIV>>* Programming pages: <HTTP: www.noicys.d2g.com /> <DIV></DIV>>http://www.noicys.d2g.com <DIV></DIV>>* Alternative URL: <HTTP: noicys run.to>http://run.to/noicys <DIV></DIV></div><br clear=all><hr>MSN Photos is the easiest way to share and print your photos: <a href='http://go.msn.com/bql/hmtag3_etl_EN.asp'>Click Here</a><br></html> |
|
From: Nick J <Jam...@wo...> - 2002-02-11 02:07:17
|
...
This stuff is messed. asm("command") gives lotso errors...
19 c:\windows\temp\ccwflegb.s
Error: too many memory references for `mov'
20 c:\windows\temp\ccwflegb.s
Error: Ignoring junk `h' after expression
20 c:\windows\temp\ccwflegb.s
Error: suffix or operands invalid for `int'
21 c:\windows\temp\ccwflegb.s
Error: too many memory references for `mov'
22 c:\windows\temp\ccwflegb.s
Error: Ignoring junk `h' after expression
22 c:\windows\temp\ccwflegb.s
Error: suffix or operands invalid for `int'
19 c:\windows\temp\ccwflegb.s
Error: too many memory references for `mov'
22 c:\windows\temp\ccwflegb.s
Error: Ignoring junk `h' after exprpa:22:ny memory references foO SmTvM
I hate VGA...
PLEEASSEEE help me...
P.S. Sorry for posting all errors, but...
|
|
From: Ioannis V. <no...@ya...> - 2002-02-11 01:07:24
|
Something useful: Recently, a report by IDC indicated that there are over 2.6 million professional developers worldwide using C/C++ as their primary language and over a million professional developers worldwide using Java as their primary language. This means over 37% of all developers worldwide are using these languages and the numbers continue to grow. Ioannis * Ioannis Vranos * Programming pages: <http://www.noicys.d2g.com/> http://www.noicys.d2g.com * Alternative URL: <http://run.to/noicys> http://run.to/noicys |
|
From: Ioannis V. <no...@ya...> - 2002-02-10 23:08:25
|
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf
> Of Ioannis Vranos
> Sent: Monday, February 11, 2002 12:57 AM
> To: Dev-C++
> Subject: RE: [Dev-C++] ANSI C++ forbids implicit conversion
> from `void *' in argument passing
>
>
> In C++ a void * can not be assigned directly in any pointer
> type without casting, e.g. the result of malloc() needs
> casting in C++. void * is used a lot in C to emulate generic
> programming with poor abilities in the particular area, that
> is to write functions that do things on various types of
> variables using ancient non type safe techniques. C++ has
> built in support for generic programming with the best
> possible way, templates. Templates arre both time efficient,
> space efficient if you use specializations where is needed
> and type-safe at the same time. E.g. consider the following
> C++ C-style code:
>
> void *add(void *p1, void *p2, const char *type)
> {
> if(strcmp(type, "int")
> {
> if(int *resul=(char *)malloc(sizeof(int)))
> {
> *result=(int *)p1+(int *)p2;
> return result;
> }
>
> else if(strcmp(type, "float")
> // Pain goes on...
>
> }
>
>
> Consider the template alternative:
>
> template <class T>
> inline T add(T a, T b)
> {
> return a+b;
> }
>
>
> It is both type safe and maximally efficient.
>
>
> So better use templates in the place where you use void * for
> generic programming.
Tonight i have drunk a bit wine hic, but i just realised that the
original question was about some API. Anyway i made mistakes! in the
previous email in the C-style implementation so here is the correct one:
void *add(void *p1, void *p2, const char *type)
{
if(!strcmp(type, "int"))
{
if(int *result=(int *)malloc(sizeof(int)))
{
*result=*(int *)p1+*(int *)p2;
return result;
}
}
else if(!strcmp(type, "float")
// Pain goes on...
}
And the template alternative is better written:
template <class T>
inline T add(const T &a, const T &b)
{
return a+b;
}
Now if i made more mistakes, sorry fellows it is the wine. :)
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.d2g.com
* Alternative URL: http://run.to/noicys
|
|
From: Ioannis V. <no...@ya...> - 2002-02-10 22:56:42
|
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf
> Of Flavio de Souza
> Sent: Sunday, February 10, 2002 8:41 PM
> To: Dev-cpp
> Subject: [Dev-C++] ANSI C++ forbids implicit conversion from
> `void *' in argument passing
>
>
>
> I am trying to compile a windows program and I am getting the
> following compiler error:
>
> ANSI C++ forbids implicit conversion from `void *' in
> argument passing
>
> This error occurs two times in the following piece of code
> where I have the value "0" (see below).
>
> void WinClass::SetResIcons (int resId)
> {
> _class.hIcon = reinterpret_cast<HICON> (
> ::LoadImage (
> _class.hInstance,
> MAKEINTRESOURCE (resId),
> IMAGE_ICON,
> ::GetSystemMetrics (SM_CXICON),
> ::GetSystemMetrics (SM_CYICON),
> 0));
> <-------------------------------------------------------------
> -----------------where i got the error
> // Small icon can be loaded from the same resource
> _class.hIconSm = reinterpret_cast<HICON> (
> ::LoadImage (
> _class.hInstance,
> MAKEINTRESOURCE (resId),
> IMAGE_ICON,
> ::GetSystemMetrics (SM_CXSMICON),
> ::GetSystemMetrics (SM_CYSMICON),
> 0));
> <-------------------------------------------------------------
> -----------------where i got the error
>
> }
>
> Does anyone know a possible cause? What should I do to
> compile it correctly?
>
> Please, help me.
In C++ a void * can not be assigned directly in any pointer type without
casting, e.g. the result of malloc() needs casting in C++. void * is
used a lot in C to emulate generic programming with poor abilities in
the particular area, that is to write functions that do things on
various types of variables using ancient non type safe techniques. C++
has built in support for generic programming with the best possible way,
templates. Templates arre both time efficient, space efficient if you
use specializations where is needed and type-safe at the same time. E.g.
consider the following C++ C-style code:
void *add(void *p1, void *p2, const char *type)
{
if(strcmp(type, "int")
{
if(int *resul=(char *)malloc(sizeof(int)))
{
*result=(int *)p1+(int *)p2;
return result;
}
else if(strcmp(type, "float")
// Pain goes on...
}
Consider the template alternative:
template <class T>
inline T add(T a, T b)
{
return a+b;
}
It is both type safe and maximally efficient.
So better use templates in the place where you use void * for generic
programming.
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.d2g.com
* Alternative URL: http://run.to/noicys
|
|
From: Bob C. <rc...@ps...> - 2002-02-10 19:58:58
|
Hi, Here's a couple of suggestions: Download MySQL and the MySQL C++ API from www.mysql.com. The API has a manual and examples of working code. Register at www.informit.com , go to the Free Library. There is a complete online copy of the "Sams Teach Yourself Database Programming with Visual C++ 6 in 21 Days." It will give you enough material to apply the code/concepts to other compilers and IDE's. Bob ----- Original Message ----- From: "Flavio de Souza" <fla...@ne...> To: <Dan...@ao...>; "Dev-cpp" <dev...@li...> Sent: Sunday, February 10, 2002 12:42 PM Subject: [Dev-C++] Re: Database program (how do i do that?) |
|
From: Benjamin W. <ben...@ho...> - 2002-02-10 18:42:01
|
<html><div style='background-color:'><DIV>
<P>Flavio,</P>
<P>Have you tried replacing the "0" with a default flag such as: LR_DEFAULTCOLOR</P>
<P>LR_DEFAULTCOLOR is just a default flag that really doesn't do anything except assure that your bitmap or image is loaded non-black and white.</P>
<P>I hope that helps out.</P></DIV>
<DIV><FONT face="Geneva, Arial, Sans-serif" size=2>Benjamin Wheeless</FONT></DIV>
<DIV></DIV>
<DIV><FONT face="Geneva, Arial, Sans-serif" size=2><STRONG>Network Systems - Delta Airlines, Inc.</STRONG></FONT></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2><STRONG>Atlanta, GA - USA 30320</STRONG></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><STRONG>============================</STRONG></FONT></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>>From: Flavio de Souza <FLA...@NE...>
<DIV></DIV>>To: Dev-cpp <DEV...@LI...>
<DIV></DIV>>Subject: [Dev-C++] ANSI C++ forbids implicit conversion from `void *' in argument passing
<DIV></DIV>>Date: Sun, 10 Feb 2002 15:41:07 -0300
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>I am trying to compile a windows program and I am getting the following compiler error:
<DIV></DIV>>
<DIV></DIV>> ANSI C++ forbids implicit conversion from `void *' in argument passing
<DIV></DIV>>
<DIV></DIV>>This error occurs two times in the following piece of code where I have the value "0" (see below).
<DIV></DIV>>
<DIV></DIV>>void WinClass::SetResIcons (int resId)
<DIV></DIV>>{
<DIV></DIV>> _class.hIcon = reinterpret_cast<HICON> (
<DIV></DIV>> ::LoadImage (
<DIV></DIV>> _class.hInstance,
<DIV></DIV>> MAKEINTRESOURCE (resId),
<DIV></DIV>> IMAGE_ICON,
<DIV></DIV>> ::GetSystemMetrics (SM_CXICON),
<DIV></DIV>> ::GetSystemMetrics (SM_CYICON),
<DIV></DIV>> 0)); <------------------------------------------------------------------------------where i got the error
<DIV></DIV>> // Small icon can be loaded from the same resource
<DIV></DIV>> _class.hIconSm = reinterpret_cast<HICON> (
<DIV></DIV>> ::LoadImage (
<DIV></DIV>> _class.hInstance,
<DIV></DIV>> MAKEINTRESOURCE (resId),
<DIV></DIV>> IMAGE_ICON,
<DIV></DIV>> ::GetSystemMetrics (SM_CXSMICON),
<DIV></DIV>> ::GetSystemMetrics (SM_CYSMICON),
<DIV></DIV>> 0)); <------------------------------------------------------------------------------where i got the error
<DIV></DIV>>
<DIV></DIV>>}
<DIV></DIV>>
<DIV></DIV>>Does anyone know a possible cause? What should I do to compile it correctly?
<DIV></DIV>>
<DIV></DIV>>Please, help me.
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>Flavio de Souza
<DIV></DIV>>fla...@ne...
<DIV></DIV>>ICQ:78458203
<DIV></DIV>>Sertãozinho - SP - Brasil
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>_______________________________________________
<DIV></DIV>>Dev-cpp-users mailing list
<DIV></DIV>>Dev...@li...
<DIV></DIV>>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
<DIV></DIV></div><br clear=all><hr>Send and receive Hotmail on your mobile device: <a href='http://go.msn.com/bql/hmtag2_etl_EN.asp'>Click Here</a><br></html>
|
|
From: Flavio de S. <fla...@ne...> - 2002-02-10 17:53:08
|
I am trying to compile a windows program and I am getting the following c=
ompiler error:
ANSI C++ forbids implicit conversion from `void *' in argument passing
This error occurs two times in the following piece of code where I have t=
he value "0" (see below).
void WinClass::SetResIcons (int resId)
{
_class.hIcon =3D reinterpret_cast<HICON> (
::LoadImage (
_class.hInstance,=20
MAKEINTRESOURCE (resId),=20
IMAGE_ICON,=20
::GetSystemMetrics (SM_CXICON),
::GetSystemMetrics (SM_CYICON),
0)); <-------------------------------------------------------=
-----------------------where i got the error
// Small icon can be loaded from the same resource
_class.hIconSm =3D reinterpret_cast<HICON> (
::LoadImage (
_class.hInstance,=20
MAKEINTRESOURCE (resId),=20
IMAGE_ICON,=20
::GetSystemMetrics (SM_CXSMICON),
::GetSystemMetrics (SM_CYSMICON),
0)); <-------------------------------------------------------=
-----------------------where i got the error
}
Does anyone know a possible cause? What should I do to compile it correct=
ly?
Please, help me.
Flavio de Souza
fla...@ne...
ICQ:78458203
Sert=E3ozinho - SP - Brasil
|
|
From: Ioannis V. <no...@ya...> - 2002-02-10 17:25:05
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Flavio de Souza > Sent: Sunday, February 10, 2002 4:08 PM > To: Dev-cpp > Subject: [Dev-C++] Database program (how do i do that?) > > > Hey Listers: > > I am trying to learn cpp and I am trying to do a simple > application with a database ( just to hold some notes, > comments, etc ). > > I have seen around some .dat files, and they seem to be a txt > file. I know that cpp can create binary file as well. > > Actually, I do not know how to start, then I got a few questions: > > 1) Which one is better txt or binary? (In my application all > the data is just text ) If you want portability, only text is portable.That is it can be read in all platforms. The catch is that text occupies more space. > 2) How do I create a database with txt files or binary files? In C or C++? > Any suggestions or a good tutorial in the web? > 3) Once it was created, how do I perform a search in > database? Do I need an index table? (I don't even know how to do this) You will think a way. It depends on various factors, what searches you will do, if you keep your records sorted ans by which criteria e.t.c.. > > I got other questions, but I think I'll start with the basic ones. > > I'd appreciate some help with this. I have been studying cpp > and I have passed through all those boring tutorials about > language basics. Now I want to do a real > application, simple, but real ! I also suggest "The C++ Programming Language" 3rd Edition or Special Edition by Bjarne Stroustrup the creator of C++. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.d2g.com * Alternative URL: http://run.to/noicys |