dev-cpp-users Mailing List for Dev-C++ (Page 325)
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: David M. <ci...@ya...> - 2003-08-24 20:32:46
|
#1
Assume the following definitions:
class A {
public:
virtual void do_xxx(void)
{
//code
}
}
class A_derivative : public A
{
void do_xxx(void)
{
//Some other code.
}
}
Assume I have a object of type A_derivative.
If I want the code for do_xxx to call do_xxx in class A first the only option I seem to have is add A::do_xxx() as the first line in A_derivative::do_xxx
#2
I have a command class which contains a string as the key and a function pointer as the data. I am being told about using "command objects" that would handle the actual execution of the command. Does anyone have any experience in this and if so could you give some example code or point me to a tutorial. The concept seems useful I am getting stuck when it comes to implementing it (Should I overload the () operator?)
Thanks.
---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software |
|
From: srikanth <cbo...@re...> - 2003-08-24 17:32:10
|
sir
Iam using the DEV-C++ IDE for windows c++ programming.
Iam facing a problem please help me.
In the Lib directory you have provided the lib(.a) file by
name "libdsound.a", with header "mmsystem.h", now when I link to
this lib and compile I have problems with
1)DirectSoundCreate(....) func is not recognised.
2)If I include "dsound.h" from "DXMEDIA" provided by
Microsoft
there are errors with LPWAVEFORMATEX in its declaration.
now, how to develop any directSound,directplay,direct animation
applications in the dev-c++ IDE,
what is the header file that I have to include for successfull
compilation. please help
Thanking you in anticipation
srikanth
one of the member in your mailing lists
___________________________________________________
Art meets Army ; Swapna Weds Capt. Rajsekhar.
Rediff Matchmaker strikes another interesting match !!
Visit http://matchmaker.rediff.com?2
|
|
From: <ten...@ne...> - 2003-08-23 17:54:17
|
Wide char are not fully implemented in mingw yet. w.y. wrote: >Daniel Glenfield wrote: > > >>do you not just include <wchar.h> ? >> >> > >That or <cwchar> will allow me to use the C functions >wscanf, wprintf etc. I was able to try that out by changing >the "Language to use for non-Unicode programs" option to Japanese >so the console window would display/accept wide chars. > >But I am curious about how to get the C++ stuff (wstring, wcin, wcout, >...) >to work. It seems to be partially controlled by _GLIBCPP_USE_WCHAR_T >being defined, but if I define it myself it still doesn't work. > >I found in file c++config.h where it would be defined (it's commented >out). I tried defining it there but that doesn't work either. > > >------------------------------------------------------- >This SF.net email is sponsored by: VM Ware >With VMware you can run multiple operating systems on a single machine. >WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines >at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0 >_______________________________________________ >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: <ten...@ne...> - 2003-08-23 17:27:45
|
Here is the link: http://sourceforge.net/tracker/?group_id=10639&atid=110639 Hossein Haeri wrote: >Dear all, > >Does anyone know where is the place in which one could report a >bug of Dev-Cpp? (It seems that I have found one.) > >Thanks, >--Hossein > > |
|
From: Hossein H. <ult...@em...> - 2003-08-23 10:36:16
|
Dear all, Does anyone know where is the place in which one could report a bug of Dev-Cpp? (It seems that I have found one.) Thanks, --Hossein -- __________________________________________________________ Sign-up for your own 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: Ioannis V. <iv...@em...> - 2003-08-23 10:02:04
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf Of w.y. > Sent: Saturday, August 23, 2003 10:33 AM > To: dev...@li... > Subject: Re: [Dev-C++] Wide chars > > > > > Daniel Glenfield wrote: > > > > do you not just include <wchar.h> ? > > That or <cwchar> will allow me to use the C functions > wscanf, wprintf etc. I was able to try that out by changing > the "Language to use for non-Unicode programs" option to Japanese > so the console window would display/accept wide chars. > > But I am curious about how to get the C++ stuff (wstring, wcin, wcout, > ...) > to work. It seems to be partially controlled by _GLIBCPP_USE_WCHAR_T > being defined, but if I define it myself it still doesn't work. As far as I know MINGW compiler that Dev-C++ so far uses, does not provide wcout yet (and perhaps other wchar_t facilities). You can use wprintf() instead. Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL 1: http://run.to/noicys * Alternative URL 2: http://www.noicys.cjb.net |
|
From: w.y. <yok...@ve...> - 2003-08-23 07:33:44
|
Daniel Glenfield wrote: > > do you not just include <wchar.h> ? That or <cwchar> will allow me to use the C functions wscanf, wprintf etc. I was able to try that out by changing the "Language to use for non-Unicode programs" option to Japanese so the console window would display/accept wide chars. But I am curious about how to get the C++ stuff (wstring, wcin, wcout, ...) to work. It seems to be partially controlled by _GLIBCPP_USE_WCHAR_T being defined, but if I define it myself it still doesn't work. I found in file c++config.h where it would be defined (it's commented out). I tried defining it there but that doesn't work either. |
|
From: Yeoh H. <ye...@ye...> - 2003-08-23 03:35:59
|
----- Original Message ----- From: Eric Churches To: dev...@li... Sent: Saturday, August 23, 2003 8:35 AM Subject: [Dev-C++] Help/? Im New A begginner dev c++ 4.9.8.1 I like this program and it looks real good. My problem is I=92ve never programmed before So I need a lot of help to understand c++ So where do I go from here? Eric Hi Eric, Yes, Dev-C++ is a real good program. If you have not programmed before, you will have more than one problem or challenges. Rather than giving you a list of books to read, IMHO I think it is better= to explain what is needed to be a computer programmer. I'm talking about writing Win32 programs here. I'm not a professor in CS or in a CS teachin= g job so what's stated here is based on my personal experience. :-) IMHO, this is a list of challenges you have to tackle. :-) 0. This is the real beginning. Get inside a computer programmer's mind. Learn the mindset of computer programmers. Be bold and experiment. Remember to use the reset/on-off button on your p= c. PC hangs are very normal, especially when you're trying out some new code. If you have a second pc for development work, so much the better. 1. Learn how a computer executes a program. You'll need to know how Windows runs and manages programs. A key question, you need to examine is this: What does an operating system do? 2. Learn how computer programs work. Closely related to 1. above, by this I mean how your program runs and how= it interact with Windows. 3. Learn how to write a computer program using pseudo code. You'll need to learn how a compiler works. The how programs are written.. The basic contructs or building blocks of a computer program: variables, loops, etc. In the case of OOP, the idea of classes, objects and the rest. 4. Learn about C and C++ compilers, IDE and the C and C++ language There are three things here: 4.1 Learn how to use the C and C++ compiler. In this case MinGW. 4.2 Also, learn how to effectively use the Dev-C++ IDE. 4.3 As for learning C and C++, this is a very big area and the particula= r rules and syntax can be quite difficult for novices. But if you have a very good background in 3. above, you should be able to learn and master any programming language. You can find many good books that teach you the language. 5. Learn the Win32 API This is platform specific information which can be easily found from vari= ous sources. The main source is MSDN. Also, if you have problems trying to us= e a particular Win32 API, google.com is a good starting point. Another useful resource is groups.google.com. Also for C and C++, there are many free sample codes from sites such as codeguru, code project. 6. Learn the domain requirements This is a very personal area. If you like to write computer games, you'll find the key areas you need to know, for example OpenGL, DirectX, 2D and = 3D graphics programming, sound and music and others perhaps AI. It is easy t= o get information on all these. Try SourceForge.net for gaming libraries an= d other sites that offer free tutorials and source codes on game developmen= t. 7. Write many programs in the domain that you are interested in This is the one thing which you should do, ideally, every day. Start smal= l, then move on to bigger projects. Use the technique of step-wise refinement. Learn how to ask smart questio= ns and post them to mailing lists. Remember, you are not alone. Someone else probably had the same problem and found a solution. If the mailing list h= as a Search facility, it is very handy. Most questions I see are posted frequently and also already answered. The main thing is that you should enjoy programming computers, otherwise = it will all feel like very hard work. :-) Best Regards, Yeoh -- P.S. To all you very experienced programmers, sorry for this long e-mail. :-) |
|
From: Ioannis V. <iv...@em...> - 2003-08-23 02:17:01
|
Some good standard C++ introductory book. Check http://www.accu.org at = the book reviews section. =20 A book i have heared very good words about, is "Accelerated C++" by = Andrew Koenig, Barbara Moo. =20 =20 http://www.research.att.com/~ark/bibliography/accelerated.html =20 =20 =20 =20 =20 =20 Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com <http://www.noicys.freeurl.com/>=20 * Alternative URL 1: http://run.to/noicys * Alternative URL 2: http://www.noicys.cjb.net = <http://www.noicys.cjb.net/> =20 -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Eric Churches Sent: Saturday, August 23, 2003 3:35 AM To: dev...@li... Subject: [Dev-C++] Help/? Im New A begginner dev c++ 4.9.8.1 I like this program and it looks real good. =20 My problem is I=92ve never programmed before =20 So I need a lot of help to understand c++=20 =20 So where do I go from here? =20 Eric --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.510 / Virus Database: 307 - Release Date: 14/08/2003 |
|
From: Eric C. <ec...@ih...> - 2003-08-23 00:35:30
|
I like this program and it looks real good. =20 My problem is I=92ve never programmed before =20 So I need a lot of help to understand c++=20 =20 So where do I go from here? =20 Eric --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.510 / Virus Database: 307 - Release Date: 14/08/2003 =20 |
|
From: Daniel G. <sp...@ho...> - 2003-08-22 20:43:08
|
bravo! I like it! >From: Eric <eri...@cl...> >To: Dev...@li... >Subject: this is how you do a real test Re: [Dev-C++] test >Date: Fri, 22 Aug 2003 21:12:40 +1200 > >A man takes his place in the theater, but his seat is >too far from the stage. > >He whispers to the usher, "This is a mystery, and I >have to watch a mystery close up. Get me a better >seat, and I'll give you a handsome tip." > >The usher moves him into the second row, and the >man hands the usher a quarter. > >The usher looks at the quarter, leans over and whispers, >"The wife did it." > > > > >----- Original Message ----- >From: <pie...@ai...> >To: <Dev...@li...> >Sent: Friday, August 22, 2003 9:49 AM >Subject: [Dev-C++] test > > > >test > >__________________ >Pierre Surmont > > >Tel : +687 25 03 77 >Mob: +687 77 63 77 >Fax : +687 25 03 92 > > > >------------------------------------------------------- >This SF.net email is sponsored by: VM Ware >With VMware you can run multiple operating systems on a single machine. >WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines >at the same time. Free trial click >here:http://www.vmware.com/wl/offer/358/0 >_______________________________________________ >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 is sponsored by: VM Ware >With VMware you can run multiple operating systems on a single machine. >WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines >at the same time. Free trial click >here:http://www.vmware.com/wl/offer/358/0 >_______________________________________________ >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: <pie...@ai...> - 2003-08-22 20:38:00
|
Hello, Does anybody have any skill level using OLEDB with Dev-CPP ? Regards Sorry for my bad English ;-( __________________ Pierre Surmont Tel : +687 25 03 77 Mob: +687 77 63 77 Fax : +687 25 03 92 |
|
From: Per W. <pw...@ia...> - 2003-08-22 11:33:55
|
But that would make us all suffer a lot more. Better to get these UNSUBSCRIBE suckers now and then, while being able to ignore spurious noise at the end of mails. /Per W On Wed, 20 Aug 2003, Daniel K. O. wrote: > > I was wondering... is there a way to move that footer to the header? So > every message would start with something like: > > "TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > If you don't want to wake up tomorrow with your inbox full os spam and gay pr0n, better don't ask how to unsubscribe here." > > > > Could this help the poor "can't-unsubscribe" people ? > > > > > Daniel K. O. > > > > > Smurf, Papa wrote: > > >Don't get started I did 1st line support for a software development tool > >company and you would not like to know what kind of people you get. But I > >think most of the stupidities are laziness based (don't want to read the > >f*#$% manual.). > > > >-----Original Message----- > >From: dev...@li... > >[mailto:dev...@li...]On Behalf Of Stefan > >Kuhn > >Sent: Wednesday, August 20, 2003 8:52 AM > >To: dev-cpp-users > >Subject: Re: [Dev-C++] UNSUBSCRIBE,UNSUBSCRIBE,UNSUBSCRIBE > > > > > >I'm frequently astonished how "limited" the intelligence of some > >mailing-list subscribers is. > >I've seen it on many mailing lists by now. > >But it's probably not something you'd expect from a software-development > >related mailing list. > > > >Sorry for my arrogance. ;-) > > > >Cheers, > >Stefan > > > > > > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by Dice.com. > Did you know that Dice has over 25,000 tech jobs available today? From > careers in IT to Engineering to Tech Sales, Dice has tech jobs from the > best hiring companies. http://www.dice.com/index.epl?rel_code=104 > _______________________________________________ > 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: <don...@sr...> - 2003-08-22 09:50:29
|
Don Faison, FB-Line & HB-Line NDA, Bldg. 772-3F, tel. (803) 952-3679, fax (803) 952-4100, pager 725-PAGE 13395, BB shift |
|
From: Vlada D. <dj...@im...> - 2003-08-22 09:26:49
|
just trying something, sorry ------------ Vlada |
|
From: Eric <eri...@cl...> - 2003-08-22 09:10:24
|
A man takes his place in the theater, but his seat is too far from the stage. He whispers to the usher, "This is a mystery, and I have to watch a mystery close up. Get me a better seat, and I'll give you a handsome tip." The usher moves him into the second row, and the man hands the usher a quarter. The usher looks at the quarter, leans over and whispers, "The wife did it." ----- Original Message ----- From: <pie...@ai...> To: <Dev...@li...> Sent: Friday, August 22, 2003 9:49 AM Subject: [Dev-C++] test test __________________ Pierre Surmont Tel : +687 25 03 77 Mob: +687 77 63 77 Fax : +687 25 03 92 ------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0 _______________________________________________ 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: Eric <eri...@cl...> - 2003-08-22 08:47:35
|
what time and where? ----- Original Message ----- From: <pie...@ai...> To: <dev...@li...> Sent: Friday, August 22, 2003 4:29 PM Subject: [Dev-C++] test test again __________________ Pierre Surmont Tel : +687 25 03 77 Mob: +687 77 63 77 Fax : +687 25 03 92 ------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0 _______________________________________________ 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: Michael D. S. <for...@hi...> - 2003-08-22 07:22:50
|
First I click on nothing in the email for obvious reasons :) But here's a good guess without looking. Usually, you have a loop going that's addressing an array and at loop 30=20 the address is out of bounds of the array. If array A has 30 elements, the last element is A[29] -- A[0] is the first.= =20 If you try to address A[30] that gets into memory that's reserved for other= =20 things. This of course usually happens in a "for" or "while" loop with=20 A[index] where "index =3D" gets to be 30 -- or perhaps even more. Put a cout statement in your loop and print out the control variable. See=20 what it is in the last loop that works. Then you can figure out what it was= =20 on the fatal loop, maybe even see it if the cout statement executes before= =20 the fatal error occurs. And, maybe not. Errors can cause other errors that have nothing to do with= =20 the first error. Then the trick is to find the one that started the chain. ms At 10:25 PM 8/21/03, you wrote: > > >hello,<?xml:namespace prefix =3D o ns =3D=20 >"urn:schemas-microsoft-com:office:office" /> > > i have a problem with execution of program in DEV-C++ > >This program stop in the thirth iteration. Here appear a message of error= =20 >that talks problems read the address of memory . > >why ? > >could you help me ?? > > Hope be helped, >=20 >Nancy Alvarez > > >---------- >Charla con tus amigos en l=EDnea mediante MSN Messenger:=20 ><http://g.msn.com/8HMDES/2728??PS=3D>Haz clic aqu=ED |
|
From: <pie...@ai...> - 2003-08-22 07:00:48
|
test __________________ Pierre Surmont Tel : +687 25 03 77 Mob: +687 77 63 77 Fax : +687 25 03 92 |
|
From: Daniel G. <sp...@ho...> - 2003-08-22 06:24:38
|
do you not just include <wchar.h> ? >From: "w.y." <yok...@ve...> >To: dev...@li... >Subject: [Dev-C++] Wide chars >Date: Thu, 21 Aug 2003 02:48:18 -0400 > > >For a windows prog I know about > >#define _UNICODE >#define UNICODE > >but what do you do to activate the wide char functions in a >non-windows program? > >In <iostream> I see this: > > extern istream cin; > extern ostream cout; > extern ostream cerr; > extern ostream clog; >#ifdef _GLIBCPP_USE_WCHAR_T > extern wistream wcin; > extern wostream wcout; > extern wostream wcerr; > extern wostream wclog; >#endif > >But do I have to define _GLIBCPP_USE_WCHAR_T myself or is there >a header to include which does that? > > > >------------------------------------------------------- >This SF.net email is sponsored by: VM Ware >With VMware you can run multiple operating systems on a single machine. >WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines >at the same time. Free trial click >here:http://www.vmware.com/wl/offer/358/0 >_______________________________________________ >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 _________________________________________________________________ Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger |
|
From: <PSu...@ai...> - 2003-08-22 05:11:28
|
Hello, Does anybody have any skill level using OLEDB with Dev-CPP ? Regards Sorry for my bad English ;-( __________________ Pierre Surmont Tel : +687 25 03 77 Mob: +687 77 63 77 Fax : +687 25 03 92 |
|
From: <PSu...@ai...> - 2003-08-22 05:06:53
|
test __________________ Pierre Surmont Tel : +687 25 03 77 Mob: +687 77 63 77 Fax : +687 25 03 92 |
|
From: <pie...@ai...> - 2003-08-22 04:29:29
|
test again __________________ Pierre Surmont Tel : +687 25 03 77 Mob: +687 77 63 77 Fax : +687 25 03 92 |
|
From: Nancy A. <nai...@ho...> - 2003-08-22 03:25:39
|
/***************************************************************************
CALCULO DEWT
Sistema ternario: acetona(1)/metano(2)/agua(3)
****************************************************************************
Data: 16/08/2003
Calculo DEWT com o metodo de Wilson para os coeficientes de atividade em um
sistema ternario usando o metodo de Newton-Raphson para a solucao aproximada
do sistema de equacoes estabelecido.
ENTRADAS:
Numero de equacoes, n, e de desconhecidos, z=(z1,...,zn)t, tolerancia TOL;
numero
maximo de iteracoes Max; equacoes para F(z)=0 na funcao F() e para J(z) em
jaco-
biana().
Dados do sistema desde o arquivo cpp-dados.txt: pressao (P); fracao molar
dos com-
ponentes na entrada do sistema, (y(0,..,n-1)); volume molar de cada
componente da
mistura, v(0,..,n); constantes de Antoine, A(0,..,n), B(0,..,n) e C(0,..n),
para o
calculo das presoes de saturacao de cada componente; constantes da equacao
de Wil-
son, a(ij), para cada par de componentes.
SAIDA: solucao aproximada z = (z1,...,zn)t ou mensagen de que o numero de
iteracoes
foi excedido.
******************************************************************************/
#include<fstream.h>
#include <iostream.h>
#include <math.h>
#include <stdlib.h>
/*** Prototipo das funcoes usadas ***/
/************************************/
double pressat(double , double *, double* , double *, double *);
double atividade(int ,double **, double **, double *);
double wilson(double *, double **, double &, double **) ;
void msg1();
double valor(int , int , double *, double **, double *, double *, double *);
double derGx(int, int, double **, double *, double **, double**,double **);
double derF (int , int , double *, double **, double **, double *, double
**);
double Jacobiana(double **, double *, double **, int, double**);
double Inversa(double** , int, double** );
/* Declara variaveis globais */
/****************************/
const double R=1.987, /* constante dos gases*/
ff=1e-4;
int n, c; /*número de equacoes e numero de
especies quimicas*/
/***************************************************************************/
int main () { //INICIO DO MAIN
/***************************************************************************/
/**** Declara variaveis locais ****/
int i,j,k,l,m,kk,jj; /* índices */
int Max; /* número máximo de iterações */
double TOL, /* tolerancia */
P, /* Presao do sistema*/
soma, /* auxiliar de calculo;*/
erro; /* erro de aproximacao */
double *y, /* fracao molar de cada especie no
vapor*/
*v, /* volume molar de cada especie */
*A,*B,*C, /* constantes de Antoine*/
*Gamma, /* coeficiente de atividade*/
*Psat, /* presao de saturacao*/
*F, /* vetor de funcoes*/
**Gder, /* termo a direita para a derivada
numerica*/
**Fder, /* termo a direita paara a derivada
numerica*/
**z, /* vetor de incognitas*/
**vji, /* radio vj/vi na correlacao de Wilson*/
**a, /* constante de interacao binaria de
Wilson*/
**LAMBDA, /* termo de interacao molecular da
equacao de Wilson*/
**J, /* matriz jacobiana */
**JINV; /* jacobiana inversa */
ifstream OpenFile; OpenFile.open("cpp_home.txt");
ofstream SaveFile; SaveFile.open("cpp_DEWT.txt");
SaveFile<<endl<<"Sistema ternario: acetona(1)/metano(2)/agua(3)"<<endl;
SaveFile<<endl<<" Calcula T, x1, x2 e x3 no ponto de orvalho"<<endl;
/***************************/
/* ENTRADAS */
/***************************/
cout<<"Entrar numero maximo de iteracoes, Max: ";
cin>>Max;
cout<<endl<<"Entrar a Tolerancia. TOL (1.0e-5)?: ";
cin>>TOL;
cout<<"Lendo numero de equacoes, n: "<<endl;
OpenFile>>n; cout<<n<<endl;
if (n <= 0)
cout<<"ERROR - n tem que ser maior que zero.\n"<<endl;
SaveFile<<"O sistema tem "<<n<<" equacoes e "<<n<<" desconhecidos."<<endl;
/******** Alocacao dinamica da memoria *******/
c=n-1;
y = new double [c]; if (y==NULL)msg1();
v = new double [c]; if (v==NULL)msg1();
A = new double [c]; if (A==NULL)msg1();
B = new double [c]; if (B==NULL)msg1();
C = new double [c]; if (C==NULL)msg1();
Psat = new double [c]; if (Psat==NULL)msg1();
Gamma = new double [c]; if (Gamma==NULL)msg1();
F = new double [n]; if (F==NULL)msg1();
a = new double *[c]; if (a==NULL)msg1(); for (i=0; i<c; i++){
a[i] = new double [c]; if(a[i]==NULL)msg1();}
z = new double *[n]; if (z==NULL)msg1(); for (i=0; i<n; i++){
z[i] = new double [Max]; if(z[i]==NULL)msg1();}
Gder = new double *[c]; if(Gder==NULL)msg1(); for (i=0; i<c; i++){
Gder[i] = new double [n]; if(Gder[i]==NULL)msg1();}
LAMBDA = new double *[c]; if (LAMBDA==NULL)msg1(); for ( i=0; i<c;
i++){
LAMBDA[i] = new double [c]; if (LAMBDA[i]==NULL)msg1();}
Fder = new double *[n]; if (Fder==NULL)msg1(); for (int i=0; i<n;
i++){
Fder[i] = new double [n]; if(Fder[i]==NULL)msg1();}
J = new double *[n]; if (J==NULL)msg1(); for (int i=0; i<n;
i++){
J[i] = new double [n]; if(J[i]==NULL)msg1();}
JINV = new double *[n]; if (JINV==NULL)msg1(); for (int i=0; i<n;
i++){
JINV[i] = new double [n]; if(JINV[i]==NULL)msg1();}
OpenFile >> P;
for (i=0; i<c-1; i++)OpenFile >>y[i];
for (i=0; i<c; i++)OpenFile >>v[i];
for (i=0; i<c; i++)OpenFile >>A[i];
for (i=0; i<c; i++)OpenFile >>B[i];
for (i=0; i<c; i++)OpenFile >>C[i];
OpenFile >> a[0][1]>> a[0][2];
OpenFile >> a[1][0]>> a[1][2];
OpenFile >> a[2][0]>> a[2][1];
//SaveFile<<"pressao do sistema: "<<P<<endl;
//SaveFile<<"fracao molar na fase vapor: "<<endl;
soma=0;
for(i=0; i<c-1; i++)soma+=y[i];
y[c-1]=1-soma;
for(i=0; i<c; i++)
//SaveFile<<" y"<<i<<"="<<y[i]<<endl;
//SaveFile<<"volume molar das especies:"<<endl;
//for (i=0; i<c; i++) SaveFile<<" v"<<i<<"="<<v[i]<<endl;
//SaveFile<<"coeficientes de Antoine:"<<endl;
for (i=0; i<c; i++)
//SaveFile<<" A"<<i<<"="<<A[i]<<", B"<<i<<"="<<B[i]<<",
C"<<i<<"="<<C[i]<<endl;
//SaveFile<<"parametros de ajuste de Wilson"<<endl;
//SaveFile<<"a12="<<a[0][1]<<" a13="<<a[0][2]<<endl;
//SaveFile<<"a21="<<a[1][0]<<" a23="<<a[1][2]<<endl;
//SaveFile<<"a31="<<a[2][0]<<" a32="<<a[2][1]<<endl;
for(i=0; i<c; i++)a[i][i]=0;
k = 0;
cout<<"Entrar as aproximacoes iniciais:"<<endl; /*
z[i][0]*/
for (i=0;i<c;i++) {//1
cout<<"x"<<i<<"0: ";
cin>>z[i][0];
}//1
cout<<"T0:";
cin>>z[c][0];
for (i=0; i<n; i++) {//2
SaveFile<<"z["<<i<<"]="<<z[i][0]<<endl; /*Imprime as aproximacoes
iniciais*/
cout<<endl;
}//2
for(i=0; i<c; i++)a[i][i]=0;
/*******************************************************/
/* PROCEDIMENTO ITERATIVO */
/******************************************************/
while ( k<Max) { //Inicio do while
SaveFile<<"k"<<k+1<<endl;
/* Calculo dos coeficientes de atividade com a correlacao de Wilson */
wilson(v,a,z[c][k],LAMBDA); /* obtem os parametros adjustaveis de
Wilson*/
/*for (i=0; i<c; i++){//3
for (j=0; j<c; j++)
SaveFile<<"L["<<i<<j<<"]="<<LAMBDA[i][j]<<endl;
}//3 */
// SaveFile<<"Coeficientes de Atividade calculadas"<<endl;
atividade(k,z,LAMBDA,Gamma); /* Obtem os coeficiente de atividade*/
//for(i=0; i<c; i++)SaveFile<<"Gamma["<<i<<"]="<<Gamma[i]<<endl;
//SaveFile<<"Presões de saturação calculadas"<<endl;
pressat(z[c][k],A,B,C,Psat); /* Calcula as presoes de saturacao */
//for (i=0; i<c; i++) SaveFile<<" Psat"<<i<<"="<<Psat[i]<<endl;
//SaveFile<<"Vetor F[z]:"<<endl ;
valor(0, k, y, z, Gamma, Psat, F);
valor(1,k,y,z,Gamma, Psat,F);
valor (2,k,y,z, Gamma, Psat, F);
valor(3,k,y,z,Gamma, Psat,F); /* Calcula o vetor F[i] */
// SaveFile<<"F"<<i<<"="<<F[i]<<endl;
/*************************************************************/
/* Calculo dos elementos da Jacobiana */
/*************************************************************/
for(i=0; i<c; i++) /* Calculo valores no ponto
(1+ff)*z */
derGx(i, k, z, v, a, LAMBDA, Gder);
for(i=0; i<c; i++)
derF(i, k, y, z, Gder, Psat, Fder);
derF(c, k, y, z, Gder, Psat, Fder);
Jacobiana(Fder, F, z, k, J); /* Calcula dFz/dz */
/* for(i=0; i<n; i++)
for(j=0; j<n; j++)
SaveFile<<"J"<<i<<j<<"="<<J[i][j]<<endl; */
/*************************************************************/
/* Solucao do sistema linear nxn J(X)*DeltaZ = -F(X) */
/*************************************************************/
Inversa(J, n, JINV) ; /* Inverte a Jacobiana */
/* for(i=0; i<n; i++)
for(j=0; j<n; j++)
SaveFile<<"JINV"<<i<<j<<"="<<JINV[i][j]<<endl;*/
for (i=0; i<n; i++){//5
soma=0;
for(j=0; j<n; j++){soma+=-JINV[i][j]*F[j];
// SaveFile<<soma<<endl;
}
z[i][k+1]=z[i][k]+soma; /*Novas estimativas*/
SaveFile<<"z["<<i<<"]["<<k+1<<"]="<<z[i][k+1]<<endl; /*
imprime a solucao na
k+1
iteracao no arquivo de saida */
} //5
/***********
* SAIDAS *
***********/
erro=0;
for (i=0; i<n; i++){//6
erro+=fabs((z[i][k+1]-z[i][k])/z[i][k]);
// SaveFile<<erro<<endl;
}//6
//SaveFile<<"erro"<<erro<<endl;
if (k+1>=1){//7a
if (erro<= TOL) {//7 /* Checa precisao da nova estimativa */
/* Libera memoria */
delete []y; delete []v; delete []A; delete []B; delete []C; delete
[]Gamma;
for (int i=0; i<c; i++) delete[] a[i]; delete [] a ;
for (int i=0; i<n; i++) delete[] Gder[i]; delete [] Gder ;
for (int i=0; i<n; i++) delete[] z[i]; delete []z;
for (int i=0; i<c; i++) delete []LAMBDA[i]; delete []LAMBDA;
for (int i=0; i<c; i++) delete[] Fder[i]; delete [] Fder ;
for (int i=0; i<n; i++) delete []J[i]; delete []J;
for (int i=0; i<n; i++) delete []JINV[i]; delete []JINV;
exit (1); /* Procedimento completado com
sucesso */
}//7
}//7a
k++; /* k = k + 1 */
}
SaveFile<<endl<<" Numero Maximo de iteracoes foi excedido."<<endl;
/* Libera a memoria */
delete []y; delete []v; delete []A; delete []B; delete []C; delete
[]Gamma;
delete []Psat; delete []F;
for (int i=0; i<c; i++) delete[] a[i]; delete [] a ;
for (int i=0; i<n; i++) delete[] Gder[i]; delete [] Gder ;
for (int i=0; i<n; i++) delete[] z[i]; delete []z;
for (int i=0; i<c; i++) delete []LAMBDA[i]; delete []LAMBDA;
for (int i=0; i<c; i++) delete[] Fder[i]; delete [] Fder ;
for (int i=0; i<n; i++) delete []J[i]; delete []J;
for (int i=0; i<n; i++) delete []JINV[i]; delete []JINV;
system("PAUSE");
return 0;
} /* Parar */
/*******************/
void msg1()
/******************/
{
cout<<"Nao consegui alocar memoria"<<endl;
exit(1);
}
/***********************************************************************/
double wilson(double *v, double **a, double &z, double **LAMBDA)
/***********************************************************************/
{ //INICIA
int i, j, c=3;
double **vji;
vji=new double *[c];
for(i=0; i<c; i++)vji[i]=new double[c];
for (i=0; i<c; i++){//1
for (j=0; j<c; j++){//2
vji[i][j]= v[j]/v[i];
a[i][j]=a[i][j]/1.987;
}//2
} //1
for (i=0; i<c; i++){//3
for (j=0; j<c; j++){//4
if(j==i)LAMBDA[i][j]=1.;
else
LAMBDA[i][j]=vji[i][j]*exp(-a[i][j]/z);
}//4
}//3
}//FINAL
/*******************************************************************/
double atividade(int k, double **z, double **LMBDA, double *Gamma)
/*******************************************************************/
{//INICIO
int i, kk,j, c=3;
double somakkjj, somak, somaj;
for (i=0; i<c; i++){/*1*/
somak=0;
for (kk=0; kk<c; kk++){ /*2*/
somakkjj=0;
for (j=0; j<c; j++)somakkjj+=z[j][k]*LMBDA[kk][j];
somak+= z[kk][k]*LMBDA[kk][i]/somakkjj;
}/*2*/
somaj=0;
for (j=0; j<c; j++) somaj+=z[j][k]*LMBDA[i][j];
Gamma[i]=exp(1-log(somaj)-somak);
}/*1*/
}//FINAL
/********************************************************************************/
double pressat(double z, double *A, double *B, double *C,double *Psat )
/********************************************************************************/
{ //INICIO
int i, n=3;
for(i=0; i<n; i++){//1
Psat[i]=exp(A[i]-B[i]/(z+C[i]));
}//1
}//FINAL
/***********************************************************************************/
double valor(int f, int k, double *y, double **z, double *G, double *Ps,
double *F)
/***********************************************************************************/
{//INICIO
if(f==0) F[0]=y[0]-z[0][k]*G[0]*(Ps[0]/101.303);
if(f==1) F[1]=y[1]-z[1][k]*G[1]*(Ps[1]/101.303);
if(f==2) F[2]=y[2]-z[2][k]*G[2]*(Ps[2]/101.303);
if(f==c) F[c]=z[0][k]+z[1][k]+z[2][k]-1;
}//FINAL
/***********************************************************************************/
double derGx(int f,int k,double **z,double *v,double **a,double **L, double
**Gder)
/***********************************************************************************/
{ //INICIO
int i,j, c=3;
double *Gd, **zp;
Gd = new double[n];
zp=new double*[n];
for(i=0; i<n; i++)zp[i]=new double[k];
for(i=0; i<n; i++)
zp[i][k]=z[i][k];
if(f==0){//0
zp[0][k]=(1+ff)*zp[0][k]; /* cout<<"gder"<<zp[0][k]<<endl;
cout<<"gder"<<zp[1][k]<<endl; cout<<"gder"<<zp[2][k]<<endl;
cout<<"gder"<<zp[3][k]<<endl; */
atividade(k, zp, L, Gd);
for(i=0; i<c; i++)Gder[i][0]=Gd[i];
}//0
//cout<<endl;
if(f==1){//1 // cout<<f<<endl;
zp[1][k]= (1+ff)*zp[1][k]; /* cout<<"gder"<<zp[0][k]<<endl;
cout<<"gder"<<zp[1][k]<<endl; cout<<"gder"<<zp[2][k]<<endl;
cout<<"gder"<<zp[3][k]<<endl;*/
atividade(k, z, L, Gd);
for(i=0; i<c; i++)Gder[i][1]=Gd[i];
}//1
//cout<<endl;
if(f==2){//2 // cout<<f<<endl;
zp[2][k]= (1+ ff)*zp[2][k]; /* cout<<"gder"<<zp[0][k]<<endl;
cout<<"gder"<<zp[1][k]<<endl; cout<<"gder"<<zp[2][k]<<endl;
cout<<"gder"<<zp[3][k]<<endl;*/
atividade(k, z, L, Gd);
for(i=0; i<c; i++)Gder[i][2]=Gd[i];
}//2
// cout<<endl;
if(f==3){//3 //cout<<f<<endl;
zp[3][k]=(1+ff)*zp[3][k]; /*cout<<"gder"<<zp[0][k]<<endl;
cout<<"gder"<<zp[1][k]<<endl; cout<<"gder"<<zp[2][k]<<endl;
cout<<"gder"<<zp[3][k]<<endl;*/
for(i=0; i<c; i++){//a
for(j=0; j<c;j++){//b
L[i][j]=exp((v[j]/v[i])*exp(-a[i][j]/z[3][k]));
}//b
}//a
atividade(k, z, L, Gd);
for(i=0; i<c; i++)Gder[i][3]=Gd[i];
}//3 /*cout<<"gfin"<<z[0][k]<<endl;
/*cout<<"gfin"<<z[1][k]<<endl;
cout<<"gfin"<<z[2][k]<<endl;
cout<<"gfin"<<z[3][k]<<endl;*/
delete[]Gd;
}//FINAL
/**********************************************************************************************/
double derF(int f, int k, double *y, double **z, double **Gder, double *Ps,
double **Fder)
/**********************************************************************************************/
{//INICIO
int i,j, c=3, n=4;
double *zp;
zp=new double[n];
for (i=0; i<c; i++){//1
zp[i]=(1+ff)*z[i][k];
for (j=0; j<n; j++){ //1a
if(i==j)Fder[i][j]=y[i]-Gder[i][i]*(Ps[i]/101.33)*zp[i];
else
Fder[i][j]=y[i]-Gder[i][j]*(Ps[i]/101.33)*z[i][k];
}//1a
}//1
} //FINAL* */
/***************************************************************************/
double Jacobiana(double **Fder, double *F, double **z, int k, double **J)
/***************************************************************************/
{//INICIO
int i,j, n=4;
double a, d;
for (i=0; i<c; i++){//1
a=z[i][k];
d=(1+ff)*z[i][k]; /*cout<<"a="<<a<<"
d="<<d<<endl;*/
cout<<endl;
for (j=0; j<n; j++){//1a
J[i][j]=(Fder[i][j]-F[i])/(d-a);
/*cout<<endl<<"(Fder"<<i<<j<<"="<<Fder[i][j]<<"-F"<<i<<"="<<F[i]<<
"/(d="<<d<<"-a="<<a<<")=
J"<<i<<j<<"="<<J[i][j];endl; */
}//1a
cout<<endl;
}//1
for(i=0; i<n; i++)J[c][i]=1;
J[c][c]=0; // for (i=0; i<n; i++){//1
for (j=0; j<n; j++) cout<<"J"<<i<<j<<"="<<J[i][j]<<endl;}//1
}//FINAL
/********************************************************************/
double Inversa(double **J, int n, double **JINV)
/*******************************************************************/
{//INICIO
double Temp, **One;
int i,j,m,l;
One= new double *[n];
for(i=0; i<n; i++)One[i]=new double[n];
/*** Criando a matriz identidade ***/
for (i=0; i<n; i++){//1
for (j=0; j<n; j++){//2
if(i==j)One[i][j]=1;
else One[i][j]=0;
// cout<<"one="<<One[i][j]<<endl;
}//2
}//1
/*** Inversao da Jacobiana ***/
for (l=0; l<n; l++){//7
cout<<l<<endl;
Temp=J[l][l];
for (j=0; j<n; j++) {//8
J[l][j]=J[l][j]/Temp;
One[l][j]=One[l][j]/Temp;
}//8
for (m=l+1; m<n; m++) {//9
Temp=J[m][l];
for (j=0; j<n; j++){ //10
J[m][j]=-1*Temp*J[l][j]+J[m][j];
One[m][j]=-1*Temp*One[l][j]+One[m][j];
} //10
} //9
} //7
for (l=c; l>=0; l--) { //11
for (m=l-1; m>=0; m--){ //12
Temp=J[m][l];
for (j=0; j<n; j++) {//13
J[m][j]=-1*Temp*J[l][j]+J[m][j];
cout<<endl;
One[m][j]=-1*Temp*One[l][j]+One[m][j];
} //13
} //12
} //11
for (i=0; i<n; i++){
for (j=0; j<n; j++){
JINV[i][j]=One[i][j];
}
}
}//FINAL
|
|
From: w.y. <yok...@ve...> - 2003-08-22 00:48:52
|
For a windows prog I know about #define _UNICODE #define UNICODE but what do you do to activate the wide char functions in a non-windows program? In <iostream> I see this: extern istream cin; extern ostream cout; extern ostream cerr; extern ostream clog; #ifdef _GLIBCPP_USE_WCHAR_T extern wistream wcin; extern wostream wcout; extern wostream wcerr; extern wostream wclog; #endif But do I have to define _GLIBCPP_USE_WCHAR_T myself or is there a header to include which does that? |