dev-cpp-users Mailing List for Dev-C++ (Page 571)
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: jgana <jg...@vt...> - 2002-06-15 22:31:52
|
You deserve a pat on the back, I don't know how you manage to be so quick. :-) Thanks Abhijit Shylanath and Ioannis Vranos Jose Gana Santiago, Chile |
|
From: Raghunath Marella.S <ms...@ya...> - 2002-06-15 18:32:01
|
Hi,
I am new to multithreading in VC++. I wrote a simple
program to understand the functionality of threads. I
used CreateThread. Actually, I am creating three
threads, and the ThreadProc will print integers from 0
to 10 for each thread. But the program is not working
as expected. The print statements and the getch()
functions are not seem to be working. I am not getting
why this should be? Will any one please clarify why
this is happening so? The code has been attached.
**************************************************
#include <iostream.h>
#include <stdlib.h>
#include <windows.h>
#include <conio.h>
DWORD WINAPI ThreadProc(LPVOID );
void main()
{
for(int i = 0;i<3;i++)
{
DWORD threadId;
HANDLE hThread;
hThread =
CreateThread(NULL,0,ThreadProc,&i,0,&threadId);
if(hThread == NULL)
cout << "\n Thread has not been created";
else
{
//_getch();
cout << "\n Thread has been created successfully.";
}
}
}
DWORD WINAPI ThreadProc( LPVOID lpParam )
{
cout << "\n Entered threadProc...";
MessageBox(NULL,"sample output","",MB_OK);
for(int i = 0;i<10;i++)
{
cout << "\n thread output is:"<<HIWORD(lpParam) <<
".."<<i;
}
_getch();
return 0;
}
***********************************************
thanks & regards,
Raghunath
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
|
|
From: Ioannis V. <no...@ho...> - 2002-06-15 18:15:46
|
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...] On Behalf Of Ioannis
Vranos
Sent: Saturday, June 15, 2002 9:00 PM
To: Dev-C++ Mailing List
Subject: RE: [Dev-C++] weird result
#include <iostream>
#include <cstdlib>
double Power(const double a, const double n);
Better do that:
#include <iostream>
#include <cstdlib>
double Power(const int a, const int n);
int main()
{
using namespace std;
int a=2, n=30;
cout << "Power(" << a << "," << n << ")= " << Power(a,n) << endl;
cout << "Power(" << a << "," << n+1 << ")= " << Power(a,n+1) << endl;
system("PAUSE");
return 0;
}
double Power(const int a, const int n)
{
int i;
double r;
for (r=i=1;i<=n;i++)
r=r*a;
return r;
}
I am too tired to think something better.
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
<http://www.noicys.cjb.net/>
* Alternative URL: http://run.to/noicys
|
|
From: Ioannis V. <no...@ho...> - 2002-06-15 18:00:24
|
----Original Message-----
From: dev...@li...
[mailto:dev...@li...] On Behalf Of Jose
Gana
Sent: Saturday, June 15, 2002 6:30 PM
To: dev...@li...
Subject: [Dev-C++] weird result
Hi!
Sorry if it is too obvious!
I am new in C++. I got 2^30= Power(2,30)= - 2147483648 in stead of +
2147483648 in my program.
I must have done something wrong. But I can figure it out. Can somebody
help me out?
#include <iostream>
#include <cstdlib>
using namespace std;
int Power(int a, int n);
int main()
{
int a=2, n=30; //int limit == 4294967295;
Because the int limit isn't that but 2147483647
// Power(2,30)==1073741824
// Power(2,31)==2147483648
// Power(2,32)==4294967296 out of
limit => Power(2,32)==0
cout << "Power(" << a << "," << n << ")= " << Power(a,n) << endl;
cout << "Power(" << a << "," << n+1 << ")= " << Power(a,n+1) << endl;
system("PAUSE");
return 0;
}
int Power(int a, int n)
{
int i=1, r=1;
for (i=1;i<=n;i++)
{
r=r*a;
}
return r;
}
I am using Dev-C++ version 4.01. in windows XP
Thank you for your help to this matter.
#include <iostream>
#include <cstdlib>
double Power(const double a, const double n);
int main()
{
using namespace std;
int a=2, n=30;
cout << "Power(" << a << "," << n << ")= " << Power(a,n) << endl;
cout << "Power(" << a << "," << n+1 << ")= " << Power(a,n+1) << endl;
system("PAUSE");
return 0;
}
double Power(const double a, const double n)
{
unsigned long i;
double r;
for (r=i=1;i<=n;i++)
r=r*a;
return r;
}
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
<http://www.noicys.cjb.net/>
* Alternative URL: http://run.to/noicys
|
|
From: Abhijit S. <mu...@gm...> - 2002-06-15 17:28:20
|
> int is, by default, signed, so one bit of your (signed) int variable (of > size 32 bits) is used to denote sign (+ve means 0, -ve means 1). 31 bits are > left, so, in effect, your int can hold from -((2**31) + 1) to +(2**31) where make that from -(2**31) to +((2**31) - 1) > ** denotes exponentiation... in normal numbers, from -2147483648 to > +2147483647. |
|
From: Abhijit S. <mu...@gm...> - 2002-06-15 17:18:28
|
int is, by default, signed, so one bit of your (signed) int variable (of
size 32 bits) is used to denote sign (+ve means 0, -ve means 1). 31 bits are
left, so, in effect, your int can hold from -((2**31) + 1) to +(2**31) where
** denotes exponentiation... in normal numbers, from -2147483648 to
+2147483647. The value of +2147483648 cannot be stored in the (signed) int.
It wraps around, and becomes the negative extreme. Dissect the bit-codes for
the numbers for more clarity.
The problem can be solved by using an unsigned int, which can hold a value
from 0 to +((2**32) - 1), i.e., 4294967295.
Changed code:
-----------------------------Start Code---------
#include <iostream>
#include <cstdlib>
using namespace std;
typedef unsigned int uint;
uint Power(int a, int n);
int main()
{
int a=2, n=30; // int limit == 4294967295;
// Power(2,30)==1073741824
// Power(2,31)==2147483648
// Power(2,32)==4294967296 out of limit =>
Power(2,32)==0
cout << "Power(" << a << "," << n << ")= " << Power(a,n) << endl;
cout << "Power(" << a << "," << n+1 << ")= " << Power(a,n+1) << endl;
system("PAUSE");
return 0;
}
uint Power(int a, int n)
{
int i=1;
uint r=1;
for (i=1;i<=n;i++)
{
r=r*a;
}
return r;
}
-------------------------------End Code---------
Hope this helps.
--------------------------
http://mudeth.tripod.com
----- Original Message -----
From: "Jose Gana" <jg...@ho...>
To: <dev...@li...>
Sent: Saturday, June 15, 2002 8:59 PM
Subject: [Dev-C++] weird result
> Hi!
> Sorry if it is too obvious!
> I am new in C++. I got 2^30= Power(2,30)= - 2147483648 in stead of +
2147483648 in my program.
>
> I must have done something wrong. But I can figure it out. Can somebody
help me out?
> [program follows]
|
|
From: Ioannis V. <no...@ho...> - 2002-06-15 16:34:52
|
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf
> Of h.r...@gm...
> Sent: Saturday, June 15, 2002 2:09 PM
> To: Dev...@li...
> Subject: Re: [Dev-C++] Export keyword problem
>
>
> Hi,
>
> here a codesnip from "The C++ Programming Language", B. Stroustrup, 3.
> German Edition ,
> p. 374:
>
> //out.h
> template<class T> void out(const T& t);
>
> //out.c
> #include <iostream>
> #include "out.h"
>
> export template<class T> void out(const T& t) {std::cerr << t; }
>
> Because the missing (until now) of the export keyword in
> mingw you have to
> write the template definition in the header. Perhaps it will
> be better in
> mingw based on gcc 3.1.
GCC 3.1:
temp.cpp:2: warning: keyword `export' not implemented, and will be
ignored
Since it recognises it and warns too, things are enough good in terms
of ANSI C++ compliance.
Keep in mind that "export" templates are a tough thing to be
implemented, that's why the usage of the keyword export for template
classes and functions, it is something that indicates special condition
in terms of compilation process. I guess things will get better in some
future release.
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
* Alternative URL: http://run.to/noicys
|
|
From: <h.r...@gm...> - 2002-06-15 16:10:48
|
Hello, please no HTML mail. I never read it. regards Horst -- Horst Rößner Postf. 1802 52205 Stolberg ICQ ID #74808448 h.r...@gm... h.g...@t-... GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net |
|
From: Jose G. <jg...@ho...> - 2002-06-15 15:29:49
|
<html><div style='background-color:'><DIV><SPAN lang=EN-US style="mso-ansi-language: EN-US">Hi!</SPAN></DIV>
<DIV><SPAN lang=EN-US style="mso-ansi-language: EN-US"></SPAN>Sorry if it is too obvious!</DIV>
<DIV>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US"> I am new in C++. I got 2^30= Power(2,30)= - 2147483648 in stead of + 2147483648 in my program.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US">I must have done something wrong. But I can figure it out. Can somebody help me out?<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US">#include <iostream><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US">#include <cstdlib></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US">using namespace std;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US">int Power(int a, int n);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US">int main()<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US">{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US"><SPAN style="mso-spacerun: yes"> </SPAN>int a=2, n=30;<SPAN style="mso-spacerun: yes"> </SPAN>//int limit == 4294967295;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN>// Power(2,30)==1073741824<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN>// Power(2,31)==2147483648<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN>// Power(2,32)==4294967296 out of limit => Power(2,32)==0<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US"><SPAN style="mso-spacerun: yes"> </SPAN>cout << "Power(" << a << "," << n << ")= " << Power(a,n) << endl;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US"><SPAN style="mso-spacerun: yes"> </SPAN>cout << "Power(" << a << "," << n+1 << ")= " << Power(a,n+1) << endl;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US"><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US"><SPAN style="mso-spacerun: yes"> </SPAN>system("PAUSE");<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US"><SPAN style="mso-spacerun: yes"> </SPAN>return 0;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US">}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US">int Power(int a, int n)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US">{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US"><SPAN style="mso-spacerun: yes"> </SPAN>int i=1, r=1;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US"><SPAN style="mso-spacerun: yes"> </SPAN>for (i=1;i<=n;i++)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US"><SPAN style="mso-spacerun: yes"> </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US"><SPAN style="mso-spacerun: yes"> </SPAN>r=r*a;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US"><SPAN style="mso-spacerun: yes"> </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US"><SPAN style="mso-spacerun: yes"> </SPAN>return r;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US">}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN lang=EN-US style="mso-ansi-language: EN-US">I am using Dev-C++ version 4.01. in windows XP<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US">Thank you for your help to this matter.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-ansi-language: EN-US">Jose Gana<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:place><st1:City><SPAN lang=EN-US style="mso-ansi-language: EN-US">Santiago</SPAN></st1:City><SPAN lang=EN-US style="mso-ansi-language: EN-US">, </SPAN><st1:country-region><SPAN lang=EN-US style="mso-ansi-language: EN-US">Chile</SPAN></st1:country-region></st1:place><SPAN lang=EN-US style="mso-ansi-language: EN-US">.<o:p></o:p></SPAN></P></DIV></div><br clear=all><hr>Join the worlds largest e-mail service with MSN Hotmail. <a href='http://g.msn.com/1HM505401/47'>Click Here</a><br></html>
|
|
From: <h.r...@gm...> - 2002-06-15 11:08:41
|
> >The book C++ Primer, 3rd edition, Lippmann and Lajoie, speaks on two
> >models of compilation: separation and inclusion. The separation model
> >defines a function in a separate file and it becomes available with the
> >keyword export. I tested this in the Dev and it did not work. The
>
> I do not have this book available, but in a fair number of years of C and
> C++ programming, I have never heard of the "export" keyword, except for
> DLL
> creation in Microsoft compilers. The closest I can think of is the
> "extern" keyword, but it is used to import things from other compilation
> units, and it is _not_ needed to get access to functions.
>
> Could you give one or more quotes from your book, preferably with small
> code examples if possible?
>
Hi,
here a codesnip from "The C++ Programming Language", B. Stroustrup, 3.
German Edition ,
p. 374:
//out.h
template<class T> void out(const T& t);
//out.c
#include <iostream>
#include "out.h"
export template<class T> void out(const T& t) {std::cerr << t; }
Because the missing (until now) of the export keyword in mingw you have to
write the template definition in the header. Perhaps it will be better in
mingw based on gcc 3.1.
greetings
Horst
--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
|
|
From: Nancy A. <nai...@ho...> - 2002-06-15 04:38:36
|
Hi, again.
Now, I want show the results in a file. What I do?
Thanks for your help.
NAISA
_________________________________________________________________
Descargue GRATUITAMENTE MSN Explorer en
http://explorer.yupimsn.com/intl.asp.
|
|
From: Nancy A. <nai...@ho...> - 2002-06-15 04:24:18
|
>From: pos...@ma... >To: nai...@ho... >Subject: Delivery Status Notification (Failure) >Date: Fri, 14 Jun 2002 21:12:48 -0700 > >This is an automatically generated Delivery Status Notification. > >Delivery to the following recipients failed. > > dev...@li... > > > _________________________________________________________________ Descargue GRATUITAMENTE MSN Explorer en http://explorer.yupimsn.com/intl.asp. |
|
From: Ioannis V. <no...@ho...> - 2002-06-15 03:17:59
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Mac Reiter > Sent: Friday, June 14, 2002 9:50 PM > To: Dev-C++ Mailing List > Subject: Re: [Dev-C++] const modifier? > > The compiler should refuse it. Since technically the pointer is only > pointing at the first character, it would not *HAVE* to refuse > modifications to aPtr[1] or any later character, but I believe the C++ > standard makes some special cases to handle arrays of chars > because they > are so prevalent. No, it has to refuse in C too. It remains a const char * in all cases. > > You can also have "char const * anotherPtr", which (if I > haven't screwed > this up) is a constant pointer to non-constant data. That > would mean that: > char const *p is the same as const char *p. You meant char * const p. > I really wish that C had used the Pascal or (modern) BASIC > declaration style: > > Pascal: > MyInteger : INTEGER; > > BASIC: > Dim MyInteger As Integer Thank God it doesn't. :) > or, while I'm dreaming up changes that will never happen -- > it has always > bothered me that "char *" was a pointer, but to get a pointer from a > variable, you used "&variable". From that standpoint, I > would prefer & > instead of * for declaration, resulting in: > > aPtr : & const char; > etc. It could happen but we would still need * since we would confuse the dereference operator with the address of operator, which are different things. > > (Of course, you'd have to come up with a different character > for references > in C++) I also think that @ would be a better dereferencing > operator than > *, because you are trying to access the value "at" an > address. But it's > far too late for these things now, so they will just remain > in my wishful > thinking category... Well yes, these are details. The main idea here is that the C/C++ languages get the job done. One could like more @, another could like more * and i think it is not possible all people to reach an agreement on what symbols to be used. Personally i like things as they are. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net * Alternative URL: http://run.to/noicys |
|
From: Bob W. <bo...@ph...> - 2002-06-15 03:10:17
|
Abhijit, > Wrong list. Go hide under a rock... a big one :) Well hell! I guess my mother and my wife were wrong and I am not perfect after all. Regards, Bob |
|
From: Ioannis V. <no...@ho...> - 2002-06-15 03:06:54
|
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf
> Of Abhijit Shylanath
> Sent: Friday, June 14, 2002 8:13 PM
> To: Dev-C++ Mailing List
> Subject: [Dev-C++] const modifier?
>
>
> I was just going through the sources of the class libraries
> in Turbo C++
> version 3.0, and found this code. How does the program modify
> aPtr even
> though it says it's a const?
const char *p means that it can not change the contents of the object
where it points. Example:
const char *p="constast string 1";
p="constant string 2";
To not be able to point to somewhere else:
// constant pointer
char * const p=some_char_array;
const char *const p="something";
p cannot point to somewhere else and cannot changge the object where it
points. For example:
cout<<p[2]; // valid
p[2]='7'; // invalid
p="something else"; //invalid
for(int i=0; i<18; i++)
cout<<"did you know that?"[i]; // valid
>
> -------CLASSLIB/SOURCE/STRNG.CPP------
> String::String( const char *aPtr )
> {
> if ( aPtr == 0 )
> aPtr = "";
>
> len = strlen( aPtr ) + 1;
> theString = new char[ len ];
> CHECK( theString != 0 );
> strcpy( theString, aPtr );
> }
> --------------------------------------
>
> After seeing this, I tried compiling the following file in
> MingW, and it did
> (with -Wall, no warnings)
>
> --------------------------------------
> void do_stuff(const char *buf)
> {
> if(!buf)
> buf = "";
> }
>
> int main()
> {
> do_stuff(0);
> return 0;
> }
> --------------------------------------
>
> How? Doesn't
> buf = "";
> translate to assign "" to buf?
A literal behaves like an array of chars. An array behaves like a
pointer to its first element. The first element here is '\0' (which is
always 0). I did not understand the last question btw.
Since you learn C++ i recommend you leave the low level stuff for
later, and learn to deal C++ as a high level language, and not as C.
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
* Alternative URL: http://run.to/noicys
|
|
From: Abhijit S. <mu...@gm...> - 2002-06-15 02:59:31
|
Thanks for that... BTW, I hate this SYNTAX, I hate this Syntax, I hate this syntax. Was that all right? :) -------------------------- http://mudeth.tripod.com ----- Original Message ----- From: "Mac Reiter" <re...@no...> To: "'Dev-C++ Mailing List'" <dev...@li...> Sent: Saturday, June 15, 2002 1:25 AM Subject: RE: [Dev-C++] const modifier? > Anybody care to join me in my mantra? > > I HATE THIS SYNTAX! > I Hate This Syntax! > i hate this syntax |
|
From: Abhijit S. <mu...@gm...> - 2002-06-15 02:59:22
|
Wrong list. Go hide under a rock... a big one :) -------------------------- http://mudeth.tripod.com ----- Original Message ----- From: "Bob Wilson" <bo...@ph...> To: "Dev-C++ User Mailing List" <dev...@li...> Sent: Saturday, June 15, 2002 4:02 AM Subject: [Dev-C++] Re: [Mingw-users] msvcrt & w32api trouble on XP > Arto, > > > Heap corruption was the answer, but this was self inflicted: I was > > allocating too little memory. (sizeof (type *) instead of sizeof (type)). > > > > Sorry... I'll go and hide under a rock now. A big rock. > > Don't be embarrassed. You found the error and that is the important thing. > > Bob |
|
From: Bob W. <bo...@ph...> - 2002-06-14 22:32:17
|
Arto, > Heap corruption was the answer, but this was self inflicted: I was > allocating too little memory. (sizeof (type *) instead of sizeof (type)). > > Sorry... I'll go and hide under a rock now. A big rock. Don't be embarrassed. You found the error and that is the important thing. Bob |
|
From: Hongli L. <h....@ch...> - 2002-06-14 21:16:31
|
A. Klingenstein wrote: >I want to write a program which has to run under *nix and win32. It's network related daemon which >uses socket.h and pthreads, and Dev-C++ seems to be the best IDE for gcc on win32 > >I tried to compile the win32 commandline project template with cygwin by choosing >"use cygwin instead of the mingw compiler" and put my d:\lang\cygwin\bin" into >Directories/Binaries. I even removed the mingw binary-directory from there >Whatever I do, Dev-C++ still uses either mingw compiler or no compiler at all. > >So how do I get Dev-C++ to use cygwin? Or if this is not possible, is there another >IDE which can use cygwin? >Mingw is not an option since it's too win32-centric for this project (winsock2 is just >not available on Linux) > >Alex > > > > Open bash and do make -f Makefile.win It will automatically compile using Cygwin's GCC. |
|
From: Juliano <jp...@bo...> - 2002-06-14 20:35:49
|
Oh God... :). I think its clear now... At least for me. Thank you. Juliano -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Mac Reiter Sent: sexta-feira, 14 de junho de 2002 16:55 To: 'Dev-C++ Mailing List' Subject: RE: [Dev-C++] const modifier? Quer ter seu pr=F3prio endere=E7o na Internet? Garanta j=E1 o seu e ainda ganhe cinco e-mails personalizados. = Dom=EDniosBOL - http://dominios.bol.com.br I must apologize for _part_ of my preceding post, and should remember to always run programs to make sure I'm not off slightly. I was still right about the particular case raised by Juliano: const char *y =3D=3D> (const char) (*) y =3D=3D> y is mutable pointer = to const char (mutable just means non-const) This means that "const char *y" will allow you to change *where* y points, but will not allow you to change the data that y is pointing at. If you read my previous post, you would think that what you want is: (WARNING : the following decomposition is incorrect!) char const *y =3D=3D> (char) (const *) y =3D=3D> y is const pointer to = mutable char However, this is *WRONG*. "char const *y" is functionally identical to "const char *y". (I really hate this syntax...) I discovered this while writing a test program. To make the pointer constant, but the characters mutable, you need: char * const y =3D=3D> (char *) (const y) =3D=3D> y is a const pointer = to mutable char (I hate this syntax. I hate this syntax. I hate this syntax.) Apparently C++ parses these two declarations identically: const char *y =3D=3D> (const char *) (y) char const *y =3D=3D> (char const *) (y) ------------------------------------------------------------------------ - THE MORAL OF THE STORY: Split pointer declarations at the '*'. Then you can tell where the const will be applied. const char * y =3D=3D> (const char) * (y) =3D=3D> chars are const, y is = mutable char const * y =3D=3D> (char const) * (y) =3D=3D> chars are const, y is = mutable char * const y =3D=3D> (char) * (const y) =3D=3D> chars are mutable, y = is const const char * const y =3D=3D> (const char) * (const y) =3D=3D> chars are const, y is const const char const * const y =3D=3D> (const char const) * (const y) = =3D=3D> warning: const specifier used twice ------------------------------------------------------------------------ - Here is the test code -- put it in a file and compile it. The compiler will throw an error on the two lines where a constant value is being changed (or trying to be changed...) int main(int argc, char **argv) { char buffer1[] =3D "Hello"; char buffer2[] =3D "World"; // This declares a mutable pointer that points to constant data const char * a =3D &(buffer1[0]); // This declares a constant pointer that points to mutable data char * const b =3D &(buffer1[0]); a[1] =3D 'u'; // illegal, because "mutable a" points to "const char" b[1] =3D 'u'; // OK, because "const b" is a mutable "char *" a =3D &(buffer2[0]); // OK, because "mutable a" can change b =3D &(buffer2[0]); // illegal, because "const b" cannot change = } Anybody care to join me in my mantra? I HATE THIS SYNTAX! I Hate This Syntax! i hate this syntax ... .. . Mac At 04:10 PM 6/14/02 -0300, Juliano wrote: > I'm sorry if I'm wrong, but... Isn't "const char *y" a way to say that=20 >the address value stored in the pointer "y" can't be changed? In other=20 >words, I can change the value pointed by the address stored in "y", but >I can't change the address stored in "y" itself. > > Isn't it the way pointers work? Am I doing something wrong? > > []s > Juliano [My previous post clipped out because it contained incorrect information, which I choose not to propagate any further... Mac] - _____________________________ /"\ Mac Reiter \ / ASCII Ribbon Campaign Nomadics, Inc. X Against HTML Mail re...@no... / \ (To join the campaign, simply use this in your signature.) =20 _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=3Dosdntextlink _______________________________________________ Dev-cpp-users mailing list Dev...@li... https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Greg R. <gr...@vi...> - 2002-06-14 20:16:07
|
Try putting the Cygwin directory first in your path ? (or at least before MingW). In Windows 2000, the path can be changed under System Properties,Advanced Tab --Greg ----- Original Message ----- From: "A. Klingenstein" <kli...@we...> To: <dev...@li...> Sent: Friday, June 14, 2002 1:16 PM Subject: [Dev-C++] How: cygwin-gcc as compiler for Dev-C++? I want to write a program which has to run under *nix and win32. It's network related daemon which uses socket.h and pthreads, and Dev-C++ seems to be the best IDE for gcc on win32 I tried to compile the win32 commandline project template with cygwin by choosing "use cygwin instead of the mingw compiler" and put my d:\lang\cygwin\bin" into Directories/Binaries. I even removed the mingw binary-directory from there Whatever I do, Dev-C++ still uses either mingw compiler or no compiler at all. So how do I get Dev-C++ to use cygwin? Or if this is not possible, is there another IDE which can use cygwin? Mingw is not an option since it's too win32-centric for this project (winsock2 is just not available on Linux) Alex _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=dntextlink _______________________________________________ Dev-cpp-users mailing list Dev...@li... https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Mac R. <re...@no...> - 2002-06-14 19:57:09
|
I must apologize for _part_ of my preceding post, and should remember to
always run programs to make sure I'm not off slightly. I was still right
about the particular case raised by Juliano:
const char *y ==> (const char) (*) y ==> y is mutable pointer to const char
(mutable just means non-const) This means that "const char *y" will allow
you to change *where* y points, but will not allow you to change the data
that y is pointing at.
If you read my previous post, you would think that what you want is:
(WARNING : the following decomposition is incorrect!)
char const *y ==> (char) (const *) y ==> y is const pointer to mutable char
However, this is *WRONG*. "char const *y" is functionally identical to
"const char *y". (I really hate this syntax...) I discovered this while
writing a test program. To make the pointer constant, but the characters
mutable, you need:
char * const y ==> (char *) (const y) ==> y is a const pointer to mutable char
(I hate this syntax. I hate this syntax. I hate this syntax.)
Apparently C++ parses these two declarations identically:
const char *y ==> (const char *) (y)
char const *y ==> (char const *) (y)
-------------------------------------------------------------------------
THE MORAL OF THE STORY:
Split pointer declarations at the '*'. Then you can tell where the
const will be applied.
const char * y ==> (const char) * (y) ==> chars are const, y is mutable
char const * y ==> (char const) * (y) ==> chars are const, y is mutable
char * const y ==> (char) * (const y) ==> chars are mutable, y is const
const char * const y ==> (const char) * (const y) ==>
chars are const, y is const
const char const * const y ==> (const char const) * (const y) ==>
warning: const specifier used twice
-------------------------------------------------------------------------
Here is the test code -- put it in a file and compile it. The compiler
will throw an error on the two lines where a constant value is being
changed (or trying to be changed...)
int main(int argc, char **argv)
{
char buffer1[] = "Hello";
char buffer2[] = "World";
// This declares a mutable pointer that points to constant data
const char * a = &(buffer1[0]);
// This declares a constant pointer that points to mutable data
char * const b = &(buffer1[0]);
a[1] = 'u'; // illegal, because "mutable a" points to "const char"
b[1] = 'u'; // OK, because "const b" is a mutable "char *"
a = &(buffer2[0]); // OK, because "mutable a" can change
b = &(buffer2[0]); // illegal, because "const b" cannot change
}
Anybody care to join me in my mantra?
I HATE THIS SYNTAX!
I Hate This Syntax!
i hate this syntax
...
..
.
Mac
At 04:10 PM 6/14/02 -0300, Juliano wrote:
> I'm sorry if I'm wrong, but... Isn't "const char *y" a way to
>say that the address value stored in the pointer "y" can't be changed?
>In other words, I can change the value pointed by the address stored in
>"y", but I can't change the address stored in "y" itself.
>
> Isn't it the way pointers work? Am I doing something wrong?
>
> []s
> Juliano
[My previous post clipped out because it contained incorrect information,
which I choose not to propagate any further... Mac]
-
_____________________________ /"\
Mac Reiter \ / ASCII Ribbon Campaign
Nomadics, Inc. X Against HTML Mail
re...@no... / \ (To join the campaign, simply use
this in your signature.)
|
|
From: Juliano <jp...@bo...> - 2002-06-14 19:11:08
|
I'm sorry if I'm wrong, but... Isn't "const char *y" a way to say that the address value stored in the pointer "y" can't be changed? In other words, I can change the value pointed by the address stored in "y", but I can't change the address stored in "y" itself. Isn't it the way pointers work? Am I doing something wrong? []s Juliano -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Mac Reiter Sent: sexta-feira, 14 de junho de 2002 15:50 To: Dev-C++ Mailing List Subject: Re: [Dev-C++] const modifier? Quer ter seu pr=F3prio endere=E7o na Internet? Garanta j=E1 o seu e ainda ganhe cinco e-mails personalizados. = Dom=EDniosBOL - http://dominios.bol.com.br const and pointers gets tricky, because there are TWO things that could be constant : the pointer itself, or the data that the pointer is pointing at. In the code you found (const char * aPtr), the const refers to the data that the pointer is pointing at. If, inside that function, you attempted to say something like: aPtr[0] =3D '\0'; The compiler should refuse it. Since technically the pointer is only pointing at the first character, it would not *HAVE* to refuse modifications to aPtr[1] or any later character, but I believe the C++ standard makes some special cases to handle arrays of chars because they are so prevalent. You can also have "char const * anotherPtr", which (if I haven't screwed this up) is a constant pointer to non-constant data. That would mean that: anotherPtr[0] =3D '\0'; would be legal, but: anotherPtr =3D ""; would not. Lastly, if you REALLY want everything to be constant, you can declare: const char const * lockedPtrToLockedData =3D "Hello World"; Nothing about that can be modified without silly casting tricks. To keep all this straight, try reading the declaration right-to-left: const char * aPtr =3D=3D (const char) (*) (aPtr) "aPtr is a pointer to constant characters" char const * bPtr =3D=3D (char) (const *) (bPtr) "bPtr is a constant pointer to characters" const char const * cPtr =3D=3D (const char) (const *) (cPtr) "cPtr is a constant pointer to constant characters" The really unfortunate thing about this is that you have to read the declaration right to left, but when you see "const" you have to associate it with the thing to its right. That always makes me feel like I'm having to flip between reading right-to-left and reading left-to-right. That ends the useful help section of this posting. Now for the whiny "I wish they'd done it differently part": I really wish that C had used the Pascal or (modern) BASIC declaration style: Pascal: MyInteger : INTEGER; BASIC: Dim MyInteger As Integer These declarations are read left to right, and can easily be extended for consts and pointers. Wouldn't the following have been easier to read? aPtr : * const char; // pointer to constant char bPtr : const * char; // constant pointer to char cPtr : const * const char; // constant pointer to constant char or, while I'm dreaming up changes that will never happen -- it has always bothered me that "char *" was a pointer, but to get a pointer from a variable, you used "&variable". From that standpoint, I would prefer & instead of * for declaration, resulting in: aPtr : & const char; etc. (Of course, you'd have to come up with a different character for references in C++) I also think that @ would be a better dereferencing operator than *, because you are trying to access the value "at" an address. But it's far too late for these things now, so they will just remain in my wishful thinking category... Mac At 10:42 PM 6/14/02 +0530, Abhijit Shylanath wrote: >I was just going through the sources of the class libraries in Turbo=20 >C++ version 3.0, and found this code. How does the program modify aPtr=20 >even though it says it's a const? > >-------CLASSLIB/SOURCE/STRNG.CPP------ >String::String( const char *aPtr ) >{ > if ( aPtr =3D=3D 0 ) > aPtr =3D ""; > > len =3D strlen( aPtr ) + 1; > theString =3D new char[ len ]; > CHECK( theString !=3D 0 ); > strcpy( theString, aPtr ); >} - _____________________________ /"\ Mac Reiter \ / ASCII Ribbon Campaign Nomadics, Inc. X Against HTML Mail re...@no... / \ (To join the campaign, simply use this in your signature.) =20 _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=3Dosdntextlink _______________________________________________ Dev-cpp-users mailing list Dev...@li... https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Mac R. <re...@no...> - 2002-06-14 18:51:56
|
const and pointers gets tricky, because there are TWO things that could be
constant : the pointer itself, or the data that the pointer is pointing at.
In the code you found (const char * aPtr), the const refers to the data
that the pointer is pointing at. If, inside that function, you attempted
to say something like:
aPtr[0] = '\0';
The compiler should refuse it. Since technically the pointer is only
pointing at the first character, it would not *HAVE* to refuse
modifications to aPtr[1] or any later character, but I believe the C++
standard makes some special cases to handle arrays of chars because they
are so prevalent.
You can also have "char const * anotherPtr", which (if I haven't screwed
this up) is a constant pointer to non-constant data. That would mean that:
anotherPtr[0] = '\0';
would be legal, but:
anotherPtr = "";
would not.
Lastly, if you REALLY want everything to be constant, you can declare:
const char const * lockedPtrToLockedData = "Hello World";
Nothing about that can be modified without silly casting tricks.
To keep all this straight, try reading the declaration right-to-left:
const char * aPtr == (const char) (*) (aPtr)
"aPtr is a pointer to constant characters"
char const * bPtr == (char) (const *) (bPtr)
"bPtr is a constant pointer to characters"
const char const * cPtr == (const char) (const *) (cPtr)
"cPtr is a constant pointer to constant characters"
The really unfortunate thing about this is that you have to read the
declaration right to left, but when you see "const" you have to associate
it with the thing to its right. That always makes me feel like I'm having
to flip between reading right-to-left and reading left-to-right.
That ends the useful help section of this posting. Now for the whiny "I
wish they'd done it differently part":
I really wish that C had used the Pascal or (modern) BASIC declaration style:
Pascal:
MyInteger : INTEGER;
BASIC:
Dim MyInteger As Integer
These declarations are read left to right, and can easily be extended for
consts and pointers. Wouldn't the following have been easier to read?
aPtr : * const char; // pointer to constant char
bPtr : const * char; // constant pointer to char
cPtr : const * const char; // constant pointer to constant char
or, while I'm dreaming up changes that will never happen -- it has always
bothered me that "char *" was a pointer, but to get a pointer from a
variable, you used "&variable". From that standpoint, I would prefer &
instead of * for declaration, resulting in:
aPtr : & const char;
etc.
(Of course, you'd have to come up with a different character for references
in C++) I also think that @ would be a better dereferencing operator than
*, because you are trying to access the value "at" an address. But it's
far too late for these things now, so they will just remain in my wishful
thinking category...
Mac
At 10:42 PM 6/14/02 +0530, Abhijit Shylanath wrote:
>I was just going through the sources of the class libraries in Turbo C++
>version 3.0, and found this code. How does the program modify aPtr even
>though it says it's a const?
>
>-------CLASSLIB/SOURCE/STRNG.CPP------
>String::String( const char *aPtr )
>{
> if ( aPtr == 0 )
> aPtr = "";
>
> len = strlen( aPtr ) + 1;
> theString = new char[ len ];
> CHECK( theString != 0 );
> strcpy( theString, aPtr );
>}
-
_____________________________ /"\
Mac Reiter \ / ASCII Ribbon Campaign
Nomadics, Inc. X Against HTML Mail
re...@no... / \ (To join the campaign, simply use
this in your signature.)
|
|
From: A. K. <kli...@we...> - 2002-06-14 17:17:01
|
I want to write a program which has to run under *nix and win32. It's ne= twork related daemon which uses socket.h and pthreads, and Dev-C++ seems to be the best IDE for gcc= on win32 I tried to compile the win32 commandline project template with cygwin by= choosing "use cygwin instead of the mingw compiler" and put my d:\lang\cygwin\bi= n" into Directories/Binaries. I even removed the mingw binary-directory from the= re Whatever I do, Dev-C++ still uses either mingw compiler or no compiler a= t all. So how do I get Dev-C++ to use cygwin? Or if this is not possible, is th= ere another IDE which can use cygwin? Mingw is not an option since it's too win32-centric for this project (wi= nsock2 is just not available on Linux) Alex |