dev-cpp-users Mailing List for Dev-C++ (Page 170)
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: Cary H. <xen...@gm...> - 2004-11-08 14:44:54
|
Hi all, I hope this will be of some help.
By default, win2k and xp close a console(dos) window when the program
that is using it exits. In 2k, you can change the behavior of a
window to remain open once the program exits until you close it
yourself. XP, however, does not have this "feature". In my
experience, it is easiest to add the call system("pause") right before
the program terminates so that the window remains open. Another
option is to open the run command, type cmd, and open a console
window, and run the executable that way.
If you decide to go the system("pause") route, remember to add a
#include <stdlib.h> // for c
#include <cstdlib> // for c++
Good Luck!
Cary Haynie
ps. on a side note, system() should support any legal dos command,
not just pause.
On Mon, 08 Nov 2004 14:55:23 +0100, shocked <sh...@po...> wrote:
>
>
> Haim Bishop wrote:
>
> > Hello
> > I have installed Dev-C++ 4.9.9.0
> > I am using windows xp
> > When I run a program I have wrote
> > opens the dos window and then it closes.
> > How can I do that it will stay open after the
> > program ends to run.
> > Thank you.
> >
> >
>
> Hi,
>
> This problem sometimes appears in this Mlist, but AFAIK it has no
> straightforward solution
> Some workarounds I saw are
> -to put as last instruction a 'system("pause")' or a 'getchar()' or
> something similar that wait for an input
> -to place the cursor onto the last instruction and use the
> run-until-cursor debug command
>
> These are not the best, because if your code has many exit points (e.g
> in case of error) the window will be closed anyway.
>
> Hoping this help you, I say "goodbye"
>
> Andrea S. Atzeni
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Sybase ASE Linux Express Edition - download now for FREE
> LinuxWorld Reader's Choice Award Winner for best database on Linux.
> http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> _______________________________________________
> 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: Rob L. <rob...@nt...> - 2004-11-08 14:43:00
|
Hey folks I am a newbie to using the GDB debugger so please excuse me = for asking a simple question i want to put a watch point on a particular varaible e.g some int = variable..therefore i will know its run time value but the problem i have when i set a watch point it says the watch point = for the particular variable " not found in current context" can anyone explain what this means? or/and explain to me the proper = procedure to be able to set a watchpoint on a particular variable & thus = view its run time value. any help greatly appreciated & again apologies for my inexperience regards Rob |
|
From: shocked <sh...@po...> - 2004-11-08 13:54:30
|
Haim Bishop wrote:
> Hello
> I have installed Dev-C++ 4.9.9.0
> I am using windows xp
> When I run a program I have wrote
> opens the dos window and then it closes.
> How can I do that it will stay open after the
> program ends to run.
> Thank you.
>
>
Hi,
This problem sometimes appears in this Mlist, but AFAIK it has no
straightforward solution
Some workarounds I saw are
-to put as last instruction a 'system("pause")' or a 'getchar()' or
something similar that wait for an input
-to place the cursor onto the last instruction and use the
run-until-cursor debug command
These are not the best, because if your code has many exit points (e.g
in case of error) the window will be closed anyway.
Hoping this help you, I say "goodbye"
Andrea S. Atzeni
|
|
From: Pascal <p.t...@ti...> - 2004-11-08 11:09:59
|
Are you added in the main()? ---->
system("pause")
for not close directly the windows console when user make nothing.
|
|
From: Daniel K. O. <dan...@ya...> - 2004-11-08 08:19:22
|
Peter Dennis wrote: > So 0 means there are no flags? Precisely. Daniel K. O. |
|
From: Peter D. <don...@ne...> - 2004-11-08 08:03:14
|
Hi Daniel, So 0 means there are no flags? This is also from MSDN: The send <http://msdn.microsoft.com/library/en-us/winsock/winsock/send_2.asp> and recv <http://msdn.microsoft.com/library/en-us/winsock/winsock/recv_2.asp> functions both return an integer value of the number of bytes sent or received, respectively, or an error. Each function also takes the same parameters: the active socket, a char buffer, the number of bytes to send or receive, and any flags to use. From the man page: The flags parameter is the bitwise OR of zero or more of the following flags. So if you use 0 does this mean there are no flags? But if i use one of the flags such as MSG_OOB then I take it the bitwise OR of MSG_OOB is not equal to 0? For that matter is the bitwise of 0 equal to 0? Is this right? In the ballpark? Or am I still on my own planet? Thanks for your help, Peter. Daniel K. O. wrote: > Peter Dennis wrote: > >> sent = send( datasock, string, strlen( string ), 0); >> >> I understand the first 3 parameters but can someone tell me what the >> '0' is as the fourth parameter to the send function? (it is probably >> a flag but what does it do? does it mean there are no flags?) > > > > You can find Winsock documentation at MSDN; you can also Google for a > .hlp/.chm help file for off-line reference. > This is from > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/send_2.asp > : > > --- > int send( > SOCKET s, > const char* buf, > int len, > int flags > ); > > Parameters > > s > [in] Descriptor identifying a connected socket. > buf > [in] Buffer containing the data to be transmitted. > len > [in] Length of the data in buf, in bytes. > flags > [in] Indicator specifying the way in which the call is made. > > > (...) > > > The flags parameter can be used to influence the behavior of the > function beyond the options specified for the associated socket. The > semantics of this function are determined by the socket options and > the flags parameter. The latter is constructed by using the bitwise OR > operator with any of the following values. > > MSG_DONTROUTE Specifies that the data should not be subject to > routing. A Windows Sockets service provider can choose to ignore this > flag. > MSG_OOB Sends OOB data (stream-style socket such as SOCK_STREAM only. > --- > > > Daniel K. O. > > |
|
From: Daniel K. O. <dan...@ya...> - 2004-11-08 07:13:46
|
Peter Dennis wrote: > sent = send( datasock, string, strlen( string ), 0); > > I understand the first 3 parameters but can someone tell me what the > '0' is as the fourth parameter to the send function? (it is probably > a flag but what does it do? does it mean there are no flags?) You can find Winsock documentation at MSDN; you can also Google for a .hlp/.chm help file for off-line reference. This is from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/send_2.asp : --- int send( SOCKET s, const char* buf, int len, int flags ); Parameters s [in] Descriptor identifying a connected socket. buf [in] Buffer containing the data to be transmitted. len [in] Length of the data in buf, in bytes. flags [in] Indicator specifying the way in which the call is made. (...) The flags parameter can be used to influence the behavior of the function beyond the options specified for the associated socket. The semantics of this function are determined by the socket options and the flags parameter. The latter is constructed by using the bitwise OR operator with any of the following values. MSG_DONTROUTE Specifies that the data should not be subject to routing. A Windows Sockets service provider can choose to ignore this flag. MSG_OOB Sends OOB data (stream-style socket such as SOCK_STREAM only. --- Daniel K. O. |
|
From: Peter D. <don...@ne...> - 2004-11-08 06:08:44
|
Hi, In the send function as per: int send( int socket, const char *buffer, int len, int flags ); If I want to send data like the following: char* string = "hello, internet!"; int sent; sent = send( datasock, string, strlen( string ), 0); I understand the first 3 parameters but can someone tell me what the '0' is as the fourth parameter to the send function? (it is probably a flag but what does it do? does it mean there are no flags?) Many thanks, Peter. |
|
From: Pascal <p.t...@ti...> - 2004-11-07 23:15:14
|
Hello All, Can i use mstask.h with devcpp? I will programming task utilities. Thanks. |
|
From: Daniel K. O. <dan...@ya...> - 2004-11-07 22:24:15
|
spiro harvey wrote: >>When I run a program I have wrote >>opens the dos window and then it closes. >>How can I do that it will stay open after the >>program ends to run. >> >> > >is there a FAQ? should there be? > > Yes, there is. Both on the website, and one with the Dev-Cpp's help file. >I couldn't see one off the web page. > That's exactly why people always come here and ask this same question. Now a hint for the Dev-C++ developers: hide the mailing list address from the webpage, and put it inside the FAQ. So people won't be able to ask anything here before reading the FAQ. Daniel K. O. |
|
From: spiro h. <spi...@gm...> - 2004-11-07 21:14:28
|
> When I run a program I have wrote > opens the dos window and then it closes. > How can I do that it will stay open after the > program ends to run. is there a FAQ? should there be? I couldn't see one off the web page. -- "Here's a bucket, go and kick it." -- Kill Yourself (Stormtroopers of Death) my life: http://spiroharvey.blogspot.com |
|
From: Scott S. <ssi...@sp...> - 2004-11-07 19:07:44
|
More information is needed. Can you post the compiler log? --Scott Simontis-- MD T wrote: > Hi there, > I am the new member of DEV C++ users and downloaded it and installed it in my computer[ AMD Athlon 2000+, 512MB HUNDAI RAM, > SEAGATE 40GB HD, SONY FLOPPY DRIVE, FRONTEC ATX BOX, SAMSUNG 15" MONITOR, ASUS MOTHERBOARD AND WINDOWS XP O/S.] I have a problem and it is after typing the program in DEV C++ compiler and try to execute it ,"execution terminated" is the answer. Can you tell me what wrong am I doing or where can I get user guide for this compiler, Please? > I went through FAQs and could not find the answer, Hence the request and hope to see your immediate reply, > All the best, > MD T. > |
|
From: Scott S. <ssi...@sp...> - 2004-11-07 19:03:19
|
WXWIN is an environment variable. You may set an environment variable like this: 1. Go to the Control Panel 2. Open the system icon. 3. Click the advanced tab. 4. Click "Environment vairables." 5. It should say "User variables for (USER)" and "System variables". Click the new button under user variables. 6. Enter WXWIN for the variable name. 7. For the value, enter the path to the directory where WxWinodws is. For example, if you installed WxWindows is C:\WX, enter C:/WX. Why / instead of \? Although Windows uses \ for file paths, the MinGW uses /, just like UNIX and Linux. --Scott Simontis-- Roger Furer wrote: > Aloha from Honolulu, > I'm just beggining with a wxWidgets installation and some issues are > puzzelling me: the installation notes say to alter the WXWIN environment > variable. Can somebody tell me what that is? > The notes also say to use only forward slashes / to designate > directories and sub-directories (from my MSDOS days I still call 'em > that), I think that only applies within certain files or the WXWIN > environment variable since windows (I'm using WinXP Pro) has always used > back slashes \ in directory commands and when displaying same. Can > somebody help clear this up a bit? > Mahalo (Thank You), > Roger Furer > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Sybase ASE Linux Express Edition - download now for FREE > LinuxWorld Reader's Choice Award Winner for best database on Linux. > http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click > _______________________________________________ > 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: Justin F. <jus...@gm...> - 2004-11-07 15:46:57
|
Another function to implement it is:
System("PAUSE");
Best Wishes
On Sun, 07 Nov 2004 14:39:09 +0900, Peter Dennis <don...@ne...> wrote:
> Hi Haim,
>
> I am no expert but I found the following in a book i have.
> In your main() function insert the following lines:
> std::cout << "Press the enter key to exit";
> std::cin.ignore(std::cin.rdbuf()->in_avail() + 1);
>
> This just waits for the user to press the enter key.
>
> Not exactly sure what the std::cin.ignore stuff does as I said I copied
> it from a book :)
>
> Peter.
>
>
>
>
> Haim Bishop wrote:
>
> >Hello
> >I have installed Dev-C++ 4.9.9.0
> >I am using windows xp
> >When I run a program I have wrote
> >opens the dos window and then it closes.
> >How can I do that it will stay open after the
> >program ends to run.
> >Thank you.
> >
> >
> >-------------------------------------------------------
> >This SF.Net email is sponsored by:
> >Sybase ASE Linux Express Edition - download now for FREE
> >LinuxWorld Reader's Choice Award Winner for best database on Linux.
> >http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> >_______________________________________________
> >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:
> Sybase ASE Linux Express Edition - download now for FREE
> LinuxWorld Reader's Choice Award Winner for best database on Linux.
> http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> _______________________________________________
> 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
>
--
Thanks
Z.J.
|
|
From: Justin F. <jus...@gm...> - 2004-11-07 15:43:24
|
Thanks! I found the mirror.cfg under C:\Documents and Settings\Administrator\Local Settings\Application Data and added the line "devpaks.org=http://devpaks.org" Now devpaks.org appear in my mirror list. Thanks again :) On Sat, 06 Nov 2004 13:05:44 +0100, Michal Molhanec <mi...@mo...> wrote: > Justin Fan wrote: > > I can't find mirrors.cfg under the install path \Dev-CPP, and I can't > > find any files contains "PlaneMirrors.com" which is an existent mirror > > in Dev-CPP. > > Would you show me the full path? > > something like e.g.: > c:\documents and settings\<your_user_name>\Local Settings\Application Data > if you have 4.9.9.0 you can simply delete the mirrors.cfg file and the > devpaks.org mirror will show > > -- > Regards, > Michal > -- Thanks Z.J. |
|
From: Per W. <pw...@ia...> - 2004-11-07 14:07:15
|
The best thing with google is that if you misspell a word, you are likely to find a lot of hits anyway because of the huge number of indexed pages. Just the same with example source code. /Per W On Sun, 7 Nov 2004, Daniel K. O. wrote: > Krzysztof Kapu=C5=9Bcik wrote: > > > You could be right. I don't have the standard so I cannot be sure - if > > I am wrong and anyone have more accurate information - please reply. > > > > In Linux socket.h header file you can find: > > #define PF_INET x > > #define ... > > /* Address families AF_ - same as PF_ */ <=3D=3D note this > > > > I think we could assume that the values will be always equal. Why? > > Just because there are so many sources using AF_INET > > Then you could also assume that PF_INET =3D=3D AF_INET =3D=3D 2, and this= can be > considered right too: > > socket(2, 1, 6); /* "everybody" uses the same values anyways, so this > is "safe" */ > > > I even found on a Google search people writing references saying that > the correct way is to use: > > socket(AF_INET, SOCK_STREAM, PF_INET); > > Now *this one* I know for sure it's wrong, but if you type exactly this > on a Google search, you'll get some hits of people actually using this. > > > > The third thing is that socket() (as I found in google) checks for both > > AF_INET and PF_INET in function call and for sockaddr address family > > definition too - so probably it the contants change (AF_ not equal > > PF_) the socket() will work good. > > Yeah, probably. > But anyways, I prefer using PF_INET for a socket() call, so I'll be sure > that if I need to use the code on a "bizarre" (but working) sockets > implementation, this can't cause any problem. > > > > Daniel K. O. > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Sybase ASE Linux Express Edition - download now for FREE > LinuxWorld Reader's Choice Award Winner for best database on Linux. > http://ads.osdn.com/?ad_id=3D5588&alloc_id=3D12065&op=3Dclick > _______________________________________________ > 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: Daniel K. O. <dan...@ya...> - 2004-11-07 13:23:20
|
Obi wrote:
> You're right, my mistake. AF_ defines are for the sockaddr structures
> & PF_ for the socket call. However most
> of the literature uses AF_ for the socket call too. ( Some docs I have
> specifically say to use AF_ defines ).
Yes. The docs say different things, that's why I asked in the other
e-mail for the standard...
My offline Winsock 1 reference ("winsock.hlp") says:
---
SOCKET PASCAL FAR socket ( int af, int type, int protocol );
af An address format specification. The only format currently
supported is PF_INET, which is the ARPA Internet address format.
---
The MSDN's Winsock 2 reference for socket() doesn't say a word about the
constant that should be used.
Some articles there use AF_INET, but reference implementations mostly
use PF_INET (e.g.:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/ipv6_enabled_server_code_2.asp
).
Daniel K. O.
|
|
From: Daniel K. O. <dan...@ya...> - 2004-11-07 13:14:11
|
Krzysztof Kapuścik wrote: > You could be right. I don't have the standard so I cannot be sure - if > I am wrong and anyone have more accurate information - please reply. > > In Linux socket.h header file you can find: > #define PF_INET x > #define ... > /* Address families AF_ - same as PF_ */ <== note this > > I think we could assume that the values will be always equal. Why? > Just because there are so many sources using AF_INET Then you could also assume that PF_INET == AF_INET == 2, and this can be considered right too: socket(2, 1, 6); /* "everybody" uses the same values anyways, so this is "safe" */ I even found on a Google search people writing references saying that the correct way is to use: socket(AF_INET, SOCK_STREAM, PF_INET); Now *this one* I know for sure it's wrong, but if you type exactly this on a Google search, you'll get some hits of people actually using this. > The third thing is that socket() (as I found in google) checks for both > AF_INET and PF_INET in function call and for sockaddr address family > definition too - so probably it the contants change (AF_ not equal > PF_) the socket() will work good. Yeah, probably. But anyways, I prefer using PF_INET for a socket() call, so I'll be sure that if I need to use the code on a "bizarre" (but working) sockets implementation, this can't cause any problem. Daniel K. O. |
|
From: Per W. <pw...@ia...> - 2004-11-07 12:20:42
|
Trivial exercise. You have a static buffer large enough never to overflow for the numeric range you receive as input. You fill in the buffer from the end by taking your number modulo 10 to find one digit. Then number divided by time to shrink the number. Continue until number is zero. Observe to take special care if number was zero from the beginning. Also take care about negative numbers. Easiest is to set a flag that is was negative and then negate it and perform above algorithm. In end, check flag and if needed add a '-' to the buffer. Return the pointer to the first used character in the buffer. /Per W On Sat, 6 Nov 2004, Rob Lawless wrote: > I viewed the last previous thread about a strtoi function in whihc i understand fully > but now i would look to know how to implment a itostr function i.e conver an integer to a string > can someone please lead me in the right direction > regards > Rob |
|
From: <sa...@op...> - 2004-11-07 07:07:13
|
Daniel K. O. napisał(a): > Krzysztof Kapuścik wrote: > >> This is not exactly true. The BSD standard says that the AF_ value >> will be the same as PF_ value (this could be found on linux man pages). > > > Hm... really? From what I remember, it says they are *generally* the > same, but I may be wrong. > I'm curious now, does anyone know if it's possible to find on the > internet exactly what the BSD standard says? (for free, obviously... I > don't want to buy a book, I'm not THAT curious) > You could be right. I don't have the standard so I cannot be sure - if I am wrong and anyone have more accurate information - please reply. In Linux socket.h header file you can find: #define PF_INET x #define ... /* Address families AF_ - same as PF_ */ <== note this I think we could assume that the values will be always equal. Why? Just because there are so many sources using AF_INET (as I found in google the PF_INET was added later, so AF_INET was used before) - any change in standard will make them not runnable. The only addition will probably be adding some other AF_ to one PF_ (many address families for one protocol family) but probably it will be done this way: #define AF_INET PF_INET #define AF_SUPERINET (PF_INET + 1) #define AF_UNIT PF_UNIX to provide compability (this could be not true, it's just my imagination). The third thing is that socket() (as I found in google) checks for both AF_INET and PF_INET in function call and for sockaddr address family definition too - so probably it the contants change (AF_ not equal PF_) the socket() will work good. --- Have a nice day, Krzysztof Kapuscik |
|
From: Obi <ob...@ch...> - 2004-11-07 06:51:14
|
At 02:06 07/11/2004 -0200, Daniel K. O. wrote: >Krzysztof Kapu=C5=9Bcik wrote: > >>This is not exactly true. The BSD standard says that the AF_ value will=20 >>be the same as PF_ value (this could be found on linux man pages). > >Hm... really? From what I remember, it says they are *generally* the same,= =20 >but I may be wrong. >I'm curious now, does anyone know if it's possible to find on the internet= =20 >exactly what the BSD standard says? (for free, obviously... I don't want=20 >to buy a book, I'm not THAT curious) This is getting confusing now, the linux manpage lists the PF_ values, but= =20 refers to AF_ later on. The BSD manpage I found uses AF_ http://www.neosoft.com/neosoft/man/socket.2.html .. int socket(int domain, int type, int protocol) .. The domain parameter specifies a communications domain within which=20 communication will take place; this selects the protocol family which=20 should be used. These families are defined in the include file=20 <sys/socket.h>. The currently understood formats are .. AF_UNIX (UNIX internal protocols), AF_INET (ARPA Internet protocols), AF_ISO.... Hmmmmm. Also the Win32 docs call this parameter "address family" rather than=20 "protocol family".I don't have access to BSD or POSIX specs so I don't know= =20 the official line. It's a mystery.:-) |
|
From: Peter D. <don...@ne...> - 2004-11-07 05:39:23
|
Hi Haim, I am no expert but I found the following in a book i have. In your main() function insert the following lines: std::cout << "Press the enter key to exit"; std::cin.ignore(std::cin.rdbuf()->in_avail() + 1); This just waits for the user to press the enter key. Not exactly sure what the std::cin.ignore stuff does as I said I copied it from a book :) Peter. Haim Bishop wrote: >Hello >I have installed Dev-C++ 4.9.9.0 >I am using windows xp >When I run a program I have wrote >opens the dos window and then it closes. >How can I do that it will stay open after the >program ends to run. >Thank you. > > >------------------------------------------------------- >This SF.Net email is sponsored by: >Sybase ASE Linux Express Edition - download now for FREE >LinuxWorld Reader's Choice Award Winner for best database on Linux. >http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click >_______________________________________________ >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: Daniel K. O. <dan...@ya...> - 2004-11-07 04:07:01
|
Krzysztof Kapuścik wrote: > This is not exactly true. The BSD standard says that the AF_ value > will be the same as PF_ value (this could be found on linux man pages). Hm... really? From what I remember, it says they are *generally* the same, but I may be wrong. I'm curious now, does anyone know if it's possible to find on the internet exactly what the BSD standard says? (for free, obviously... I don't want to buy a book, I'm not THAT curious) Daniel K. O. |
|
From: MD T <md...@re...> - 2004-11-07 03:44:34
|
=A0Hi there,=0A I am the new member of DEV C++ users and downl= oaded it and installed it in my computer[ AMD Athlon 2000+, 512MB HUNDAI RA= M,=0ASEAGATE 40GB HD, SONY FLOPPY DRIVE, FRONTEC ATX BOX, SAMSUNG 15" MONIT= OR, ASUS MOTHERBOARD AND WINDOWS XP O/S.] I have a problem and it is after = typing the program in DEV C++ compiler and try to execute it ,"execution te= rminated" is the answer. Can you tell me what wrong am I doing or where can= I get user guide for this compiler, Please?=0AI went through FAQs and coul= d not find the answer, Hence the request and hope to see your immediate rep= ly,=0AAll the best,=0AMD T. =0A |
|
From: Obi <ob...@ch...> - 2004-11-07 00:36:55
|
At 18:10 06/11/2004 -0200, Daniel K. O. wrote: >Obi wrote: > >> ls = socket( AF_INET, SOCK_STREAM, 0 ); > >This is not right. Never call socket() with an AF_ argument; it should be >PF_ (PF_INET in this case). AF_INET just "works" here by coincidence, >because most of the BSD-sockets implementations use the same value for >them. This is just as correct as using "socket(2, 1, 0);". You're right, my mistake. AF_ defines are for the sockaddr structures & PF_ for the socket call. However most of the literature uses AF_ for the socket call too. ( Some docs I have specifically say to use AF_ defines ). FYI the above formcompiled and ran fine on Win32, Solaris & Linux. |