dev-cpp-users Mailing List for Dev-C++ (Page 299)
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: Alvin T. <al...@th...> - 2003-10-29 15:43:38
|
<troll> i dissagree. french is very easy; all you need to learn is the phrase 'we surrender' and you're set! </troll> -alvin w. y. wrote: > Daniel Glenfield wrote: > >>I was thinking about learning Japanese. I always enjoyed learning european >>languages (I'm not great at any of them, French I'm ok at, but I enjoy >>learning snippets) > > > I think Japanese is easier than european languages because unlike say > French, it does not have millions of verb conjugations, millions of > irregular verbs and noun gender. There is also a very small number of > possible sounds in Japanese. Sentence structure is different, but not > difficult. To learn how to read/write, start with hiragana and katakana > which are the phonetic symbols. Afterwards you can start with kanji. > > Watching anime and reading manga in Japanese, which you find > interesting (<- very important), can be helpful. > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > 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: Alvin T. <al...@th...> - 2003-10-29 15:36:07
|
i'd like to know what's going on there, myself. where can i find this 'Item 5 in Effective STL (ESTL)' thing? and what's this 'ESTL'? if it's not online, can you briefly explain? -alvin Hossein Haeri wrote: > HI Joeri, > > Although I'm a Borland fan, in this special case, I think that DevC++ is right. > This is named to be: "C++'s most vexing feature" (or some variation of it), by Scott > Meyers. If you need the complete discusion, look Item 5 in Effective STL (ESTL). > I haven't got the book now, and am in a hurry. But if you need the bibliography do an > amazon search. > > In short, change the line you've mentioned to the following: > > outport((PORT+TXDOFFSET),(TXDHIGH)); > > Regards, > --Hossein |
|
From: EXT-Meyer, R. J <rob...@bo...> - 2003-10-29 15:28:50
|
I thought I was doing well, traversing through theForger's Win32 API = Tutorial, until I reached the simple applications part. That's when I = realized I didn't have a firm grasp on the difference between windows, = dialogs, and controls. He says, "controls are just windows" which = doesn't make sense. I thought controls lived within windows. Resource = usage is also a bit vague. It's an excellent tutorial but I need more = theory. I know I need to go buy a book, but I'm a bit short on cash and = the books are $50. Is there a good, extensive, online tutorial on C++ = which explains MFC, OpenSource/GL, APIs, etc, then goes, from the = beginning, explaining windows programming - dialogs, windows, resources, = classes, etc. I'm pretty good with programming in a UNIX environment, = but this windows stuff is very new, and very exciting. Also, which is the best book to buy when I raise the finances? Rob |
|
From: Paul H. <dra...@ne...> - 2003-10-29 14:53:29
|
1. The reason I wrote 'getimage(x-3,y-2,...)' is when I wrote 'getimage(x,
y,...)' it did'nt cover the complete text because the characters sometimes
goes over the actual starting point a little.
2. As for the char[70] parameter, I did that because in my program (which I
was using it for) I used char[70] right through it!
I did'nt need to put anything else in it! But I've changed it now!
3. (How do you check if LOOP (num) characters fits within your allocated
image buffer?) Good point! How do you?
Paul
> No, I haven't seen the reason for your problem. However, just some
> questions:
>
> - You assume that x >= 3, since you do getimage(x-1,...)
> - You assume that y >= 2, ...
> - As input you take a char[70] parameter but inside, you use num+1
> positions - why not just say char get_string[].
> - How do you check if LOOP (num) characters fits within your allocated
> image buffer?
>
> /Per W
>
> On Wed, 29 Oct 2003, Paul Hester wrote:
>
> > I've created a program in Dev-C++ and have no problem runing it! But
when i try to run it from the .EXE file it seems to behave differently. The
problem is I've created a function similar to 'cin.getline()' but for 'BGI'
graphics, the function works fine when i run it in Dev-C++.
> >
> > [code]
> >
> > void bgi_getline(int x, int y, char get_string[70], int num)
> > {
> > for(int LOOP2=0; LOOP2<70; LOOP2++)
> > {
> > get_string[LOOP2]=0;
> > }
> > void *image;
> > bool special_key_press=FALSE;
> > char any_string[20];
> > int size_string_height=textheight(any_string);
> > image=new char[imagesize(x-3,y-2,getmaxx(),y+size_string_height+5)];
> > getimage(x-3,y-2,getmaxx(),y+size_string_height+5,image);
> > for(int LOOP=0; LOOP<num; LOOP++)
> > {
> > get_string[LOOP]=getch();
> > if(get_string[LOOP]==0)
> > {
> > special_key_press=TRUE;
> > getch();
> > LOOP--;
> > }
> > else if((int)get_string[LOOP]==13)
> > {
> > get_string[LOOP]=0;
> > return;
> > }
> > else if((int)get_string[LOOP]==8)
> > {
> > if(LOOP==0)
> > {
> > get_string[LOOP]=0;
> > LOOP--;
> > }
> > else
> > {
> > get_string[LOOP]=0;
> > putimage(x-3,y-2,image,COPY_PUT);
> > get_string[LOOP-1]=0;
> > LOOP=LOOP-2;
> > }
> > }
> > else if(!(((int)get_string[LOOP]>=97) &&
((int)get_string[LOOP]<=122)))
> > {
> > if(!(((int)get_string[LOOP]>=65) && ((int)get_string[LOOP]<=90)))
> > {
> > if((int)get_string[LOOP]!=32)
> > {
> > get_string[LOOP]=0;
> > LOOP--;
> > }
> > }
> > }
> > if(special_key_press==FALSE)
> > {
> > outtextxy(x, y, get_string);
> > }
> > special_key_press=FALSE;
> > }
> > }
> >
> > [end code]
> >
> > When i run this in Dev-C++ it works fine but when i run the program from
the .EXE file it has a problem with the delete feature in 'void
bgi_getline(int, int, char, int)' As you can see in the code it gets the
image of the background first with 'getimage()' then puts it back with
'putimage()' so you can see the new string. In the .EXE file it deletes but
you can still see the old string there! For some weird reason it is not
using the 'getimage()' and 'putimage()' functions properly!
> > If anyone can help me in any way that would be great! Thank You!
> >
> > Paul
|
|
From: Alain P. <ala...@ge...> - 2003-10-29 14:12:37
|
Hi all, I just redo my program to use winsock.h instead of <sys/sock.h>. Now, the header is found, and there is no compilation problem. But the linker can't find the functions I use (like "socket", "htons", "bind", etc.). This means, I suppose, that at least one library is not found by the linker (message : "Undifined reference to socket@12"). What should I do so that the linker can find the necessary functions ? Thank you for any help. -- ----------------------------------------------- Alain Paschoud Jeux de groupes pour des enfants : http://www.webalain.ch/jeux Groupe choral "Gospel Melody" : http://www.gospelmelody.ch Annuaire des choeurs de Suisse : http://www.choeurs.ch Chorverzeichnis der Schweiz : http://www.gesang.ch ----------------------------------------------- |
|
From: Per W. <pw...@ia...> - 2003-10-29 13:44:25
|
No, I haven't seen the reason for your problem. However, just some
questions:
- You assume that x >= 3, since you do getimage(x-1,...)
- You assume that y >= 2, ...
- As input you take a char[70] parameter but inside, you use num+1
positions - why not just say char get_string[].
- How do you check if LOOP (num) characters fits within your allocated
image buffer?
/Per W
On Wed, 29 Oct 2003, Paul Hester wrote:
> I've created a program in Dev-C++ and have no problem runing it! But when i try to run it from the .EXE file it seems to behave differently. The problem is I've created a function similar to 'cin.getline()' but for 'BGI' graphics, the function works fine when i run it in Dev-C++.
>
> [code]
>
> void bgi_getline(int x, int y, char get_string[70], int num)
> {
> for(int LOOP2=0; LOOP2<70; LOOP2++)
> {
> get_string[LOOP2]=0;
> }
> void *image;
> bool special_key_press=FALSE;
> char any_string[20];
> int size_string_height=textheight(any_string);
> image=new char[imagesize(x-3,y-2,getmaxx(),y+size_string_height+5)];
> getimage(x-3,y-2,getmaxx(),y+size_string_height+5,image);
> for(int LOOP=0; LOOP<num; LOOP++)
> {
> get_string[LOOP]=getch();
> if(get_string[LOOP]==0)
> {
> special_key_press=TRUE;
> getch();
> LOOP--;
> }
> else if((int)get_string[LOOP]==13)
> {
> get_string[LOOP]=0;
> return;
> }
> else if((int)get_string[LOOP]==8)
> {
> if(LOOP==0)
> {
> get_string[LOOP]=0;
> LOOP--;
> }
> else
> {
> get_string[LOOP]=0;
> putimage(x-3,y-2,image,COPY_PUT);
> get_string[LOOP-1]=0;
> LOOP=LOOP-2;
> }
> }
> else if(!(((int)get_string[LOOP]>=97) && ((int)get_string[LOOP]<=122)))
> {
> if(!(((int)get_string[LOOP]>=65) && ((int)get_string[LOOP]<=90)))
> {
> if((int)get_string[LOOP]!=32)
> {
> get_string[LOOP]=0;
> LOOP--;
> }
> }
> }
> if(special_key_press==FALSE)
> {
> outtextxy(x, y, get_string);
> }
> special_key_press=FALSE;
> }
> }
>
> [end code]
>
> When i run this in Dev-C++ it works fine but when i run the program from the .EXE file it has a problem with the delete feature in 'void bgi_getline(int, int, char, int)' As you can see in the code it gets the image of the background first with 'getimage()' then puts it back with 'putimage()' so you can see the new string. In the .EXE file it deletes but you can still see the old string there! For some weird reason it is not using the 'getimage()' and 'putimage()' functions properly!
> If anyone can help me in any way that would be great! Thank You!
>
> Paul
|
|
From: hl <lh...@se...> - 2003-10-29 12:22:22
|
VGh4IQ0K |
|
From: w. y. <yok...@ve...> - 2003-10-29 12:20:10
|
Daniel Glenfield wrote: > > I was thinking about learning Japanese. I always enjoyed learning european > languages (I'm not great at any of them, French I'm ok at, but I enjoy > learning snippets) I think Japanese is easier than european languages because unlike say French, it does not have millions of verb conjugations, millions of irregular verbs and noun gender. There is also a very small number of possible sounds in Japanese. Sentence structure is different, but not difficult. To learn how to read/write, start with hiragana and katakana which are the phonetic symbols. Afterwards you can start with kanji. Watching anime and reading manga in Japanese, which you find interesting (<- very important), can be helpful. |
|
From: Hossein H. <ult...@em...> - 2003-10-29 11:12:54
|
HI Joeri, Although I'm a Borland fan, in this special case, I think that DevC++ is right. This is named to be: "C++'s most vexing feature" (or some variation of it), by Scott Meyers. If you need the complete discusion, look Item 5 in Effective STL (ESTL). I haven't got the book now, and am in a hurry. But if you need the bibliography do an amazon search. In short, change the line you've mentioned to the following: outport((PORT+TXDOFFSET),(TXDHIGH)); Regards, --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: Paul H. <dra...@ne...> - 2003-10-29 09:20:38
|
I've created a program in Dev-C++ and have no problem runing it! But =
when i try to run it from the .EXE file it seems to behave differently. =
The problem is I've created a function similar to 'cin.getline()' but =
for 'BGI' graphics, the function works fine when i run it in Dev-C++.=20
[code]
void bgi_getline(int x, int y, char get_string[70], int num)
{
for(int LOOP2=3D0; LOOP2<70; LOOP2++)
{
get_string[LOOP2]=3D0;
}
void *image;
bool special_key_press=3DFALSE;
char any_string[20];
int size_string_height=3Dtextheight(any_string);
image=3Dnew char[imagesize(x-3,y-2,getmaxx(),y+size_string_height+5)];
getimage(x-3,y-2,getmaxx(),y+size_string_height+5,image);
for(int LOOP=3D0; LOOP<num; LOOP++)
{
get_string[LOOP]=3Dgetch();
if(get_string[LOOP]=3D=3D0)
{
special_key_press=3DTRUE;
getch();
LOOP--;
}
else if((int)get_string[LOOP]=3D=3D13)
{
get_string[LOOP]=3D0;
return;
}
else if((int)get_string[LOOP]=3D=3D8)
{
if(LOOP=3D=3D0)
{
get_string[LOOP]=3D0;
LOOP--;
}
else
{
get_string[LOOP]=3D0;
putimage(x-3,y-2,image,COPY_PUT);
get_string[LOOP-1]=3D0;
LOOP=3DLOOP-2;
}
}
else if(!(((int)get_string[LOOP]>=3D97) && =
((int)get_string[LOOP]<=3D122)))
{
if(!(((int)get_string[LOOP]>=3D65) && ((int)get_string[LOOP]<=3D90)))
{
if((int)get_string[LOOP]!=3D32)
{
get_string[LOOP]=3D0;
LOOP--;
}
}
}
if(special_key_press=3D=3DFALSE)
{
outtextxy(x, y, get_string);
}
special_key_press=3DFALSE;
}
}
[end code]
When i run this in Dev-C++ it works fine but when i run the program from =
the .EXE file it has a problem with the delete feature in 'void =
bgi_getline(int, int, char, int)' As you can see in the code it gets =
the image of the background first with 'getimage()' then puts it back =
with 'putimage()' so you can see the new string. In the .EXE file it =
deletes but you can still see the old string there! For some weird =
reason it is not using the 'getimage()' and 'putimage()' functions =
properly!
If anyone can help me in any way that would be great! Thank You!
=
=20
Paul |
|
From: Hossein H. <ult...@em...> - 2003-10-29 09:11:49
|
Dear Matt, > Returning an STL container from a function is valid, but it will give you a > performance decrease. Every time you call this function, a new container is > created, filled, and then returned, upon which the entire container gets > copied over to the destination (element by element). Can't really recommend > a better way to solve it though, I usually lay my designs out differently :) As Paul has mentioned, it is hard to recommend anything. But just in case you want to adhere to your design, which I doubt to be a good choice, the member function could return a "reference" or "reference to constant" to the stack you are working with. This again depends to how you may want to use the returned stack. I presume that you know that this tends to saves you a lot! Regards, --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: <gen...@ya...> - 2003-10-29 07:44:41
|
Hello all, i think it might be possible to use ClanLib with Dev-C++ if the sources were built using Cygwin/Mingw. the problem, of course is actually building them. if you can download MSys (www.mingw.org), you can get a Cygwin-like environment to build the sources. cheers --------------------------------- Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger |
|
From: Daniel K. O. <dan...@ya...> - 2003-10-29 01:26:59
|
Just trying to help some poor souls out there... :) In Dev-C++, the compiler that is bundled is MinGW (go to www.mingw.org for more info). MinGW compiles Win32 apps. A Win32 app shouldn't access the hardware, only use the Win32 API to do what they need. So, there's no outportb, outport, outb, or whatever function to acess directly the I/O ports. Even if you "hack" it to do something like this, it won't be portable for another windows version, like Win2k or WinXP. Go read the Win32 API (like the "CreateFile" func). OR try to find a library that emulates those funcions. If you still think those funcions are needed, you can go back to DOS, using DJGPP, or even better, Turbo C++ 3.0, so you can play around with everything by yourself. AND, if anyone is still trying to use "asm with Dev-Cpp" (actually it's "asm with gcc"), please read the message I posted on Oct 24 (bellow); AND please: could the developers put some of these questions inside the help menu (in a way the user can remove them latter): * How to unsubscribe from the Dev-Cpp's mailing list (*IMPORTANT*) * Keeping the window open to read the output * How to use the serial/paralel port * How to use assembly with Dev-Cpp [quote from Oct 24] First: GCC uses AT&T syntax by default, but it accepts Intel as well. You can set which syntax you want to use by default, with the "-masm=x" compiler option, where "x" can be: "att" -> for AT&T syntax "intel" -> for Intel syntax (d'oh....) So, with -masm=intel you can write: --- char hello[] = "Hello"; __asm( "mov ebx, _hello \n" "more intel asm here... \n" ); --- And with -masm=att (the default) you can do: --- char hello[] = "Hello"; __asm( "mov $_hello, %ebx \n" "more at&t asm here... \n" ); --- If you want to mix ASM code, you can use ".intel_syntax" and ".att_syntax" to change the syntax for the next lines. Just don't forget to change it back to the default syntax: Option -> -masm=att (default) --- char hello[] = "Hello"; __asm( ".intel_syntax \n" "mov ebx, _hello \n" "more intel asm here... \n" ".att_syntax \n" // back to default syntax ); --- Also, check: http://www.codeproject.com/useritems/gccasm.asp And also the Dev-Cpp's FAQ. [/quote] Daniel K. O. |
|
From: JV <ver...@ya...> - 2003-10-28 23:35:05
|
Hi,
I am writing a small code that can set and unset the
different output pins of the serial port. I have write
a small test code in dev-c++ 4.0 but I get:
test.cpp:15: implicit declaration of function `int
outport(...)'
However, I have compile it in Borland C++ it works
well. What is the problem.
The test.cpp code:
#include <iostream.h>
#include <conio.h>
#include <dos.h>
#define PORT 0x3F8
#define TXDOFFSET 3
#define TXDHIGH 64
#define TXDLOW 0
int main(){
outport(PORT+TXDOFFSET,TXDHIGH);
return 0;
}
Thanks,
Joeri
__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/
|
|
From: cm <c....@fr...> - 2003-10-28 22:53:46
|
This week-end I migrated from Win2000 to WinXP I reinstalled DevCPP 4.9.8.0, I have no problem to recompile my project, and the behavior of the executable is the same, but there is no way to debug anymore. Does anyone have experience something from that sort ? |
|
From: John R. <jt...@ya...> - 2003-10-28 21:28:44
|
Anyone know how to get the following assembly code to work in Dev-C++? I'm using it in a C program.
-----------------------------------------------------------------
void outportb(UINT portid, BYTE value)
{
__asm mov edx,portid
__asm mov al,value
__asm out dx,al
}
BYTE inportb(UINT portid)
{
unsigned char value;
__asm mov edx,portid
__asm in al,dx
__asm mov value,al
return value;
}
-----------------------------------------------------------
---------------------------------
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears |
|
From: Michael D. S. <for...@hi...> - 2003-10-28 21:11:58
|
Can anyone point me to an example of an open source screen saver that uses pictures? The book I have goes over screen savers, screen saver controls, adding the control changes to the registry, and has nothing, and I mean nothing, about using graphics in the screen saver. Every screen saver I've ever seen was totally about graphics (except one:), and I would like some practice with that aspect as well. I'd also like to see some different methods of changing the picture in the window (desktop in this case). Fade out, center split, wipe from right/left/bottom/top, are some common methods. Nothing to elaborate though. ms |
|
From: Alvin T. <al...@th...> - 2003-10-28 20:50:00
|
ah, i see!
-alvin
P.D. van Zelst wrote:
> It gets checked. The "this" pointer passed to const member functions is
> const as well, so any attempt to modify member variables (or call non-const
> member functions) will result in errors.
>
>
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf Of Alvin
> Thompson
> Sent: Tuesday, October 28, 2003 8:20 PM
> To: Per Westermark
> Cc: de...@li...; dev...@li...
> Subject: Re: [Dev-C++] Syntax problem??? Parser error??
>
> i didn't know that either. does the compiler actually check the code to
> see if it tries to modify the List (and generate a compile error if it
> does), or is it more like a "gentleman's agreement"?
>
> -alvin
>
>
> Per Westermark wrote:
>
>
>>you have a class
>>
>>class List {
>>public:
>> bool isEmpty();
>>};
>>
>>If you rewrite it to:
>>
>>class List {
>>public:
>> bool isEmpty() const;
>>};
>>
>>you tell the compiler that isEmpty() will not perform any changes of the
>>List object. This informs the compiler to allow isEmpty() calls for a
>>const list object such as:
>>
>>void my_function(const List& list) {
>> if (!list.isEmpty()) {
>> ....
>> }
>>}
>>
>>/Per W
>>
>>On Tue, 28 Oct 2003, Devan Lippman wrote:
>>
>>
>>
>>>>From the following line of code:
>>> bool empty = aList.isEmpty();
>>>I'm getting this error:
>>> passing `const List' as `this' argument of `bool
>>> List::isEmpty()' discards qualifiers
>>>
>>>isEmpty() is a member function that returns a bool
>>>
>>>Thank you,
>>>Devan Lippman <dli...@co...>
>>>(617) 571-3017
>>>
>>>Using Dev-C++ version: 4.9.8.4
>>>
>>>Compiler Log:
>>>Compiler: Default compiler
>>>Building Makefile: "C:\Dev-Cpp\HW6\Makefile.win"
>>>Executing make...
>>>make.exe -f "C:\Dev-Cpp\HW6\Makefile.win" all
>>>g++.exe -c dlippman-6.cpp -o dlippman-6.o -I"C:/Dev-Cpp/include/c++"
>
> -I"C:/Dev-
>
>>>Cpp/include/c++/mingw32" -I"C:/Dev-Cpp/include/c++/backward" -I"C:/Dev-
>>>Cpp/include"
>>>
>>>dlippman-6.cpp: In function `void firstElement(const List&, ListItemType&,
>>> bool&)':
>>>dlippman-6.cpp:54: passing `const List' as `this' argument of `bool
>>>
>>> List::isEmpty()' discards qualifiers
>>>
>>>dlippman-6.cpp:56: passing `const List' as `this' argument of `void
>>> List::retrieve(int, ListItemType&, bool&)' discards qualifiers
>>>
>>>dlippman-6.cpp: In function `void lastElement(const List&, ListItemType&,
>>> bool&)':
>>>dlippman-6.cpp:63: passing `const List' as `this' argument of `bool
>>> List::isEmpty()' discards qualifiers
>>>
>>>dlippman-6.cpp:63: passing `const List' as `this' argument of `int
>>> List::getLength()' discards qualifiers
>>>
>>>dlippman-6.cpp:63: passing `const List' as `this' argument of `void
>>> List::retrieve(int, ListItemType&, bool&)' discards qualifiers
>>>
>>>dlippman-6.cpp: In function `void lookupValue(const List&, int, int&,
>
> bool&)':
>
>>>dlippman-6.cpp:75: passing `const List' as `this' argument of `int
>>> List::getLength()' discards qualifiers
>>>
>>>dlippman-6.cpp:76: passing `const List' as `this' argument of `void
>>> List::retrieve(int, ListItemType&, bool&)' discards qualifiers
>>>
>>>dlippman-6.cpp: In function `void testList()':
>>>
>>>dlippman-6.cpp:142: parse error before `{' token
>>>
>>>dlippman-6.cpp:149: return-statement with a value, in function declared
>
> with a
>
>>> void return type
>>>
>>>dlippman-6.cpp:153: parse error at end of input
>>>
>>>make.exe: *** [dlippman-6.o] Error 1
>>>
>>>Execution terminated
>>>
>>>
>>>
>>
>>
>>
>>
>>-------------------------------------------------------
>>This SF.net email is sponsored by: SF.net Giveback Program.
>>Does SourceForge.net help you be more productive? Does it
>>help you create better code? SHARE THE LOVE, and help us help
>>YOU! Click Here: http://sourceforge.net/donate/
>>_______________________________________________
>>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: SF.net Giveback Program.
> Does SourceForge.net help you be more productive? Does it
> help you create better code? SHARE THE LOVE, and help us help
> YOU! Click Here: http://sourceforge.net/donate/
> _______________________________________________
> 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: SF.net Giveback Program.
> Does SourceForge.net help you be more productive? Does it
> help you create better code? SHARE THE LOVE, and help us help
> YOU! Click Here: http://sourceforge.net/donate/
> _______________________________________________
> 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: Ed C. <em...@ed...> - 2003-10-28 19:48:14
|
Hi Tuukka, Thanks for the suggestions. I've already been very careful to look at = those possibilities, but there is no actual processing of any kind going on, = while this window is displayed - all that is happening is a message pump. -Ed -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Tuukka Lehtinen Sent: Tuesday, October 28, 2003 2:46 AM To: dev...@li... Subject: [Dev-C++] Re: Weird dialog corruption? > I've never run into this before, and I don't know what's causing it. Are you sore that working thread don't have memory leak problem ? This chould be happend if pointer is incorrect and write data over own=20 reserved memory. Becose application write own memory area windows think=20 that there isin't are enything wrong and don't kill application. The second idea is infinite loop that stop message processing. ------------------------------------------------------- This SF.net email is sponsored by: The SF.net Donation Program. Do you = like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click = here: http://sourceforge.net/donate/ _______________________________________________ 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: P.D. v. Z. <pa...@my...> - 2003-10-28 19:28:35
|
It gets checked. The "this" pointer passed to const member functions is
const as well, so any attempt to modify member variables (or call non-const
member functions) will result in errors.
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...] On Behalf Of Alvin
Thompson
Sent: Tuesday, October 28, 2003 8:20 PM
To: Per Westermark
Cc: de...@li...; dev...@li...
Subject: Re: [Dev-C++] Syntax problem??? Parser error??
i didn't know that either. does the compiler actually check the code to
see if it tries to modify the List (and generate a compile error if it
does), or is it more like a "gentleman's agreement"?
-alvin
Per Westermark wrote:
> you have a class
>
> class List {
> public:
> bool isEmpty();
> };
>
> If you rewrite it to:
>
> class List {
> public:
> bool isEmpty() const;
> };
>
> you tell the compiler that isEmpty() will not perform any changes of the
> List object. This informs the compiler to allow isEmpty() calls for a
> const list object such as:
>
> void my_function(const List& list) {
> if (!list.isEmpty()) {
> ....
> }
> }
>
> /Per W
>
> On Tue, 28 Oct 2003, Devan Lippman wrote:
>
>
>>>From the following line of code:
>> bool empty = aList.isEmpty();
>>I'm getting this error:
>> passing `const List' as `this' argument of `bool
>> List::isEmpty()' discards qualifiers
>>
>>isEmpty() is a member function that returns a bool
>>
>>Thank you,
>>Devan Lippman <dli...@co...>
>>(617) 571-3017
>>
>>Using Dev-C++ version: 4.9.8.4
>>
>>Compiler Log:
>>Compiler: Default compiler
>>Building Makefile: "C:\Dev-Cpp\HW6\Makefile.win"
>>Executing make...
>>make.exe -f "C:\Dev-Cpp\HW6\Makefile.win" all
>>g++.exe -c dlippman-6.cpp -o dlippman-6.o -I"C:/Dev-Cpp/include/c++"
-I"C:/Dev-
>>Cpp/include/c++/mingw32" -I"C:/Dev-Cpp/include/c++/backward" -I"C:/Dev-
>>Cpp/include"
>>
>>dlippman-6.cpp: In function `void firstElement(const List&, ListItemType&,
>> bool&)':
>>dlippman-6.cpp:54: passing `const List' as `this' argument of `bool
>>
>> List::isEmpty()' discards qualifiers
>>
>>dlippman-6.cpp:56: passing `const List' as `this' argument of `void
>> List::retrieve(int, ListItemType&, bool&)' discards qualifiers
>>
>>dlippman-6.cpp: In function `void lastElement(const List&, ListItemType&,
>> bool&)':
>>dlippman-6.cpp:63: passing `const List' as `this' argument of `bool
>> List::isEmpty()' discards qualifiers
>>
>>dlippman-6.cpp:63: passing `const List' as `this' argument of `int
>> List::getLength()' discards qualifiers
>>
>>dlippman-6.cpp:63: passing `const List' as `this' argument of `void
>> List::retrieve(int, ListItemType&, bool&)' discards qualifiers
>>
>>dlippman-6.cpp: In function `void lookupValue(const List&, int, int&,
bool&)':
>>
>>dlippman-6.cpp:75: passing `const List' as `this' argument of `int
>> List::getLength()' discards qualifiers
>>
>>dlippman-6.cpp:76: passing `const List' as `this' argument of `void
>> List::retrieve(int, ListItemType&, bool&)' discards qualifiers
>>
>>dlippman-6.cpp: In function `void testList()':
>>
>>dlippman-6.cpp:142: parse error before `{' token
>>
>>dlippman-6.cpp:149: return-statement with a value, in function declared
with a
>> void return type
>>
>>dlippman-6.cpp:153: parse error at end of input
>>
>>make.exe: *** [dlippman-6.o] Error 1
>>
>>Execution terminated
>>
>>
>>
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive? Does it
> help you create better code? SHARE THE LOVE, and help us help
> YOU! Click Here: http://sourceforge.net/donate/
> _______________________________________________
> 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: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
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: Alvin T. <al...@th...> - 2003-10-28 19:17:54
|
i didn't know that either. does the compiler actually check the code to
see if it tries to modify the List (and generate a compile error if it
does), or is it more like a "gentleman's agreement"?
-alvin
Per Westermark wrote:
> you have a class
>
> class List {
> public:
> bool isEmpty();
> };
>
> If you rewrite it to:
>
> class List {
> public:
> bool isEmpty() const;
> };
>
> you tell the compiler that isEmpty() will not perform any changes of the
> List object. This informs the compiler to allow isEmpty() calls for a
> const list object such as:
>
> void my_function(const List& list) {
> if (!list.isEmpty()) {
> ....
> }
> }
>
> /Per W
>
> On Tue, 28 Oct 2003, Devan Lippman wrote:
>
>
>>>From the following line of code:
>> bool empty = aList.isEmpty();
>>I'm getting this error:
>> passing `const List' as `this' argument of `bool
>> List::isEmpty()' discards qualifiers
>>
>>isEmpty() is a member function that returns a bool
>>
>>Thank you,
>>Devan Lippman <dli...@co...>
>>(617) 571-3017
>>
>>Using Dev-C++ version: 4.9.8.4
>>
>>Compiler Log:
>>Compiler: Default compiler
>>Building Makefile: "C:\Dev-Cpp\HW6\Makefile.win"
>>Executing make...
>>make.exe -f "C:\Dev-Cpp\HW6\Makefile.win" all
>>g++.exe -c dlippman-6.cpp -o dlippman-6.o -I"C:/Dev-Cpp/include/c++" -I"C:/Dev-
>>Cpp/include/c++/mingw32" -I"C:/Dev-Cpp/include/c++/backward" -I"C:/Dev-
>>Cpp/include"
>>
>>dlippman-6.cpp: In function `void firstElement(const List&, ListItemType&,
>> bool&)':
>>dlippman-6.cpp:54: passing `const List' as `this' argument of `bool
>>
>> List::isEmpty()' discards qualifiers
>>
>>dlippman-6.cpp:56: passing `const List' as `this' argument of `void
>> List::retrieve(int, ListItemType&, bool&)' discards qualifiers
>>
>>dlippman-6.cpp: In function `void lastElement(const List&, ListItemType&,
>> bool&)':
>>dlippman-6.cpp:63: passing `const List' as `this' argument of `bool
>> List::isEmpty()' discards qualifiers
>>
>>dlippman-6.cpp:63: passing `const List' as `this' argument of `int
>> List::getLength()' discards qualifiers
>>
>>dlippman-6.cpp:63: passing `const List' as `this' argument of `void
>> List::retrieve(int, ListItemType&, bool&)' discards qualifiers
>>
>>dlippman-6.cpp: In function `void lookupValue(const List&, int, int&, bool&)':
>>
>>dlippman-6.cpp:75: passing `const List' as `this' argument of `int
>> List::getLength()' discards qualifiers
>>
>>dlippman-6.cpp:76: passing `const List' as `this' argument of `void
>> List::retrieve(int, ListItemType&, bool&)' discards qualifiers
>>
>>dlippman-6.cpp: In function `void testList()':
>>
>>dlippman-6.cpp:142: parse error before `{' token
>>
>>dlippman-6.cpp:149: return-statement with a value, in function declared with a
>> void return type
>>
>>dlippman-6.cpp:153: parse error at end of input
>>
>>make.exe: *** [dlippman-6.o] Error 1
>>
>>Execution terminated
>>
>>
>>
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive? Does it
> help you create better code? SHARE THE LOVE, and help us help
> YOU! Click Here: http://sourceforge.net/donate/
> _______________________________________________
> 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: Per W. <pw...@ia...> - 2003-10-28 18:55:09
|
you have a class
class List {
public:
bool isEmpty();
};
If you rewrite it to:
class List {
public:
bool isEmpty() const;
};
you tell the compiler that isEmpty() will not perform any changes of the
List object. This informs the compiler to allow isEmpty() calls for a
const list object such as:
void my_function(const List& list) {
if (!list.isEmpty()) {
....
}
}
/Per W
On Tue, 28 Oct 2003, Devan Lippman wrote:
> >From the following line of code:
> bool empty = aList.isEmpty();
> I'm getting this error:
> passing `const List' as `this' argument of `bool
> List::isEmpty()' discards qualifiers
>
> isEmpty() is a member function that returns a bool
>
> Thank you,
> Devan Lippman <dli...@co...>
> (617) 571-3017
>
> Using Dev-C++ version: 4.9.8.4
>
> Compiler Log:
> Compiler: Default compiler
> Building Makefile: "C:\Dev-Cpp\HW6\Makefile.win"
> Executing make...
> make.exe -f "C:\Dev-Cpp\HW6\Makefile.win" all
> g++.exe -c dlippman-6.cpp -o dlippman-6.o -I"C:/Dev-Cpp/include/c++" -I"C:/Dev-
> Cpp/include/c++/mingw32" -I"C:/Dev-Cpp/include/c++/backward" -I"C:/Dev-
> Cpp/include"
>
> dlippman-6.cpp: In function `void firstElement(const List&, ListItemType&,
> bool&)':
> dlippman-6.cpp:54: passing `const List' as `this' argument of `bool
>
> List::isEmpty()' discards qualifiers
>
> dlippman-6.cpp:56: passing `const List' as `this' argument of `void
> List::retrieve(int, ListItemType&, bool&)' discards qualifiers
>
> dlippman-6.cpp: In function `void lastElement(const List&, ListItemType&,
> bool&)':
> dlippman-6.cpp:63: passing `const List' as `this' argument of `bool
> List::isEmpty()' discards qualifiers
>
> dlippman-6.cpp:63: passing `const List' as `this' argument of `int
> List::getLength()' discards qualifiers
>
> dlippman-6.cpp:63: passing `const List' as `this' argument of `void
> List::retrieve(int, ListItemType&, bool&)' discards qualifiers
>
> dlippman-6.cpp: In function `void lookupValue(const List&, int, int&, bool&)':
>
> dlippman-6.cpp:75: passing `const List' as `this' argument of `int
> List::getLength()' discards qualifiers
>
> dlippman-6.cpp:76: passing `const List' as `this' argument of `void
> List::retrieve(int, ListItemType&, bool&)' discards qualifiers
>
> dlippman-6.cpp: In function `void testList()':
>
> dlippman-6.cpp:142: parse error before `{' token
>
> dlippman-6.cpp:149: return-statement with a value, in function declared with a
> void return type
>
> dlippman-6.cpp:153: parse error at end of input
>
> make.exe: *** [dlippman-6.o] Error 1
>
> Execution terminated
>
>
>
|
|
From: Devan L. <dli...@co...> - 2003-10-28 18:46:53
|
From the following line of code:
bool empty = aList.isEmpty();
I'm getting this error:
passing `const List' as `this' argument of `bool
List::isEmpty()' discards qualifiers
isEmpty() is a member function that returns a bool
Thank you,
Devan Lippman <dli...@co...>
(617) 571-3017
Using Dev-C++ version: 4.9.8.4
Compiler Log:
Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\HW6\Makefile.win"
Executing make...
make.exe -f "C:\Dev-Cpp\HW6\Makefile.win" all
g++.exe -c dlippman-6.cpp -o dlippman-6.o -I"C:/Dev-Cpp/include/c++" -I"C:/Dev-
Cpp/include/c++/mingw32" -I"C:/Dev-Cpp/include/c++/backward" -I"C:/Dev-
Cpp/include"
dlippman-6.cpp: In function `void firstElement(const List&, ListItemType&,
bool&)':
dlippman-6.cpp:54: passing `const List' as `this' argument of `bool
List::isEmpty()' discards qualifiers
dlippman-6.cpp:56: passing `const List' as `this' argument of `void
List::retrieve(int, ListItemType&, bool&)' discards qualifiers
dlippman-6.cpp: In function `void lastElement(const List&, ListItemType&,
bool&)':
dlippman-6.cpp:63: passing `const List' as `this' argument of `bool
List::isEmpty()' discards qualifiers
dlippman-6.cpp:63: passing `const List' as `this' argument of `int
List::getLength()' discards qualifiers
dlippman-6.cpp:63: passing `const List' as `this' argument of `void
List::retrieve(int, ListItemType&, bool&)' discards qualifiers
dlippman-6.cpp: In function `void lookupValue(const List&, int, int&, bool&)':
dlippman-6.cpp:75: passing `const List' as `this' argument of `int
List::getLength()' discards qualifiers
dlippman-6.cpp:76: passing `const List' as `this' argument of `void
List::retrieve(int, ListItemType&, bool&)' discards qualifiers
dlippman-6.cpp: In function `void testList()':
dlippman-6.cpp:142: parse error before `{' token
dlippman-6.cpp:149: return-statement with a value, in function declared with a
void return type
dlippman-6.cpp:153: parse error at end of input
make.exe: *** [dlippman-6.o] Error 1
Execution terminated
|
|
From: Ferdinando F. <s2...@st...> - 2003-10-28 17:47:47
|
As far as I know, you can use Windows headers, that on TCP are very
similar to Linux ones. Well, not by header names, but you'll find a
socket, listen, accept, setsockopt, etc. functions with same arguments,
and so on: you'll only need to use send intead of write and recv intead of
read to do I/O on socket. This is the way Microsoft wished to be posix 1.0
compliant.
To do this you need to link a lib (winsock, or something similar, which
you should initialize before any network call with WSASturtup) and a
network header, but I don't remember its name. If you give a look on MSDN
on line. i.e. searching for socket: data over there are VisualC-oriented,
but Dev C++'s behaviour is identical.
I hope that's helpful to you.
Bye, Ferdinando
On Tue, 28 Oct 2003, Alain Paschoud wrote:
> Hi all,
>
> I'm new to dev-cpp, and I need to accept a TCP connection. As I did under
> Linux, I will use the bind and accepts functions. But to do that, I need to
> include the <sys/socket.h> header file. I did it (see below), but there is
> no socket.h file in the include directory of dev-cpp (result : accept_con.c
> sys\socket.h: No such file or directory). Here are my questions :
>
> Is there every required headers with Dev-cpp to do network programming ?
> Is there every necessary libraries ?
> Do I have to download something more to use sockets ?
>
> Best regards, and thank you for any help.
>
> Alain Paschoud
>
> **** Code example below ****
>
> #include <stdio.h>
> #include <sys/types.h>
> #include <sys/socket.h>
>
> #define MYPORT 3490
>
> int accept_con()
> {
> int sockfd;
> struct sockaddr_in my_addr;
>
> sockfd = socket(AF_INET, SOCK_STREAM, 0); // do some error checking!
>
> my_addr.sin_family = AF_INET; // host byte order
> my_addr.sin_port = htons(MYPORT); // short, network byte order
> my_addr.sin_addr.s_addr = htons(INADDR_ANY);
> memset(&(my_addr.sin_zero), '\0', 8); // zero the rest of the struct
>
> // don't forget your error checking for bind():
> bind(sockfd, (struct sockaddr *)&my_addr, sizeof(struct sockaddr));
>
> /* Accept connection */
> accept(sockfd, (struct sockaddr *) &my_addr, sizeof(struct
> sockaddr));
> }
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive? Does it
> help you create better code? SHARE THE LOVE, and help us help
> YOU! Click Here: http://sourceforge.net/donate/
> _______________________________________________
> 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: Frank W. <F.W...@wi...> - 2003-10-28 16:34:45
|
Hello Alain, on default the DevC++ IDE uses the Mingw system that comes with the GNU compiler and some of the GNU tools. But as far as I know it is not Linux compliant. If you want to use your Linux code to compile on Windwos maschines or port some programs you should try Cygwin ( www.cygwin.com ) that comes with all the stuff (headers libs) you have on Linux. I took a short look and found the socket.h in the /inc/sys directory of my cygwin installation. Hope this helps, Frank >>> "Alain Paschoud" <ala...@ge...> 10/28 4:30 >>> Hi all, I'm new to dev-cpp, and I need to accept a TCP connection. As I did under Linux, I will use the bind and accepts functions. But to do that, I need to include the <sys/socket.h> header file. I did it (see below), but there is no socket.h file in the include directory of dev-cpp (result : accept_con.c sys\socket.h: No such file or directory). Here are my questions : Is there every required headers with Dev-cpp to do network programming ? Is there every necessary libraries ? Do I have to download something more to use sockets ? Best regards, and thank you for any help. Alain Paschoud **** Code example below **** #include <stdio.h> #include <sys/types.h> #include <sys/socket.h> #define MYPORT 3490 int accept_con() { int sockfd; struct sockaddr_in my_addr; sockfd = socket(AF_INET, SOCK_STREAM, 0); // do some error checking! my_addr.sin_family = AF_INET; // host byte order my_addr.sin_port = htons(MYPORT); // short, network byte order my_addr.sin_addr.s_addr = htons(INADDR_ANY); memset(&(my_addr.sin_zero), '\0', 8); // zero the rest of the struct // don't forget your error checking for bind(): bind(sockfd, (struct sockaddr *)&my_addr, sizeof(struct sockaddr)); /* Accept connection */ accept(sockfd, (struct sockaddr *) &my_addr, sizeof(struct sockaddr)); } ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ 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 |