dev-cpp-users Mailing List for Dev-C++ (Page 337)
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: Graham <sai...@bi...> - 2003-08-01 13:43:25
|
I did look at the FAQ this is where I found the Pause suggestion my question was can I prevent the window closing with a setting in DEV-C When I was learning other languages and using JGrasp for instance it could be set to not close the window so that the output could be viewed. This was not done by code added on the end each time but was done by a setting in JGrasp ... I was hoping it was possible to change a setting in DEV-C to achieve this. I could not find an answer in the FAQ and wondered if anyone here could assist. Please forgive me if this is not the correct forum for such a question. regards Graham |
|
From: Ferretallica E. <fer...@ho...> - 2003-08-01 12:47:59
|
I honestly wouldn't worry too much about it. I tried a bare-bones OpenGL window with only a FPS counter using sprintf on my own computer (P4 2Ghz, GeForce Ti4400, 1Gb RAM) and I was getting a consistant 62FPS in both full screen and windowed modes. On my girlfriend's computer at the moment (P3 1Ghz, 128Mb RAM, 16Mb generic video card) the exact same program is getting an average 700-800FPS in windowed mode and as high as 1200FPS in full screen mode. Rather than assume sprintf is evil and the cause of your 50FPs, try calling sprintf 20 times in each frame. If your result is still 50FPS like I'm guessing will be the case, it's not sprintf which is slowing things down. Buggered if I know what is though... Re: Depends if you are writing to windows or within your opengl app I wouls think. I know DirectX has classes for writing to its screen and things. >From: Neszt Tibor <ne...@ss...> >To: dev...@li... >Subject: [Dev-C++] sprintf - 50fps >Date: Thu, 31 Jul 2003 10:52:59 +0200 (MET DST) > >Hello! > >#1: > Should I use the sprintf within an opengl application? I'm worrying about >the speed. Is sprintf taking a long time? (As I tried it, I can not feel >any fall-off) > >#2: > Am I know right, that the last stable version of dev-c++ is the 4.0? What >about the new stable versions? (I mean, not beta) > >#3: > How to force the dev-c++ to generate .o file to from every .c included >file? I think, this could make speed up the compiling process. > > >Thanks Your help in advance, > >Regards, > >Neszt Tibor > > > >------------------------------------------------------- >This SF.Net email sponsored by: Free pre-built ASP.NET sites including >Data Reports, E-commerce, Portals, and Forums are available now. >Download today and enter to win an XBOX or Visual Studio .NET. >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ On the move? Get Hotmail on your mobile phone http://www.msn.co.uk/msnmobile ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ Hotmail is now available on Australian mobile phones. Go to http://ninemsn.com.au/mobilecentral/signup.asp |
|
From: <or...@vp...> - 2003-08-01 11:31:43
|
Graham wrote:
> I have installed Dev-C under Win XP Pro
> and am running the traditional "Hello World" as the first exercise in my
> tutorial.
> When it is compiled and run it instantly closes the window after
> printing to the screen. I therefore cant see the output.
> Is there a way to change this with a setting of DEV-C or will I have to
> put up with adding some sort of pause statement at the end of everything
> I write?
>
> my code looks like this
> /*
> *Hello, "Hello World.\n"
> */
> #include <iostream>
> int main ()
> {
> cout<<"Hello, world.\n";
> return 0;
> }
This is indeed a VVVVVFAQ (very-very-very-very-...).
BTW this is absolutely NORMAL behaviour. To make the dos-prompt stay,
you need to pause your program at the end. Use this line before return:
getc();
This will wait for an "Enter".
(I don't like system("PAUSE"), as that is platform-dependent).
--
Greetings,
Balázs
|
|
From: Dondolo M. <MDo...@OL...> - 2003-08-01 10:46:04
|
Hi All. can any body help me. to map to a network drive , via the command prompts, one would go to Start--->>Run and then type the following: net use g:\\SeverName\Sharename where ServerName and ShareName is the what you want to map to 1)How can I write this command as a program such that 2)does anybody know how to read system time/clock. |
|
From: Graham <sai...@bi...> - 2003-08-01 10:45:43
|
I have installed Dev-C under Win XP Pro
and am running the traditional "Hello World" as the first exercise in my tutorial.
When it is compiled and run it instantly closes the window after printing to the screen. I therefore cant see the output.
Is there a way to change this with a setting of DEV-C or will I have to put up with adding some sort of pause statement at the end of everything I write?
my code looks like this
/*
*Hello, "Hello World.\n"
*/
#include <iostream>
int main ()
{
cout<<"Hello, world.\n";
return 0;
}
regards
Graham (on L Plates)
|
|
From: Michal M. <mi...@mo...> - 2003-08-01 07:34:21
|
Andrew Sherman wrote: > I get this problem: > > 'asprintf' undefined in this function. > > I took out #include<libierty.h> because there is no > header file with that name, only a '.a' file? > > Can anyone help? probably easiest is to download the libiberty header file and put it to include directory http://molhanec.net/libiberty.h |
|
From: Daniel G. <sp...@ho...> - 2003-08-01 06:49:16
|
Hey that looks useful from the description - I for one will look at that! >From: "Yeoh HS" <ye...@ye...> >Reply-To: "Yeoh HS" <ye...@ye...> >To: <ci...@ya...>, "Dev-C Mailing List" ><dev...@li...> >Subject: Re: [Dev-C++] Quick flat-file searching and I/O >Date: Fri, 1 Aug 2003 10:15:51 +0800 > >----- Original Message ----- >From: "David McKen" <ci...@ya...> > > Application is used to store world data for a game. We wish > > to use mySQL (or some other SQL database) as well asbe able > > to store data in flat-files. > >For a database, you might want to check out SQLite. > >Here's some info from its website. >"SQLite is a C library that implements an embeddable SQL database engine. >Programs that link with the SQLite library can have SQL database access >without running a separate RDBMS process. SQLite is not a client library >used to connect to a big database server. SQLite is the server. The SQLite >library reads and writes directly to and from the database files on disk." > >The URL is: >http://www.sqlite.org > > >Best Regards, >Yeoh >-- > > > > >------------------------------------------------------- >This SF.Net email sponsored by: Free pre-built ASP.NET sites including >Data Reports, E-commerce, Portals, and Forums are available now. >Download today and enter to win an XBOX or Visual Studio .NET. >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ Express yourself with cool emoticons - download MSN Messenger today! http://www.msn.co.uk/messenger |
|
From: Daniel G. <sp...@ho...> - 2003-08-01 06:36:55
|
Depends if you are writing to windows or within your opengl app I wouls think. I know DirectX has classes for writing to its screen and things. >From: Neszt Tibor <ne...@ss...> >To: dev...@li... >Subject: [Dev-C++] sprintf - 50fps >Date: Thu, 31 Jul 2003 10:52:59 +0200 (MET DST) > >Hello! > >#1: > Should I use the sprintf within an opengl application? I'm worrying about >the speed. Is sprintf taking a long time? (As I tried it, I can not feel >any fall-off) > >#2: > Am I know right, that the last stable version of dev-c++ is the 4.0? What >about the new stable versions? (I mean, not beta) > >#3: > How to force the dev-c++ to generate .o file to from every .c included >file? I think, this could make speed up the compiling process. > > >Thanks Your help in advance, > >Regards, > >Neszt Tibor > > > >------------------------------------------------------- >This SF.Net email sponsored by: Free pre-built ASP.NET sites including >Data Reports, E-commerce, Portals, and Forums are available now. >Download today and enter to win an XBOX or Visual Studio .NET. >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ On the move? Get Hotmail on your mobile phone http://www.msn.co.uk/msnmobile |
|
From: Ed C. <em...@to...> - 2003-08-01 03:44:07
|
>did you not say the MS tutorial compiled? does that not connect? It does compile (after a few modifications - it had some botched includes), but it exits without an error or anything. I've tried setting breakpoints and stepping into it, so I isolated the point at which it exits (on an "if" statement to determine if the query was successful, but I don't know which fork of the "if" it's following - it just exits and never makes it to the "if" commands OR the "else" commands). No dialog box or message box, no error message, nothing. Plus, it only demonstrates doing it with a DSN. The nature of this project demands that it be done without a DSN (because there are two many databases and too many client machines involved, and neither is expected to stay at all constant in number). -Ed -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Daniel Glenfield Sent: Thursday, July 31, 2003 11:49 AM To: em...@ed...; dev...@li... Subject: RE: [Dev-C++] OT: Connecting to FoxPro databases with a DSN did you not say the MS tutorial compiled? does that not connect? >From: "Ed Cottrell" <em...@ed...> >To: <dev...@li...> >Subject: RE: [Dev-C++] OT: Connecting to FoxPro databases with a DSN >Date: Thu, 31 Jul 2003 09:53:58 -0400 > > > Do you get a connection to the database? If so can you perform a > > simple >SQL > >That's just it - I don't know how to connect to the database from C or >C++. I know the database end of things (SQL, recordsets, all that); I >just don't know how to access the database, at all, with C code. > >-Ed > > > > >From: "Ed Cottrell" <em...@to...> > >To: "'Dev-C++ users'" <dev...@li...> > >Subject: [Dev-C++] OT: Connecting to FoxPro databases with a DSN > >Date: Wed, 30 Jul 2003 16:26:37 -0400 > > > >Hi all - > > > >I know this is not a Dev-C++ post, but I'm a little new to C and am > >desperate for help. I have to convert a Visual Basic program (which I > >wrote) > >to C or C++, the primary purpose of which is to collate information > >from a bunch of databases - currently 12 Foxpro and 1 MySQL - without > >using DSNs. > > > >What I need is for somebody to point me to a resource on how to work > >with the Foxpro ODBC driver from a C/C++ program; the tutorial on > >Microsoft's MSDN site compiled (after some tweaks), but doesn't > >produce any output, and I can't find seem to find the errors. > > > >Many thanks! > > > >-Ed > > > > > >President > >Topsail Consulting, Inc. > >em...@to... > >http://www.topsailconsulting.com > > > >Phone/Fax: 770-719-3332 > >Cell: 404-328-8503 > >155 Shamrock Drive > >Fayetteville, GA 30215-2810 > > > > > > > > > > > >------------------------------------------------------- > >This SF.Net email sponsored by: Free pre-built ASP.NET sites > >including Data Reports, E-commerce, Portals, and Forums are available > >now. Download today and enter to win an XBOX or Visual Studio .NET. > >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303 > >_0 > >1/01 > >_______________________________________________ > >Dev-cpp-users mailing list > >Dev...@li... > >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > >_________________________________________________________________ >On the move? Get Hotmail on your mobile phone >http://www.msn.co.uk/msnmobile > > > >------------------------------------------------------- >This SF.Net email sponsored by: Free pre-built ASP.NET sites including >Data Reports, E-commerce, Portals, and Forums are available now. >Download today and enter to win an XBOX or Visual Studio .NET. >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_0 >1/01 >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > >------------------------------------------------------- >This SF.Net email sponsored by: Free pre-built ASP.NET sites including >Data Reports, E-commerce, Portals, and Forums are available now. >Download today and enter to win an XBOX or Visual Studio .NET. >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_0 >1/01 >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ Hotmail messages direct to your mobile phone http://www.msn.co.uk/msnmobile ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: FerretallicA <fer...@ho...> - 2003-08-01 03:01:12
|
Is there a 'proper' way to make an OpenGL app scale properly when you resize it's host window to a different Height:Width ratio? I would have imagined it would be as simple as the following line- gluPerspective(45.0f,(GLfloat)(App.Window.Width / App.Window.Height),0.1f,100.0f); Instead it results in the scene scaling when resized vertically, and only showing more or less of the scene when resized horizontally. |
|
From: Yeoh H. <ye...@ye...> - 2003-08-01 02:44:21
|
----- Original Message ----- From: "Ed Cottrell" <em...@ed...> That's just it - I don't know how to connect to the database from C or C++. I know the database end of things (SQL, recordsets, all that); I just don't know how to access the database, at all, with C code. -Ed Hi, I have written an example program that shows how to access Microsoft Access databases using Dev-C++ without requiring the end-user to set up a DSN.. By changing the connection string, you should be able to access FoxPro databases. To download the free example program, the URL is: http://www.yeohhs.com/free/portal.asp Best Regards, Yeoh -- P.S. More free downloads for Dev-C++ users at http://www.yeohhs.com |
|
From: Yeoh H. <ye...@ye...> - 2003-08-01 02:19:59
|
----- Original Message ----- From: "David McKen" <ci...@ya...> > Application is used to store world data for a game. We wish > to use mySQL (or some other SQL database) as well asbe able > to store data in flat-files. For a database, you might want to check out SQLite. Here's some info from its website. "SQLite is a C library that implements an embeddable SQL database engine. Programs that link with the SQLite library can have SQL database access without running a separate RDBMS process. SQLite is not a client library used to connect to a big database server. SQLite is the server. The SQLite library reads and writes directly to and from the database files on disk." The URL is: http://www.sqlite.org Best Regards, Yeoh -- |
|
From: Andrew S. <zep...@ya...> - 2003-08-01 00:48:28
|
I get this problem: 'asprintf' undefined in this function. I took out #include<libierty.h> because there is no header file with that name, only a '.a' file? Can anyone help? __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com |
|
From: David M. <ci...@ya...> - 2003-07-31 17:23:31
|
Application is used to store world data for a game. We wish to use mySQL (or some other SQL database) as well asbe able to store data in flat-files. My biggest problem with flat-files is what would be the best way to store and search such a system of files (a reccomendation, though not a requirement is that the files remain in plain text. The current format is the SMAUG world data format (I can send an example file if you want). Rooms, objects and mobiles are each indexed by an integer value between 0 and 4 billion (2^32 to be exact). A room and a object or mobile can have the same vnum but 2 rooms cannot have the same vnum (same applies to objects and mobiles). In other words the index for rooms / objects / mobiles are separate. Currently the files are sorted and (poorly) indexed. The indexing essentially sets a limit to the contents of a file (i.e. xxx.are contains all rooms/objects/mobiles whose vnums are between x and y, with y-x = 1000) The current system involves loading everything into memory and accessed from there (thus removing the slowdown). Problem is with only ~6000 rooms we are using 12Mb of RAM. Even with virtual memory we are going to start running out of memory as the world gets bigger (for those of you who are about to curse me out for such an inefficient design, please note it is not mine). So far the best solution is to use the room exits. When you enter a room all the rooms connected to it and all the associated objects and mobiles are loaded. That way when the player actually request to go to the next room it is already loaded. Problem is there are 11 possible exits (up, down and in the 8-point cardinal directions as well as through a portal). Unfortunately this means I have a very low chache hit-miss ratio (1:11) is not good odds. Also immortals (as well as some players) have skills that can take them to a random room in the world (there by bypassing my caching system). My question is does anyone know either an algorithm or a library that will allow me to use flat-files fast enough that I don't have to load up everything into memory. I do not require it to handle 4 billion rooms/mobs/objects but be able to handle about 1 million (if they want to go higher they upgrade to mySQL) ===== Signed David Mcken Life Sucks Live with it __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com |
|
From: <ri...@te...> - 2003-07-31 17:04:51
|
Tom Craig wrote:
>It switches the view from the active header file to the C or CPP file of the
>same name, or vice versa - e.g. from xyz.h to xyz.cpp (or xyz.c), or from
>xyz.c/cpp to xyz.h. It's also available if you right-click on your code.
>
>Quite useful, I find.
>
>--Tom
>
>
Well, all is clear now :)
And yes, I think it is useful too. Very thanks.
--
---------------------------------------------------
Ricardo Amores Hernández
ICQ: 19463735
MSN: zheo_ (at) hotmail (dot) es
---------------------------------------------------
|
|
From: David M. <ci...@ya...> - 2003-07-31 16:55:41
|
Thanks for pointing that out..
There is no particular reason for keeping the algorithm.
I just like using less code, this method seems to use more.
(You have the original function and a functor now).
I have another question considering files but I think I
better start another thread for that.
Signed
David Mcken
--- Hossein Haeri <ult...@em...> wrote:
> Hi David,
>
> > Some interesting ideas there. ...
>
> Some? Just some? Oh my Goodness! Thanks for that! I could
> except any
> description expect that one.
>
> > ... You are right I am not too
> > familar with the
> > STL.
>
> You will become! For now on, just don't panic when you
> see powerful
> STL codes.
>
> > ... What is the difference
> > between passing a
> > refrence and passing a const refrence? Is that to
> ensure
> > that the original
> > can never be changed(as would happen of I passed by
> value)?
>
> Hmmm... Yep in the sense that the original beast wouldn't
> be changed,
> but nop in the sense that there is big differnce between
> passing by
> value and passing by reference: The former copies the
> argument at the
> moment of being called, whilst the later doesn't copy,
> it, in turn,
> works on the same object, by creating a reference out of
> the
> argument.
>
> > My other comment is that current_players is a member of
> > pc_char. It is
> > static and thus shared by all instances of pc_char. So
> I am
> > guessing the
> > function signature stays the same.
>
> Well, if you mean the same as what it now is, yes, it
> does. But the
> important point here is that this is the first time I see
> a class
> having a map (in fact, a container) of pointers to
> itself. My
> recommendation is to change this strange design, unless
> you have
> very plausible reasons for adhering to it. It is very
> likely to
> result in sophisticated problems that are all hard to
> debug. (Amongst
> them, one of the most important and vexing ones is the
> "Circular
> Dependancies" problem.)
>
>
> > From the looks of it using for_each may not be worth it
> > especially since the
> > function is not finished.
>
> I read the bellow changes you want to be made. From my
> viewpoint,
> that doesn't difere much the dicision wheather to use or
> not to use
> for_each. Assuming that you are going to do the changes,
> you still can adhere to for_each. Especially because,
> that way, the only
> change is needed to be done is inside that Functor, and
> no where
> else. (Read on ...)
>
> > ...
> > void pc_char::write_to_all_pc(const string& to_send,
> bool
> > add_eoln)
> > {
> > for(map<string, pc_char *>::iterator i =
> > current_players.begin();
> > i != current_players.end(); ++i)
> > if((*i).second != this)
> > (*i).second->write_to_player(to_send, add_eoln);
> > }
>
> At the moment beeing, the only very subtle bug I can see
> in it is the
> one in the following line:
>
> > if((*i).second != this)
>
> Just think about it for a moment. You are storing
> pc_char* objects
> in that map, right? But you are, probabely, just working
> with a copy
> of the addresses of the original objects, huh? So those
> nifty-looking
> pointers, which are beeing stored in the map, and are
> objects by
> themselves, are copies of the "this" objects, and not the
> same ones!
> Hence, althouge they point to the same location in the
> memory, they
> are not the same, by themselves. Therefore, it is very
> likely that
> the test fails, even if the semantic is right. In fact,
> you should be
> very lucky if the code works. The solution I suggest (if
> it is OK
> under your algorithm), is to replace it with the
> following one.
>
> if(*(i->second) != (*this))
>
> This way, you are checking if they are pointing to the
> same location,
> and not if they are the same pointers! (And that's
> presumably what
> you need!)
>
> > With respect to the books. I will look into getting my
> > hands on a copy.
>
> Do it, ASAP.
>
> Regards,
> --Hossein
=====
Signed
David Mcken
Life Sucks
Live with it
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
|
|
From: <ten...@ne...> - 2003-07-31 16:54:57
|
Just now I came back to my pad trial to make it recognize UNIX text files and DOS text files, so it displays UNIX files correctly in lines, not one hugh file with black rectangles, an so I substitute notepad with it as the default text file program. It works perfectly . But I found one unconsistency: I wrote two functions, addret and remret, both receive LPTSTR and int&. addret work perfect, I do, in pesudocode: Count \n in the string. Hold the new sizeof the string in variable resize. Allocate space for the extended string. Cycle through the string from beginning to end searching for \n. When I found one I move from there ot end one byte right, from end to the place. Put a \r there. size = resize. Put a '\0' in [resize], although there is yet a '\0'. The result is the desired: I get the UNIX file displayed in lines, with all \n tranfromed in \r\n. The "problem" arises in remret: I count the number of \n (or \r, they're the same). I get the new size in resize. I search for \r, from start to end. When I find it I move all bytes from there to end one byte left. I GlobalRealloc to resize + 1. I make [resize] '\0'. I make size = resize. Now the string is converted to UNIX, where there was a \r\n now there is a \n: but the text has being cut in size - resize characters. Just as if \r\n were only one byte. If I comment the realloc and the [resize] \0, then it works perfect: all the text is converted to UNIX and there is the complete text. Another thing I noticed (I did it as it must, but shouldn't, be done not after seeing that the way it should doesn't work right): GetWindowTextLength retireves the control text length, without the \0 (or even if it includes it). Then GetWindowText retrieves the text of the control until reach the limit set by the third parameter. Nothing is said about the null end character. But consistency demands that if you pass the value retruned by the first function to the second, this will give you the full text (both include or not the end null character). Well, it doesn't: it places a \0 at the last character or doesn't read it, so it cuts the last character, if you really want retrieve the full text you shall add 1 to that value: length = GetWindowTextLength(GetDlgItem(hwnd, ID_EDIT)); text = (LPTSTR)GlobalAlloc(GPTR, length + 1); text[length] = '\0'; GetWindowText(GetDlgItem(hwnd, ID_EDIT), text, length + 1); |
|
From: Tom C. <jat...@nt...> - 2003-07-31 16:27:21
|
"Ricardo Amores Hernández" <ri...@te...> writes: > Does anybody knows what that option (found in edition menu) is used > for? I could not found information about it in the help. It switches the view from the active header file to the C or CPP file of the same name, or vice versa - e.g. from xyz.h to xyz.cpp (or xyz.c), or from xyz.c/cpp to xyz.h. It's also available if you right-click on your code. Quite useful, I find. --Tom |
|
From: David M. <ci...@ya...> - 2003-07-31 16:19:39
|
Cool, thanks for your help
Signed
David Mcken
--- manilius <man...@gm...> wrote:
>
> Hi
>
> > Ok, the idea was to create all the possible
> combinations
> > (up to 100
> > characters long) using all the avalible characters in
> the
> > ascii character
> > set from 32 (space) to 126 (~) inclusive. When we try
> to
> > increment '~' we
> > end up getting a space and we increment the next
> character
> > in the string and
> > applying the same overflow rule.
>
> Okay, that would be one way to do it, but it does involve
> a lot of string
> manipulation (check a character and change it) which is
> not needed with
> recursion. Is there a special reason you want to use your
> "overflow
> algorithm"?
>
> If you want more characters with the recursion example I
> sent you, just add
> them to the character table:
>
> for( int i=0; i<92; i++) CharacterTable.push_back(' '+i);
>
> should include all characters you want.
> If you need zero-terminated strings, you can use the
> function c_str() of the
> std::string class to create them.
>
>
> But again: There is no way to create a list of all
> possible strings with the
> length of 100. You have
>
> (# of possible charcters)^length of the string
>
> possibilities. This results in a huge number (try
> calculate 92^100 :)
>
> ciao...
> ...manilius
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET
> sites including
> Data Reports, E-commerce, Portals, and Forums are
> available now.
> Download today and enter to win an XBOX or Visual Studio
> .NET.
>
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE:
> http://www23.brinkster.com/noicys/devcpp/ub.htm
>
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
=====
Signed
David Mcken
Life Sucks
Live with it
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
|
|
From: Hossein H. <ult...@em...> - 2003-07-31 16:12:47
|
Hi David,
> Some interesting ideas there. ...
Some? Just some? Oh my Goodness! Thanks for that! I could except any
description expect that one.
> ... You are right I am not too
> familar with the
> STL.
You will become! For now on, just don't panic when you see powerful
STL codes.
> ... What is the difference
> between passing a
> refrence and passing a const refrence? Is that to ensure
> that the original
> can never be changed(as would happen of I passed by value)?
Hmmm... Yep in the sense that the original beast wouldn't be changed,
but nop in the sense that there is big differnce between passing by
value and passing by reference: The former copies the argument at the
moment of being called, whilst the later doesn't copy, it, in turn,
works on the same object, by creating a reference out of the
argument.
> My other comment is that current_players is a member of
> pc_char. It is
> static and thus shared by all instances of pc_char. So I am
> guessing the
> function signature stays the same.
Well, if you mean the same as what it now is, yes, it does. But the
important point here is that this is the first time I see a class
having a map (in fact, a container) of pointers to itself. My
recommendation is to change this strange design, unless you have
very plausible reasons for adhering to it. It is very likely to
result in sophisticated problems that are all hard to debug. (Amongst
them, one of the most important and vexing ones is the "Circular
Dependancies" problem.)
> From the looks of it using for_each may not be worth it
> especially since the
> function is not finished.
I read the bellow changes you want to be made. From my viewpoint,
that doesn't difere much the dicision wheather to use or not to use
for_each. Assuming that you are going to do the changes, you still can adhere to for_each. Especially because, that way, the only
change is needed to be done is inside that Functor, and no where
else. (Read on ...)
> ...
> void pc_char::write_to_all_pc(const string& to_send, bool
> add_eoln)
> {
> for(map<string, pc_char *>::iterator i =
> current_players.begin();
> i != current_players.end(); ++i)
> if((*i).second != this)
> (*i).second->write_to_player(to_send, add_eoln);
> }
At the moment beeing, the only very subtle bug I can see in it is the
one in the following line:
> if((*i).second != this)
Just think about it for a moment. You are storing pc_char* objects
in that map, right? But you are, probabely, just working with a copy
of the addresses of the original objects, huh? So those nifty-looking
pointers, which are beeing stored in the map, and are objects by
themselves, are copies of the "this" objects, and not the same ones!
Hence, althouge they point to the same location in the memory, they
are not the same, by themselves. Therefore, it is very likely that
the test fails, even if the semantic is right. In fact, you should be
very lucky if the code works. The solution I suggest (if it is OK
under your algorithm), is to replace it with the following one.
if(*(i->second) != (*this))
This way, you are checking if they are pointing to the same location,
and not if they are the same pointers! (And that's presumably what
you need!)
> With respect to the books. I will look into getting my
> hands on a copy.
Do it, ASAP.
Regards,
--Hossein
--
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup
CareerBuilder.com has over 400,000 jobs. Be smarter about your job search
http://corp.mail.com/careers
|
|
From: Daniel G. <sp...@ho...> - 2003-07-31 15:49:26
|
did you not say the MS tutorial compiled? does that not connect? >From: "Ed Cottrell" <em...@ed...> >To: <dev...@li...> >Subject: RE: [Dev-C++] OT: Connecting to FoxPro databases with a DSN >Date: Thu, 31 Jul 2003 09:53:58 -0400 > > > Do you get a connection to the database? If so can you perform a simple >SQL > >That's just it - I don't know how to connect to the database from C or C++. >I know the database end of things (SQL, recordsets, all that); I just don't >know how to access the database, at all, with C code. > >-Ed > > > > >From: "Ed Cottrell" <em...@to...> > >To: "'Dev-C++ users'" <dev...@li...> > >Subject: [Dev-C++] OT: Connecting to FoxPro databases with a DSN > >Date: Wed, 30 Jul 2003 16:26:37 -0400 > > > >Hi all - > > > >I know this is not a Dev-C++ post, but I'm a little new to C and am > >desperate for help. I have to convert a Visual Basic program (which I > >wrote) > >to C or C++, the primary purpose of which is to collate information > >from a bunch of databases - currently 12 Foxpro and 1 MySQL - without > >using DSNs. > > > >What I need is for somebody to point me to a resource on how to work > >with the Foxpro ODBC driver from a C/C++ program; the tutorial on > >Microsoft's MSDN site compiled (after some tweaks), but doesn't produce > >any output, and I can't find seem to find the errors. > > > >Many thanks! > > > >-Ed > > > > > >President > >Topsail Consulting, Inc. > >em...@to... > >http://www.topsailconsulting.com > > > >Phone/Fax: 770-719-3332 > >Cell: 404-328-8503 > >155 Shamrock Drive > >Fayetteville, GA 30215-2810 > > > > > > > > > > > >------------------------------------------------------- > >This SF.Net email sponsored by: Free pre-built ASP.NET sites including > >Data Reports, E-commerce, Portals, and Forums are available now. > >Download today and enter to win an XBOX or Visual Studio .NET. > >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_0 > >1/01 > >_______________________________________________ > >Dev-cpp-users mailing list > >Dev...@li... > >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > >_________________________________________________________________ >On the move? Get Hotmail on your mobile phone >http://www.msn.co.uk/msnmobile > > > >------------------------------------------------------- >This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data >Reports, E-commerce, Portals, and Forums are available now. Download today >and enter to win an XBOX or Visual Studio .NET. >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > >------------------------------------------------------- >This SF.Net email sponsored by: Free pre-built ASP.NET sites including >Data Reports, E-commerce, Portals, and Forums are available now. >Download today and enter to win an XBOX or Visual Studio .NET. >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ Hotmail messages direct to your mobile phone http://www.msn.co.uk/msnmobile |
|
From: Ed C. <em...@ed...> - 2003-07-31 13:54:08
|
> Do you get a connection to the database? If so can you perform a = simple SQL=20 That's just it - I don't know how to connect to the database from C or = C++. I know the database end of things (SQL, recordsets, all that); I just = don't know how to access the database, at all, with C code. -Ed=20 >From: "Ed Cottrell" <em...@to...> >To: "'Dev-C++ users'" <dev...@li...> >Subject: [Dev-C++] OT: Connecting to FoxPro databases with a DSN >Date: Wed, 30 Jul 2003 16:26:37 -0400 > >Hi all - > >I know this is not a Dev-C++ post, but I'm a little new to C and am=20 >desperate for help. I have to convert a Visual Basic program (which I >wrote) >to C or C++, the primary purpose of which is to collate information=20 >from a bunch of databases - currently 12 Foxpro and 1 MySQL - without=20 >using DSNs. > >What I need is for somebody to point me to a resource on how to work=20 >with the Foxpro ODBC driver from a C/C++ program; the tutorial on=20 >Microsoft's MSDN site compiled (after some tweaks), but doesn't produce = >any output, and I can't find seem to find the errors. > >Many thanks! > >-Ed > > >President >Topsail Consulting, Inc. >em...@to... >http://www.topsailconsulting.com > >Phone/Fax: 770-719-3332 >Cell: 404-328-8503 >155 Shamrock Drive >Fayetteville, GA 30215-2810 > > > > > >------------------------------------------------------- >This SF.Net email sponsored by: Free pre-built ASP.NET sites including=20 >Data Reports, E-commerce, Portals, and Forums are available now.=20 >Download today and enter to win an XBOX or Visual Studio .NET.=20 >http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_0 >1/01 >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ On the move? Get Hotmail on your mobile phone = http://www.msn.co.uk/msnmobile ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including = Data Reports, E-commerce, Portals, and Forums are available now. Download = today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/= 01 _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: <ri...@te...> - 2003-07-31 13:53:10
|
Does anybody knows what that option (found in edition menu) is used for?
I could not found information about it in the help.
Thanks in advance, and sorry for my english :(
--
---------------------------------------------------
Ricardo Amores Hernández
ICQ: 19463735
MSN: zheo_ (at) hotmail (dot) es
---------------------------------------------------
|
|
From: Zodiaq <zo...@ac...> - 2003-07-31 10:28:52
|
Hello Neszt and all Dev-C++ users, Thursday, July 31, 2003, 10:52:59 AM, Neszt wrote as follows: NT> Hello! NT> #1: NT> Should I use the sprintf within an opengl application? I'm worrying about NT> the speed. Is sprintf taking a long time? (As I tried it, I can not feel NT> any fall-off) Maybe you could try ostringstream from C++ std namespace?? #include <sstream> static std::ostringstream some_text; //before every next use (after first ) you have to clear it: some_text.str( "" ); //to insert new text use standard stream insertion "<<" some_text << "some text, my fps are: " << fps << " fps"; //to format float and double data types to have only 2 digits after "." //use these: #include <iomanip> some_text << "some text, my fps are: " << std::fixed << std::setprecision( 2 ) << fps << " fps"; //to get standard C's char * string use: some_text.str( ).data( ); C++ STD objects and streams are very fast but remember to use static to only once alocate extra memory needed by ostringstream... if you check it in OpenGL please do tell me result - it is very interesting for me as I never checked this out and I don't really know which one is faster... I know that ostringstream is much more safer as it dynamically allocates needed memory - not like sprintf which writes directly to memory (and here writing beyond buffer is quite often and very dangerous as it leads many times to "random" crashes) Waiting for some results :-) -- regards, Zodiaq |
|
From: Neszt T. <ne...@ss...> - 2003-07-31 08:54:06
|
Hello! #1: Should I use the sprintf within an opengl application? I'm worrying about the speed. Is sprintf taking a long time? (As I tried it, I can not feel any fall-off) #2: Am I know right, that the last stable version of dev-c++ is the 4.0? What about the new stable versions? (I mean, not beta) #3: How to force the dev-c++ to generate .o file to from every .c included file? I think, this could make speed up the compiling process. Thanks Your help in advance, Regards, Neszt Tibor |