dev-cpp-users Mailing List for Dev-C++ (Page 448)
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: Glen V. <gve...@pa...> - 2003-01-28 10:14:54
|
Sorry for the late reply, but I'm having the same error. The version with
2.95.3 gcc does the work, so this just seems like a serious bug to me :)
----- Original Message -----
From: "Ihsan Ali Al Darhi" <ia...@jo...>
To: <dev...@li...>
Sent: Sunday, January 26, 2003 3:28 AM
Subject: [Dev-C++] GCC 3.2 problem
> Hi...
>
> I just downloaded MingW 2.0 that contains the gcc 3.2 but when I tried to
> compile the Hello World program I receive a bunch of errors. The Hello
World
> program that I use is:
>
> #include <iostream>
>
> int main()
> {
> std::cout << "Hello World";
> return 0;
> }
>
> What's wrong?
>
>
> Mohammed
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.445 / Virus Database: 250 - Release Date: 21/01/03
|
|
From: Per W. <pw...@ia...> - 2003-01-28 09:55:59
|
Just as long as you are aware that strtod, strtof, strtol, ... can perform tricks that sscanf can not. sscanf works reasonable for processing a configuration file with known contents. It doesn't work when parsing a language, or an expression, since you don't know the contents of the line until you have parsed it. /Per W On Tue, 28 Jan 2003, Ioannis Vranos wrote: > -------Original Message------- > > From: Per Westermark > Date: =D4=F1=DF=F4=E7, 28 =C9=E1=ED=EF=F5=DC=F1=E9=EF=F2 2003 10:43:25 = =F0=EC > To: Ioannis Vranos > Cc: dev...@li... > Subject: Re: [Dev-C++] atof 2... > > sscanf can convert one or multiplie parameters from a text string into > corresponding variables. The problem is that you have very little control > of what sscanf considers white characters etc. And in case of a conversio= n > problem, it isn't easy to point exactly at the failing character. > > With strtod, you get a pointer to the first un-processed character of you= r > input string. For a parser, the normal action is to process characters on= e > at a time - that means that strotod is never called unless the parser > knows that the first character is the start of a number, i.e. the next > character to process is 0-9 or a decimal separator (. or , depending > on locale). Uppon return of atrtod, the parser may then immediately > continue parsing at the endptr position. > > /Per W > > > =3D=3D> Yes it's a nice for-double-only valid way too. But i prefer sscan= f() for > all this kind of stuff. :) > > > Ioannis Vranos > > * Programming pages: http://www.noicys.freeurl.com > * Alternative URL: http://run.to/noicys |
|
From: <or...@vp...> - 2003-01-28 09:35:03
|
Hello again! > Let me see if I got this right. That line you wrote above will actually > ignore the next 10 chars? Why 10? Is that just an arbitary number? And > which '\n' is it looking for? Or does it just ignore the next 10 '\n'? From some docs: " ignore( int nCount, delimiter ); Where nCount is the amount of characters to be ignored and delimiter is what its name says. It can be EOF if you want to stop at the end of the file. This way, this function is the same as seekg(). But it can also be '\n' for example, which will stop on the first new line. " So it will ignore the next nCount characters and stop if the read character is delimiter. -- Greetings, Balázs |
|
From: Ioannis V. <no...@ho...> - 2003-01-28 09:18:27
|
-------Original Message-------=0D =0D From: Per Westermark=0D Date: =D4=F1=DF=F4=E7, 28 =C9=E1=ED=EF=F5=DC=F1=E9=EF=F2 2003 10:43:25 =F0= =EC=0D To: Ioannis Vranos=0D Cc: dev...@li...=0D Subject: Re: [Dev-C++] atof 2...=0D =0D sscanf can convert one or multiplie parameters from a text string into=0D corresponding variables. The problem is that you have very little control= =0D of what sscanf considers white characters etc. And in case of a conversio= n=0D problem, it isn't easy to point exactly at the failing character.=0D =0D With strtod, you get a pointer to the first un-processed character of you= r=0D input string. For a parser, the normal action is to process characters on= e=0D at a time - that means that strotod is never called unless the parser=0D knows that the first character is the start of a number, i.e. the next=0D character to process is 0-9 or a decimal separator (. or , depending=0D on locale). Uppon return of atrtod, the parser may then immediately=0D continue parsing at the endptr position.=0D =0D /Per W=0D =0D =0D =3D=3D> Yes it's a nice for-double-only valid way too. But i prefer sscan= f() for all this kind of stuff. :)=0D =0D =0D Ioannis Vranos=0D =0D * Programming pages: http://www.noicys.freeurl.com=0D * Alternative URL: http://run.to/noicys=20 |
|
From: Ioannis V. <no...@ho...> - 2003-01-28 09:13:04
|
-------Original Message-------=0D =0D From: Per Westermark=0D Date: =D4=F1=DF=F4=E7, 28 =C9=E1=ED=EF=F5=DC=F1=E9=EF=F2 2003 10:33:10 =F0= =EC=0D To: Ioannis Vranos=0D Cc: dev...@li...=0D Subject: Re: [Dev-C++] STL::Vector=0D =0D Exactly, in both cases it's the programmers responsibility to know what=0D they are doing. But for native array you know what happens. With=0D containers, it's so easy to assume magic somewhere inside.=0D =0D /Per W=0D =0D =0D =3D=3D> If someone is clueless he can assume anything, even for built in = arrays.=0D =0D =0D =0D Ioannis Vranos=0D =0D * Programming pages: http://www.noicys.freeurl.com=0D * Alternative URL: http://run.to/noicys=20 |
|
From: veenurs <ve...@ma...> - 2003-01-28 08:53:01
|
Hi Santiago,
Yeah , it should be like that , of course .
Thanks for pointing that out. I've been using that prog for some time
.I think the reason it worked for me was that I wasn't doing anymore
allocation after that line , and the line was near the end of code .So
there was more headspace available for the bigger struct .
Thanks again ,
Regards,
Rahul .
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>-----Original Message-----
>From: veenurs [mailto:ve...@ma...]
>Sent: lunes, 27 de enero de 2003 19:12
>To: Neszt Tibor
>Cc: dev...@li...
>Subject: Re: [Dev-C++] win desktop x,y size
>
>
>
>It's like this :
>
> HWND hwnDesk=GetDesktopWindow( );
> LPRECT lpDeskRect =(LPRECT) malloc(sizeof(LPRECT) );
> BOOL bDeskDim= GetWindowRect(
> hwnDesk, // handle to window
> lpDeskRect // address of structure for window coordinates
>);
>
> if(!bDeskDim )
>MessageBox(NULL, "Could Not Get Desktop Dimensions!", "Error!",
>MB_ICONEXCLAMATION | MB_OK);
>
>else {
>
> LONG lright =lpDeskRect->right ;
> LONG lbottom =lpDeskRect->bottom ;
>
>Hope it helps .
>-rahul .
>
>
>Neszt Tibor wrote:
>
>Hello!
>
>Could anyone tell me a simply mode to get the size of the windows desktop?
>
>All help is welcome!
>
>Regards,
>
>Neszt Tibor
>
>
>
>-------------------------------------------------------
>This SF.NET email is sponsored by:
>SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
>http://www.vasoftware.com
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
>
>--------------------------------------------------------------------------------------
>This message and any files transmitted with it are confidential and intended solely
>for the use of the individual or entity to whom they are addressed. No confidentiality
>or privilege is waived or lost by any wrong transmission.
>If you have received this message in error, please immediately destroy it and kindly
>notify the sender by reply email.
>You must not, directly or indirectly, use, disclose, distribute, print, or copy any
>part of this message if you are not the intended recipient. Opinions, conclusions and
>other information in this message that do not relate to the official business of
>Ydilo Advanced Voice Solutions, S.A. shall be understood as neither given nor endorsed by it.
>--------------------------------------------------------------------------------------
>
>
>-------------------------------------------------------
>This SF.NET email is sponsored by:
>SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
>http://www.vasoftware.com
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
>
|
|
From: Per W. <pw...@ia...> - 2003-01-28 08:42:11
|
sscanf can convert one or multiplie parameters from a text string into corresponding variables. The problem is that you have very little control of what sscanf considers white characters etc. And in case of a conversion problem, it isn't easy to point exactly at the failing character. With strtod, you get a pointer to the first un-processed character of your input string. For a parser, the normal action is to process characters one at a time - that means that strotod is never called unless the parser knows that the first character is the start of a number, i.e. the next character to process is 0-9 or a decimal separator (. or , depending on locale). Uppon return of atrtod, the parser may then immediately continue parsing at the endptr position. /Per W On Sun, 19 Jan 2003, Ioannis Vranos wrote: > ------Original Message------- > > From: Per Westermark > Date: Sunday, 19 January 2003 10:48:26 PM > To: j b > Cc: dev...@li... > Subject: Re: [Dev-C++] atof 2... > > Hello! > > Don't use atof() for converting from text string to a double. > > Use strtod() instead, since it will inform you how many characters it > consumed. > > > > ==> What about sscanf()? > > > > Ioannis Vranos > > * Programming pages: http://www.noicys.freeurl.com > * Alternative URL: http://run.to/noicys |
|
From: Marc H. <ma...@e-...> - 2003-01-28 08:41:30
|
Hi all, Since downloading the Critical Update and all that good stuff using Vupdate yesterday, Vupdate now tells me that "Your Dev-Cpp config file is missing the $ROOT field in its [VUPDATE] section..." and it won't work anymore. Any ideas? _____________________________ Marc Heiligers |
|
From: Per W. <pw...@ia...> - 2003-01-28 08:34:21
|
Exactly, in both cases it's the programmers responsibility to know what they are doing. But for native array you know what happens. With containers, it's so easy to assume magic somewhere inside. /Per W On Tue, 28 Jan 2003, Ioannis Vranos wrote: > -------Original Message------- > > From: Per Westermark > Date: =D4=F1=DF=F4=E7, 28 =C9=E1=ED=EF=F5=DC=F1=E9=EF=F2 2003 3:01:54 =F0= =EC > To: Ioannis Vranos > Cc: dev...@li... > Subject: Re: [Dev-C++] STL::Vector > > One point about putting a 'naked' pointer into different kind of > containers, is that the pointer doesn't have a destructor to release the > referenced memory. > > /Per W > > > =3D=3D> I agree with that, including built in arrays. So he must delete o= bjects > pointed by pointers manually. This doesn't mean anything however against > using vectors of pointers in place of built in arrays with pointers. > > > Ioannis Vranos > > * Programming pages: http://www.noicys.freeurl.com > * Alternative URL: http://run.to/noicys |
|
From: <or...@vp...> - 2003-01-28 08:05:23
|
Hello!
Dany P. Wu wrote:
> They always say "There are no such thing as stupid questions, just
> plenty of inquisitive idiots" but here it goes........
Haha. Your question was actually a very good one. It took me at least 20
mins to figure out, but I have found what is the problem.
When you use cin before you use getline, it leaves a newline character
in the input (the console) and when getline is called it reads that
newline character and returns with an empty line. To fix this, use the
ignore function after you use cin and before you call getline:
cin.ignore(10,'\n'); // skip 10 chars until reaches '\n'
This will ignore all the '\n' characters so that getline will work properly.
Here is where to put it exactly:
> ============================================
> #include <iostream>
> #include <string>
>
> #define TAB '\t'
>
> main()
> {
> using namespace std;
>
> //Define how many planets there are
> int MAX;
> cout << "Enter the number of planets: ";
> cin >> MAX;
> //Define max length of planet names
> int LENGTH;
> cout << "Enter max length of planet names: ";
> cin >> LENGTH;
> cout <<"There will be " << MAX << " planets" <<endl;
> cout << "Each will be " << LENGTH << " chars long" <<endl;
> LENGTH = LENGTH + 1;
>
> //Define the 2 arrays, planet names and distances
> char name[LENGTH];
> char planet[MAX][LENGTH];
> int distance[MAX];
> int DIST;
> int index = 0;
cin.ignore(10,'\n'); // skip 10 chars until reaches '\n'
>
> while (index < MAX)
> {
> cout << index << endl; //I put this in here to show that it
> skipped the value 0
> cin.getline(name,LENGTH);
> strcpy(planet[index],name);
> index++;
> }
>
> index = 0;
>
> for (index = 0; index < MAX; index++)
> {
> cout << endl << planet[index] << endl;
> }
>
> system("PAUSE");
> return(0);
> }
> ============================================
--
Greetings,
Balázs
|
|
From: Vlada D. <dj...@im...> - 2003-01-28 07:48:14
|
I found the error, it was a missing bracket. Thanks for your effort.
----- Original Message -----
From: "Jörgen" <qa...@ho...>
To: "Vlada Djurovic" <dj...@im...>;
<dev...@li...>
Sent: Monday, January 27, 2003 4:34 PM
Subject: Re: [Dev-C++] How to use WSAGetLastError?
The only difference in your code compared to mine is this.
Your code:
if(bind(sock,(struct sockaddr*)&server,sizeof(struct sockaddr))==-1)
My code:
if(bind(sock,(struct sockaddr*)&server,sizeof(server))==-1)
Hope it helps...
/J
*********** REPLY SEPARATOR ***********
On 2003-01-27 at 13:40 Vlada Djurovic wrote:
>Hi.
>I'm trying to create a WinSock app. I created a socket, but bind() returns
>an error, so I tried WSAGetLastError to get error code. Here's the code:
>
>case ID_SOCK_OPEN:
> {
> OpenSocket(PORT);//in this function I create socket
> int error=WSAGetLastError();
> char buffer[100];
> itoa(error,buffer,2);
> MessageBox(NULL,buffer,"Error Code",MB_OK);
> }
> break;
>In message box I get 0, so I suppose something is wrong about this. Can
>anybode tell me better way to get error code?
>Another question: Here's the code for OpenSocket function. Can somebody
>figure out why call to bind() fails?
>
>BOOL OpenSocket(int port)
>{
> if(sock=socket(AF_INET,SOCK_STREAM,0)==-1)
> {
> MessageBox(NULL,"Could not create
>socket","Error",MB_OK|MB_ICONSTOP);
> return FALSE;
> }
> server.sin_family=AF_INET;
> server.sin_port=htons(port);
> server.sin_addr.s_addr=INADDR_ANY;
>
> if(bind(sock,(struct sockaddr*)&server,sizeof(struct sockaddr))==-1)
> {
> MessageBox(NULL,"Bind error","Error",MB_OK|MB_ICONSTOP);
> return FALSE;
> }
>
> if(listen(sock,3)==-1)
> {
> MessageBox(NULL,"Listen error","Error",MB_OK|MB_ICONSTOP);
> return FALSE;
> }
> else
> {
> MessageBox(NULL,"Socket opened","Success",MB_OK);
> return TRUE;
> }
>}
>
>Thanks in advance.
>------------
>Vlada
>
>
>
>-------------------------------------------------------
>This SF.NET email is sponsored by:
>SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
>http://www.vasoftware.com
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
L
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld =omething 2 See!
http://www.vasoftware.com
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: Dany P. W. <da...@qu...> - 2003-01-28 03:54:14
|
They always say "There are no such thing as stupid questions, just
plenty of inquisitive idiots" but here it goes........
I'm still a complete beginner in C++ and programming in general. I've
written yet another silly little code to get used to the syntax and
arrays. I was going to use parallel arrays but so far have only tried to
use a single array. Something is causing me problems. The "while" loop
ignored the first "index" value of 0 and jumped to the second value of 1
before executing the commands within that loop. I've tried using a "for"
loop with no success either.
Can someone try this out and tell me what I've missed? Much
appreciated...........
============================================
#include <iostream>
#include <string>
#define TAB '\t'
main()
{
using namespace std;
//Define how many planets there are
int MAX;
cout << "Enter the number of planets: ";
cin >> MAX;
//Define max length of planet names
int LENGTH;
cout << "Enter max length of planet names: ";
cin >> LENGTH;
cout <<"There will be " << MAX << " planets" <<endl;
cout << "Each will be " << LENGTH << " chars long" <<endl;
LENGTH = LENGTH + 1;
//Define the 2 arrays, planet names and distances
char name[LENGTH];
char planet[MAX][LENGTH];
int distance[MAX];
int DIST;
int index = 0;
while (index < MAX)
{
cout << index << endl; //I put this in here to show that it
skipped the value 0
cin.getline(name,LENGTH);
strcpy(planet[index],name);
index++;
}
index = 0;
for (index = 0; index < MAX; index++)
{
cout << endl << planet[index] << endl;
}
system("PAUSE");
return(0);
}
============================================
--
This mail is a natural product. The slight variations in
spelling and grammar enhance its individual character and
beauty and in no way are to be considered flaws or defects.
|
|
From: Ioannis V. <no...@ho...> - 2003-01-28 01:16:57
|
------Original Message-------=0D =0D From: Per Westermark=0D Date: Sunday, 19 January 2003 10:48:26 PM=0D To: j b=0D Cc: dev...@li...=0D Subject: Re: [Dev-C++] atof 2...=0D =0D Hello!=0D =0D Don't use atof() for converting from text string to a double.=0D =0D Use strtod() instead, since it will inform you how many characters it=0D consumed.=0D =0D =0D =0D =3D=3D> What about sscanf()?=0D =0D =0D =0D Ioannis Vranos=0D =0D * Programming pages: http://www.noicys.freeurl.com=0D * Alternative URL: http://run.to/noicys=20 |
|
From: Ioannis V. <no...@ho...> - 2003-01-28 01:08:28
|
-------Original Message-------=0D =0D From: Per Westermark=0D Date: =D4=F1=DF=F4=E7, 28 =C9=E1=ED=EF=F5=DC=F1=E9=EF=F2 2003 3:01:54 =F0= =EC=0D To: Ioannis Vranos=0D Cc: dev...@li...=0D Subject: Re: [Dev-C++] STL::Vector=0D =0D One point about putting a 'naked' pointer into different kind of=0D containers, is that the pointer doesn't have a destructor to release the=0D referenced memory.=0D =0D /Per W=0D =0D =0D =3D=3D> I agree with that, including built in arrays. So he must delete o= bjects pointed by pointers manually. This doesn't mean anything however against using vectors of pointers in place of built in arrays with pointers.=0D =0D =0D Ioannis Vranos=0D =0D * Programming pages: http://www.noicys.freeurl.com=0D * Alternative URL: http://run.to/noicys=20 |
|
From: Per W. <pw...@ia...> - 2003-01-28 01:03:07
|
One point about putting a 'naked' pointer into different kind of containers, is that the pointer doesn't have a destructor to release the referenced memory. /Per W On Tue, 28 Jan 2003, Ioannis Vranos wrote: > -------Original Message------- > > From: Michael Stather > Date: =C4=E5=F5=F4=DD=F1=E1, 27 =C9=E1=ED=EF=F5=DC=F1=E9=EF=F2 2003 6:09:= 30 =EC=EC > To: dev...@li... > Subject: [Dev-C++] STL::Vector > > Included with Dev-C++ are the STL classes, among which I found "vector". > I need it to get a dynamic array in my program. > > > =3D=3D> Good, and always use vector and standard containers instead of bu= ilt in > arrays. > > > > Now I read in a book that I shouldn=B4t put pointers in STL classes, but = I > don=B4t understand why. > > > =3D=3D> Apparently the book is stupid. Bad advice. Probably it meant to a= void > using pointers whenever you can, but this is very different than to not u= se > vectors with pointers (in case you can't avoid pointers). > > > > > Could someone please explain me why, an |
|
From: <or...@vp...> - 2003-01-28 00:47:11
|
Hello! in...@se... wrote: > dev-c++ ver. 4.9.7.9 with GCC 3.2 produce about 96,4Kb Exe > and Dev-C++ 4.9.4.1 with GCC 2.95.3-6 produce about 4.5Kb Exe > that is about 20 times more . is that to optimized code > i test that with simple Windows App included with both version of Dev-c++ I have noticed that too, and after I took a look at the exe, I found things that only debug compile does (puts source in exe). Also the debug and optimized compile creates same sized exes. So I suppose g++ has debug compile mode turned on automatically, but I will have to look after it... -- Greetings, Balázs |
|
From: Ioannis V. <no...@ho...> - 2003-01-28 00:00:59
|
-------Original Message-------=0D =0D From: Esteban Valverde=0D Date: =C4=E5=F5=F4=DD=F1=E1, 27 =C9=E1=ED=EF=F5=DC=F1=E9=EF=F2 2003 8:52:= 22 =EC=EC=0D To: dev-cpp=0D Subject: Re: [Dev-C++] why not includes the latest gcc-2.95.3-8=0D =0D xuesong chen wrote:=0D > from what you said I am sure that you are an idiot absolutely.=0D > I downloaded the source code of the sample windows driver from internet= =2E=0D > the code was very simple.I know the gcc story as redhat spoke it out.=0D > you moron shut up!!!=0D >=0D =0D I suppouse that this forum is to help us. When someone make questions,=0D others can simple delete the questions from their message box and don't h= elp=0D at all. If others make answers is only for help... without any personal=0D interest. This is independly from how many experience have any of us.=0D =0D So, Xuesong Chen, if you are an idiot absolutely and a fucking moron shut= =0D up, please send an unsuscribe mail to this forum...=0D =0D =0D =0D =3D=3D> This message does not help too. And xuesong was not the first who insulted the other person.=0D =0D =0D =0D Ioannis Vranos=0D =0D * Programming pages: http://www.noicys.freeurl.com=0D * Alternative URL: http://run.to/noicys=20 |
|
From: Ioannis V. <no...@ho...> - 2003-01-27 23:55:33
|
-------Original Message-------=0D =0D From: Michael Stather=0D Date: =C4=E5=F5=F4=DD=F1=E1, 27 =C9=E1=ED=EF=F5=DC=F1=E9=EF=F2 2003 6:09:= 30 =EC=EC=0D To: dev...@li...=0D Subject: [Dev-C++] STL::Vector=0D =0D Included with Dev-C++ are the STL classes, among which I found "vector".=0D I need it to get a dynamic array in my program.=0D =0D =0D =3D=3D> Good, and always use vector and standard containers instead of bu= ilt in arrays.=0D =0D =0D =0D Now I read in a book that I shouldn=B4t put pointers in STL classes, but = I don=B4t understand why.=0D =0D =0D =3D=3D> Apparently the book is stupid. Bad advice. Probably it meant to a= void using pointers whenever you can, but this is very different than to not u= se vectors with pointers (in case you can't avoid pointers).=0D =0D =0D =0D =0D Could someone please explain me why, and whether there are other possibilities to creae a dynamic array of pointers?=0D =0D =0D =3D=3D> There are other standard library containers too, but since you wa= nt an=20 array of pointers" vector is the best choice.=0D =0D =0D =0D Ioannis Vranos=0D =0D * Programming pages: http://www.noicys.freeurl.com=0D * Alternative URL: http://run.to/noicys=20 |
|
From: Ioannis V. <no...@ho...> - 2003-01-27 23:51:09
|
-------Original Message-------=0D
=0D
From: Esteban Valverde=0D
Date: =C4=E5=F5=F4=DD=F1=E1, 27 =C9=E1=ED=EF=F5=DC=F1=E9=EF=F2 2003 5:53:=
21 =EC=EC=0D
To: dev-cpp=0D
Subject: [Dev-C++] printf=0D
=0D
Hi, I wish to overload the printf function to do the same thing plus othe=
rs,=0D
just like...=0D
=0D
void myprintf ( const char *format, ... )=0D
{=0D
// I do my work here=0D
=0D
printf( format, ... );=0D
}=0D
=0D
=0D
=3D=3D> This is not overloading, this is an ordinary separate function us=
ing
printf().=0D
=0D
=0D
=0D
How must I do to pass the variable argument list (...) from the definitio=
n=0D
of myprintf to the printf function ?=0D
=0D
=0D
=3D=3D> As you process arguments in all variadic functions (using pointer=
s).
However making your "printf()" will be much pain because you must process
all the arguments in const char *format.=0D
=0D
=0D
Ioannis Vranos=0D
=0D
* Programming pages: http://www.noicys.freeurl.com=0D
* Alternative URL: http://run.to/noicys=20 |
|
From: Danny R. <dro...@ho...> - 2003-01-27 22:16:02
|
Hi,
The following.. i managed to add a bitmap to the background of the first =
screen, i even managed to add
text to that screen but it seems that i cant do both..=20
----
case WM_CREATE:
static HBITMAP hBmBg;
hBmBg =3D LoadBitmap(GetModuleHandle(NULL),
MAKEINTRESOURCE(IDBM_WELCOME_BG));
----
This will load a bitmap image i defined in the resource into the first =
window i created.=20
----
RECT rt;
hdc =3D BeginPaint(hwndwelcome, &ps);
GetClientRect(hwndwelcome, &rt);
SetBkMode(hdc,TRANSPARENT);
// SetRect(&rt,50,50,200,200);
SetTextColor(hdc, RGB(0,0,0));
DrawText(hdc, TEXT("blabalabalalala"),-1, &rt,0);
EndPaint(hwndwelcome, &ps);
----
With this i am able to write text to the screen..=20
But somehow, whatever i do.. the one over rules the other one..=20
how can i write text on that background image??..
I dont expect sources but can some give me a direction where i have to =
look for.. must do some things before
ShowWindow(hwndwelcome, nFunsterStil);
or after but not at the section WM_CREATE when handeling msg
s.. ?
|
|
From: <in...@se...> - 2003-01-27 22:11:03
|
dev-c++ ver. 4.9.7.9 with GCC 3.2 produce about 96,4Kb Exe and Dev-C++ 4.9.4.1 with GCC 2.95.3-6 produce about 4.5Kb Exe that is about 20 times more . is that to optimized code i test that with simple Windows App included with both version of Dev-c++ |
|
From: <or...@vp...> - 2003-01-27 21:26:50
|
Szervusz! Neszt Tibor wrote: > Could anyone tell me a simply mode to get the size of the windows desktop? You can read the docs about the GetSystemMetrics() function. It can get you a lot of things (without using RECTs). > All help is welcome! Szívesen :) -- Greetings, Balázs |
|
From: Esteban V. <est...@ho...> - 2003-01-27 18:51:30
|
xuesong chen wrote: > from what you said I am sure that you are an idiot absolutely. > I downloaded the source code of the sample windows driver from internet. > the code was very simple.I know the gcc story as redhat spoke it out. > you moron shut up!!! > I suppouse that this forum is to help us. When someone make questions, others can simple delete the questions from their message box and don't help at all. If others make answers is only for help... without any personal interest. This is independly from how many experience have any of us. So, Xuesong Chen, if you are an idiot absolutely and a fucking moron shut up, please send an unsuscribe mail to this forum... Esteban |
|
From: Santiago P. C. <San...@yd...> - 2003-01-27 18:46:17
|
Hi,
Shouldn't this line:
LPRECT lpDeskRect =(LPRECT) malloc( sizeof(LPRECT) );
^^^^^^
be changed to something like this:
LPRECT lpDeskRect =(LPRECT) malloc( sizeof(RECT) );
Regards,
~Santy
-----Original Message-----
From: veenurs [mailto:ve...@ma...]
Sent: lunes, 27 de enero de 2003 19:12
To: Neszt Tibor
Cc: dev...@li...
Subject: Re: [Dev-C++] win desktop x,y size
It's like this :
HWND hwnDesk=GetDesktopWindow( );
LPRECT lpDeskRect =(LPRECT) malloc(sizeof(LPRECT) );
BOOL bDeskDim= GetWindowRect(
hwnDesk, // handle to window
lpDeskRect // address of structure for window coordinates
);
if(!bDeskDim )
MessageBox(NULL, "Could Not Get Desktop Dimensions!", "Error!",
MB_ICONEXCLAMATION | MB_OK);
else {
LONG lright =lpDeskRect->right ;
LONG lbottom =lpDeskRect->bottom ;
Hope it helps .
-rahul .
Neszt Tibor wrote:
Hello!
Could anyone tell me a simply mode to get the size of the windows desktop?
All help is welcome!
Regards,
Neszt Tibor
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
--------------------------------------------------------------------------------------
This message and any files transmitted with it are confidential and intended solely
for the use of the individual or entity to whom they are addressed. No confidentiality
or privilege is waived or lost by any wrong transmission.
If you have received this message in error, please immediately destroy it and kindly
notify the sender by reply email.
You must not, directly or indirectly, use, disclose, distribute, print, or copy any
part of this message if you are not the intended recipient. Opinions, conclusions and
other information in this message that do not relate to the official business of
Ydilo Advanced Voice Solutions, S.A. shall be understood as neither given nor endorsed by it.
--------------------------------------------------------------------------------------
|
|
From: Christer G. <dt...@st...> - 2003-01-27 18:37:32
|
xuesong chen wrote: > from what you said I am sure that you are an idiot absolutely. > I downloaded the source code of the sample windows driver from internet. > the code was very simple.I know the gcc story as redhat spoke it out. > you moron shut up!!! > Oh, I`m sorry, i meant no offence. But the new gcc /is/ better. It generates better code. Somethings also need re-coding. Not everything is compatible with gcc-3x. Take a look at http://gcc.gnu.org/onlinedocs/ and find the diffrence. I`m sure you would find what seems missing in your code. GCC 3.x is the new generation gcc-compiler, either you like it or not. -- Med Vennlig Hilsen / Best regards Christer Gundersen / dizzy tun3Z http://dtz.cjb.net - http://carebears.mine.nu |