dev-cpp-users Mailing List for Dev-C++ (Page 77)
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: Marcelo D. <mds...@ya...> - 2006-08-05 14:42:29
|
Did you resolv your problem? I had a similar error: command not found, but when I reduced my linker command, bingo!! To resolv I installed CygWin and I use the g++ command to compile manually, or by a script, or by a make file, inside the CygWin enviroment. Bye. (o_o) Marcelo David --- Daniel Luna Rodríguez <dl...@gu...> escreveu: > Hi there: > > I'm in use of Dev C++ 4.9.9.2 > > I get a g++ 255 make error. > > It says to me: "Line is too long" > > Compiling is correct. > My problem is in linker process. > > > Any ideas? > > > Thaks in advance. > > > _______________________________________________________ O Yahoo! está de cara nova. Venha conferir! http://br.yahoo.com/preview |
|
From: Eric R. <eri...@cl...> - 2006-08-03 17:16:16
|
|
From: Per W. <pw...@ia...> - 2006-08-03 12:59:51
|
Transmit all pointers as numeric or text handles. Transmit structure data as comma-separated strings. When your strange language want to follow a "next" poiinter, it just calls a string = get_next_object_of_type_xx(handle) or res = get_next_object_of_type_xx(handle,string,stringsize) with the "next" handle as parameter and receives a new comma-separated string. If you do use comma-separated strings (CSV), just remember to handle any commas in string fields, i.e. convert them to hexadecimal or use break characters etc. /Per W On Thu, 3 Aug 2006, Thomas O'Hare wrote: > Hello All! > > I am using Dev-C++ in C++ mode to try and create an entry point into my > own DLL's based on the WinPCap Libraries. I need to export several of > my own functions to languages that do not inherently support C typed > structures. > > I am looking for the cleanest, fasted way to create an entry point for > my functions so I can use the DLL as a true library for the programming > languages lacking native structure support. > > I can open DLL's in these languages and call functions, but especially > "chained" (Next) structures are very very tricky to work with in any > language that does not have native support for C typed structures. > > Any docs, resources, suggestions, etc, are welcome. > -- > > Thanks, > ~ Thomas O'Hare ~ > President, RedTile, Inc. - DBA: RedTile Software > Web, Wireless, Network, Database & Systems Software > +1.407.295.9148 ; +49.8651.717950 ; http://www.RedTile.Com/ > Operations Manager; Virtual FoxPro User Group > To...@VF... ; http://www.VFUG.Org/ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > 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: Thomas O'H. <To...@Re...> - 2006-08-03 11:56:01
|
Hello All! I am using Dev-C++ in C++ mode to try and create an entry point into my own DLL's based on the WinPCap Libraries. I need to export several of my own functions to languages that do not inherently support C typed structures. I am looking for the cleanest, fasted way to create an entry point for my functions so I can use the DLL as a true library for the programming languages lacking native structure support. I can open DLL's in these languages and call functions, but especially "chained" (Next) structures are very very tricky to work with in any language that does not have native support for C typed structures. Any docs, resources, suggestions, etc, are welcome. -- Thanks, ~ Thomas O'Hare ~ President, RedTile, Inc. - DBA: RedTile Software Web, Wireless, Network, Database & Systems Software +1.407.295.9148 ; +49.8651.717950 ; http://www.RedTile.Com/ Operations Manager; Virtual FoxPro User Group To...@VF... ; http://www.VFUG.Org/ |
|
From: <su...@ma...> - 2006-08-02 19:08:50
|
This is an automated response. Thank you for contacting the Technical Support team at The MathWorks Ltd. = A technical support representative will be contacting you within 1 = business day. The following information will help us in responding to your request. If = you have already provided the information requested below, no further = action is required. 1) License number, release number, and operating system. Typing = =E2=80=9Cver=E2=80=9D at the MATLAB command prompt will list this = information. 2) Exact text of any error message(s) received = 3) All files (M-files, Simulink models, data files) and steps to reproduce = the issue. If you need to send in an executable or a zip file, please wait = until a support engineer contacts you. To provide this information, reply to this message keeping the Thread Id = listed at the bottom of this message intact. STUDENT VERSION USERS: If you are a student using the Student Version, = please note that email and phone support is available for product = installation, software crashes, or bug reporting. For all other enquiries,= contact your lecturer or visit the support web site at http://www.= mathworks.co.uk/support/. If you have any concerns about our technical support services, write to = tsm...@ma.... Technical Support Team The MathWorks Ltd Email: su...@ma... Tel: 01223 423200 Fax: 01223 423250 http://www.mathworks.co.uk/support [THREAD ID: 1-2ZOYVR] -----Original Message----- From: dev...@li... Sent: 8/2/2006 3:07:58 PM To: su...@ma... Subject: Dev-cpp-users Digest, Vol 3, Issue 1 = Send Dev-cpp-users mailing list submissions to dev...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/dev-cpp-users or, via email, send a message with subject or body 'help' to dev...@li... You can reach the person managing the list at dev...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of Dev-cpp-users digest..." Today's Topics: 1. about execl and C (crobber) 2. Re: about execl and C (Per Westermark) 3. Export (Thomas O'Hare) 4. Help wanted Troubleshooting Devc+++ (Vighnesh) ---------------------------------------------------------------------- Message: 1 Date: Wed, 2 Aug 2006 16:28:38 +0800 (CST) From: "crobber" <cr...@16...> Subject: [Dev-C++] about execl and C To: dev...@li... Message-ID: <44D...@bj...> Content-Type: text/plain; charset=3D"gb2312" I want to compare two EXECL files to know how many notes are common and = how many are defferent.how to do this in DEVC++ with only language C?(no = C++,no C #) = are there some references? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://sourceforge.net/mailarchive/forum.php?forum=3Ddev-cpp-= users/attachments/20060802/f6567589/attachment.html = ------------------------------ Message: 2 Date: Wed, 2 Aug 2006 11:13:23 +0200 (CEST) From: Per Westermark <pw...@ia...> Subject: Re: [Dev-C++] about execl and C To: crobber <cr...@16...> Cc: dev...@li... Message-ID: <Pin...@ia...> Content-Type: TEXT/PLAIN; charset=3DUS-ASCII You can't directly manipulate excel files without a 3rd-party library. To my knowledge, there are no free libraries available. Save the two files as xml instead. Then it is quite simple to parse the two trees and compare them. There are a large number of free libraries available for processing xml files. /Per W On Wed, 2 Aug 2006, crobber wrote: > > I want to compare two EXECL files to know how many notes are common and = how many are defferent.how to do this in DEVC++ with only language C?(no = C++,no C #) > are there some references? ------------------------------ Message: 3 Date: Wed, 02 Aug 2006 10:01:56 +0000 From: Thomas O'Hare <To...@Re...> Subject: [Dev-C++] Export To: Dev...@li... Message-ID: <44D...@Re...> Content-Type: text/plain; charset=3DISO-8859-1 I am just getting warmed up on Dev-C++. Seems really cool so far. Question; can anyone point me to some docs on exporting DLL functions using Dev-C++ for use with MS Windows??? I have some very in depth source code and I need to figure out the fastest way. I have lots of files in all shapes & sizes and of course no time. I need to export functions to languages that do not support structures, etc. So I have to add code to export structures in a very easily readable format -- maybe an XML type format. -- = Thanks, ~ Thomas O'Hare ~ President, RedTile, Inc. -- DBA: RedTile Software Web, Wireless, Network, Database & Systems Software +1.407.295.9148 http://www.RedTile.Com/ or http://www3.RedTile.Com/ Operations Manager, Virtual FoxPro User Group To...@VF... http://www.VFUG.Org/ or http://www3.VFUG.Org/ ------------------------------ Message: 4 Date: Wed, 2 Aug 2006 04:34:13 -0700 (PDT) From: Vighnesh <vig...@ya...> Subject: [Dev-C++] Help wanted Troubleshooting Devc+++ To: dev...@li... Message-ID: <200...@we...> Content-Type: text/plain; charset=3D"iso-8859-1" Hi; I am using Dev C++ ver 4.9.9.2. I have strange problem which I am = unable to solve. = problem: When I open Dev C++ the screen blanks out a few seconds then it opens.= The same thing happens when I compile or run any code the screen = momentarily blanks out then becomes normal and I get the result.I am not = experiencing such problem for other applications.Please tell me what to do. Vighnesh = = --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great = rates starting at 1?/min. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://sourceforge.net/mailarchive/forum.php?forum=3Ddev-cpp-= users/attachments/20060802/59cec168/attachment.html = ------------------------------ ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=3Djoin.= php&p=3Dsourceforge&CID=3DDEVDEV ------------------------------ _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users End of Dev-cpp-users Digest, Vol 3, Issue 1 ******************************************* |
|
From: Vighnesh <vig...@ya...> - 2006-08-02 11:34:21
|
Hi; I am using Dev C++ ver 4.9.9.2. I have strange problem which I am unable to solve. problem: When I open Dev C++ the screen blanks out a few seconds then it opens.The same thing happens when I compile or run any code the screen momentarily blanks out then becomes normal and I get the result.I am not experiencing such problem for other applications.Please tell me what to do. Vighnesh --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min. |
|
From: Thomas O'H. <To...@Re...> - 2006-08-02 10:02:11
|
I am just getting warmed up on Dev-C++. Seems really cool so far. Question; can anyone point me to some docs on exporting DLL functions using Dev-C++ for use with MS Windows??? I have some very in depth source code and I need to figure out the fastest way. I have lots of files in all shapes & sizes and of course no time. I need to export functions to languages that do not support structures, etc. So I have to add code to export structures in a very easily readable format -- maybe an XML type format. -- Thanks, ~ Thomas O'Hare ~ President, RedTile, Inc. -- DBA: RedTile Software Web, Wireless, Network, Database & Systems Software +1.407.295.9148 http://www.RedTile.Com/ or http://www3.RedTile.Com/ Operations Manager, Virtual FoxPro User Group To...@VF... http://www.VFUG.Org/ or http://www3.VFUG.Org/ |
|
From: Per W. <pw...@ia...> - 2006-08-02 09:13:40
|
You can't directly manipulate excel files without a 3rd-party library. To my knowledge, there are no free libraries available. Save the two files as xml instead. Then it is quite simple to parse the two trees and compare them. There are a large number of free libraries available for processing xml files. /Per W On Wed, 2 Aug 2006, crobber wrote: > > I want to compare two EXECL files to know how many notes are common and how many are defferent.how to do this in DEVC++ with only language C?(no C++,no C #) > are there some references? |
|
From: crobber <cr...@16...> - 2006-08-02 08:28:51
|
I want to compare two EXECL files to know how many notes are common and how many are defferent.how to do this in DEVC++ with only language C?(no C++,no C #) are there some references? |
|
From: William Mc C. <wil...@ms...> - 2006-07-28 21:26:25
|
Here's a Scam I wouldn't believe. I have a Virus on my PC named W32,NETSKY.P@MM!ENC. The reason I know = it's there is my SYMANTEC Virus Software (Norton AntiVirus) lets me know = everytime I sign on. Well to make a long story short, I contacted Symantec who will remove it = if I Pay an additional $38.00. This seems pretty strange, because Symantec (Norton) is the software = that allowed it to be copied to my PC. I also did a complete Scan of my PC and was advised by Symantec that = there was no Virus. Maybe there isn't but Symantec still wants to charge me for removing it! = Who knows, maybe Symantec put it on my PC. Everyone have a Great day. William |
|
From: Eric R. <eri...@cl...> - 2006-07-28 19:09:18
|
NOW YOU might guess what this is all about I was hoping to change my email address due spam, but it did not work I will try better later I must go I am getting late now ----- Original Message ----- From: Eric Richards <eri...@cl...> To: <dev...@li...> Sent: Wednesday, July 26, 2006 6:00 AM Subject: [Dev-C++] (no subject) ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ 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 -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.10.4/396 - Release Date: 24-07-06 |
|
From: Eric R. <eri...@cl...> - 2006-07-25 18:40:54
|
|
From: Mark L. <mar...@qu...> - 2006-07-19 00:13:35
|
-----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of dev...@li... Sent: Wednesday, 19 July 2006 9:50 AM To: dev...@li... Subject: Dev-cpp-users Digest, Vol 2, Issue 9 Send Dev-cpp-users mailing list submissions to dev...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/dev-cpp-users or, via email, send a message with subject or body 'help' to dev...@li... You can reach the person managing the list at dev...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of Dev-cpp-users digest..." Today's Topics: 1. Re: Code Profiler (Per Westermark) ---------------------------------------------------------------------- Message: 1 Date: Tue, 18 Jul 2006 00:39:58 +0200 (CEST) From: Per Westermark <pw...@ia...> Subject: Re: [Dev-C++] Code Profiler To: Eric Richards <eri...@cl...> Cc: DEV CPP <dev...@li...> Message-ID: <Pin...@ia...> Content-Type: TEXT/PLAIN; charset=3DUS-ASCII No, just leaving the answer to google. Nothing magic about to use of gprof. /Per W On Tue, 18 Jul 2006, Eric Richards wrote: > Is this group on holiday > ----- Original Message ----- > From: Noorez Kassam > To: DEV CPP > Sent: Thursday, July 13, 2006 4:43 PM > Subject: [Dev-C++] Code Profiler > > > I was wondering how to use the code profiler. I turned it on in compiling. When I executed my program, it spat out a .out file. Is the code profile information? > > > > > > ------------------------------------------------------------------------ ------ > Be one of the first to try Windows Live Mail. > > > ------------------------------------------------------------------------ ------ > > > > ------------------------------------------------------------------------ - > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 121642 > > > > ------------------------------------------------------------------------ ------ > > > _______________________________________________ > 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 > ------------------------------ ------------------------------------------------------------------------ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDE V ------------------------------ _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users End of Dev-cpp-users Digest, Vol 2, Issue 9 ******************************************* |
|
From: Per W. <pw...@ia...> - 2006-07-17 22:40:25
|
No, just leaving the answer to google. Nothing magic about to use of gprof. /Per W On Tue, 18 Jul 2006, Eric Richards wrote: > Is this group on holiday > ----- Original Message ----- > From: Noorez Kassam > To: DEV CPP > Sent: Thursday, July 13, 2006 4:43 PM > Subject: [Dev-C++] Code Profiler > > > I was wondering how to use the code profiler. I turned it on in compiling. When I executed my program, it spat out a .out file. Is the code profile information? > > > > > > ------------------------------------------------------------------------------ > Be one of the first to try Windows Live Mail. > > > ------------------------------------------------------------------------------ > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > 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: Noorez K. <lor...@ho...> - 2006-07-13 04:43:12
|
I was wondering how to use the code profiler. I turned it on in compiling. = When I executed my program, it spat out a .out file. Is the code profile in= formation? _________________________________________________________________ Be one of the first to try Windows Live Mail. http://ideas.live.com/programpage.aspx?versionId=3D5d21c51a-b161-4314-9b0e-= 4911fb2b2e6d= |
|
From: Per W. <pw...@ia...> - 2006-07-12 12:44:30
|
The (almost) only difference between opening a stream as binary or text is
that newline is encoded different on different OS, and in text mode, the
runtime library will auto-convert newline characters on read/write.
Some runtime libraries will also be affected by end-of-file characters,
i.e. if file is opened in text mode, they will stop reading when a
end-of-file character is found. In binary mode, there are no end-of-file
characters, and the file ends when the total number of available
characters has been read, i.e. the full size of the input file.
fread/fwrite are used to read/write buffers. These can contain binary
data, or they can contain normal text data generated with sprintf() or
parsed with sscanf() or similar. It is always up to the programmer to
know/decide if a file is binary or ascii, and use corresponding methods to
extract numbers and text from the file.
If the file is binary, you can use fread() to read a number directly into
a variable with (note not so portable because of size of an int, and byte
order between different architectures):
int n;
fread(&n,sizeof(n),1,f);
If the file is storing the data in ascii format, you can use fscanf() to
parse data directly from the file, or fgets() to read a line of text and
then extract data with atoi(), sscanf() etc or you can read a block of
data with fread() and then manually check for newline charcters etc with
strchr() or similar.
When writing binary data to file (or reading back) it is almost often best
to treat the binary file as a stream of bytes and have the code itself
split a binary integer into byte values to read/write. This assures that
it is possible to move the binary file between machines of different
architecture. The exception is for temporary files that you know never
will be moved between machines.
Example code to read/write binary data a bit more protable might look
like:
int write32(unsigned n) {
unsigned char buf[4];
buf[0] = (unsigned char)n;
buf[1] = (unsigned char)(n >> 8);
buf[2] = (unsigned char)(n >> 16);
buf[3] = (unsigned char)(n >> 24);
return fwrite(buf,4,1,f) == 4;
}
int read32(unsigned& n) {
unsigned char buf[4];
unsigned tmp;
if (fread(buf,4,1,f) != 4) return 0;
tmp = buf[0];
tmp += ((unsigned)buf[1]) << 8;
tmp += ((unsigned)buf[2]) << 16;
tmp += ((unsigned)buf[3]) << 24;
n = tmp;
return 1;
}
/Per W
On Wed, 12 Jul 2006, Farzan Hajian wrote:
> Dear Per Westermark,
>
> Thanks for your answer. It was really amazing ! But that caused a
> question.
> Do you mean that the ONLY, ONLY, and ONLY difference between text
> streams and binary streams is the way that they handle NEWLINE ?????
> Before I read your mail ,I used to consider that the difference is
> the way that numbers are processed.
>
> Imagine we have:
>
> int i=12;
> fprintf(file,"%i",i);
>
> As you know,the result file will have 2 bytes because "12" contains
> only 2 ASCII characters.In other words,the number 12 is first stringized
> and then it is into the file. But assume we use
>
> int i=12;
> fwrite(&i,sizeof(int),1,file);
>
> the made file will be 4 bytes long since integers consume 4 bytes.And
This assumes a 32-bit architecture, and the file opened in binary mode.
Using a 64-bit processor with a 64-bit OS, the file will be 8 bytes large.
If the file wasn't opened in binary mode, and i had a binary value looking
like a newline, the runtime library would - depending on platform -
convert the binary data into garbage.
For example, the value 10 should be written as 0x0A, 0x00, 0x00, 0x00 on a
32-bit Intel. In text mode on a Windows machine it will be written as
0x0D, 0x0A, 0x00, 0x00, 0x00 because 0x0A = '\n' and 0x0D = '\r'. The
output file got a CR + LF line break.
The danger here is that Unix machines doesn't do any text conversion, so
on Unix, the source code doesn't need to specify a binary or ascii
conversion to work correctly. When such code is ported to Windows, it
will fail unless the fopen() calls are fixed.
> of course, it is impossible to read this file using a text editor
> because the BINARY format of "12" is used and the number is not stringized.
Correct. And if you opened the file in text mode, some integers will have
a binary representation that will look like newline charactesr - as
mentioned above - resulting in a file that no program can correctly read
back.
Assume that the file was written correctly and contained an integer
looking like:
0x0D 0x0A 0x00 0x00 xx xx xx xx
which represents the value 13 + 10*256 = 2573 on a 32-bit Intel.
When trying to read the file - but opening the file in text mode - the
program will instead read:
0x0A 0x00 0x00 xx
i.e. the input file will be too short, and we either can't load enough
bytes or we will load an incorrect integer because some of the bytes in
the integer comes from the following data in the file.
>
> By reading what you said I'm getting to realized that the idea I had,
> was wrong and how numbers are handled is not related to the type of
> streams but to the function.
Correct!
> And if so, is there any other character change in a text stream
> (except newline of course!)???
There are no other conversions. However, on some systems, there is the
possibility of a end-of-file character stopping the read early. There
are ancient OS that doesn't keep track of exact file sizes - just number
of blocks.
>
> Thanks,
>
>
> On Wed, 12 Jul 2006 01:59:48 +0330, Per Westermark <pw...@ia...>
> wrote:
>
> > Hungry Mind
>
>
>
> --
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
>
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> 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: Farzan H. <far...@ho...> - 2006-07-12 11:55:48
|
Dear Per Westermark, Thanks for your answer. It was really amazing ! But that caused a question. Do you mean that the ONLY, ONLY, and ONLY difference between text streams and binary streams is the way that they handle NEWLINE ????? Before I read your mail ,I used to consider that the difference is the way that numbers are processed. Imagine we have: int i=3D12; fprintf(file,"%i",i); As you know,the result file will have 2 bytes because "12" contains only 2 ASCII characters.In other words,the number 12 is first stringized and then it is into the file. But assume we use int i=3D12; fwrite(&i,sizeof(int),1,file); the made file will be 4 bytes long since integers consume 4 bytes.And of course, it is impossible to read this file using a text editor because the BINARY format of "12" is used and the number is not stringize= d. By reading what you said I'm getting to realized that the idea I had, was wrong and how numbers are handled is not related to the type of streams but to the function. And if so, is there any other character change in a text stream (except newline of course!)??? Thanks, On Wed, 12 Jul 2006 01:59:48 +0330, Per Westermark <pw...@ia...>= =20 wrote: > Hungry Mind --=20 Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ |
|
From: Per W. <pw...@ia...> - 2006-07-11 22:30:09
|
Don't know what you are talking about.
Test with the following source:
#include <stdio.h>
int main() {
FILE *f;
f = fopen("test.bin","wb");
if (f) {
fprintf(f,"test\n\n\n");
fwrite("test\n\n\n",1,7,f);
fclose(f);
}
f = fopen("test.txt","wt");
if (f) {
fprintf(f,"test\n\n\n");
fwrite("test\n\n\n",1,7,f);
fclose(f);
}
return 0;
}
Using MinGW 3.4.2 on WinXP gives:
2006-07-12 00:23 14 test.bin
2006-07-12 00:23 20 test.txt
The text file is 6 bytes larger, as expected.
Note that if same source is run on Linux, the result will be:
-rw-r--r-- 1 pwm pwm 14 2006-07-12 00:25 test.txt
-rw-r--r-- 1 pwm pwm 14 2006-07-12 00:25 test.bin
Same size as expected, since the text format uses a single-character
newline sequence on unix systems.
Both fprintf() and fwrite() will be affected by file opening mode when
using MSDOS or Windows compiler.
/Per W
On Tue, 11 Jul 2006, Hungry Mind wrote:
> Yes, you're right...I got the same results on Windows...Are you using it
> too?
>
>
>
> 2006/7/8, Farzan Hajian <far...@ho...>:
> >
> > hi,
> >
> > I've noticed that fwrite() writes data in binary format and fprintf()
> > writes data in text format regardless to the mode I use in fopen() to
> > open the file.
> > In this situation, what the mode argument of fopen() readlly does????
> > I've examined this, with DEV-C++ and Digital Mars compilers and both
> > have produced a same result.
> >
> > Thanx,
> >
> > --
> > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
> >
> >
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job
> > easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > _______________________________________________
> > 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: Hungry M. <the...@gm...> - 2006-07-11 22:05:56
|
Yes, you're right...I got the same results on Windows...Are you using it too? 2006/7/8, Farzan Hajian <far...@ho...>: > > hi, > > I've noticed that fwrite() writes data in binary format and fprintf() > writes data in text format regardless to the mode I use in fopen() to > open the file. > In this situation, what the mode argument of fopen() readlly does???? > I've examined this, with DEV-C++ and Digital Mars compilers and both > have produced a same result. > > Thanx, > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ > > > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > 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: simon k. <mal...@gm...> - 2006-07-11 17:45:15
|
Hi, I'm installing a GTK package to Dev-Cpp. Problem is, the package has entered all the files like *include/gtk-2.0/gtk/gtk.h*. All the files in the package has entered in their include lines only *gtk/gtk.h*. I can change MY files to the whole thing(that is *gtk-2.0/gtk/gtk.h*, since include/ is not needed), but there's alot of header files and anyway it seems like a stupid idea to change them all(even if I could). So's, I suppose there should be some way of dealing with this without changing the name? Setting in the Compiler Options, perhaps? That's as far as I can guess, ANY answer would be greatly appreciated(No, not any, but you get my point). |
|
From: Robert A. <ral...@gm...> - 2006-07-08 11:45:30
|
Hello,
It is OS dependent. Under most if not all Unix there is no
difference.
-Robert
On 7/8/06, Farzan Hajian <far...@ho...> wrote:
>
> hi,
>
> I've noticed that fwrite() writes data in binary format and fprintf()
> writes data in text format regardless to the mode I use in fopen() to
> open the file.
> In this situation, what the mode argument of fopen() readlly does????
> I've examined this, with DEV-C++ and Digital Mars compilers and both
> have produced a same result.
>
> Thanx,
>
> --
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
>
>
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> 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: Farzan H. <far...@ho...> - 2006-07-08 10:02:42
|
hi, I've noticed that fwrite() writes data in binary format and fprintf() writes data in text format regardless to the mode I use in fopen() to open the file. In this situation, what the mode argument of fopen() readlly does???? I've examined this, with DEV-C++ and Digital Mars compilers and both have produced a same result. Thanx, --=20 Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ |
|
From: Scott <fre...@ve...> - 2006-07-06 19:54:53
|
I'm interested in doing some dualprocesser testing, Does anyone know of any various methods for writing a quick, Hello World using multiple threads? Do i have access to threading through GCC? Any ideas, source or resources would be appreciated. Cheers, Scott. |
|
From: Per W. <pw...@ia...> - 2006-07-01 21:54:31
|
Look at wxWidgets samples, not at wxWidgets implementation. /Per W On Fri, 30 Jun 2006, Noorez Kassam wrote: > I am wondering how wxWidgets events work. I was trying to study the source but it didn't make much sense to me. I found a WinProc function under the window.cpp file but this is the only one I found. If the window were to have other child controls, and if events were to go to that WinProc function, how would it know what control sent it, since the number of controls can vary for any program? > _________________________________________________________________ > Be one of the first to try Windows Live Mail. > http://ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d |
|
From: Lord S. <lor...@gm...> - 2006-07-01 18:16:30
|
On 7/1/06, Tobias Hudec <to...@po...> wrote:
> How can I put components to formular like in C++ Builder?
Are you talking about GUI Building, where you graphically build user
interfaces using the mouse? That's not a feature of Dev C++.
Besides... half the fun is building the GUIs by hand!
--
========== GCv3.12 ==========
GCS d-(++) s+: a? C++ UL+>++++ P+
L++ E--- W+(+++) N++ o? K? w--- O? M+
V? PS- PE+ Y-(--) PGP- t+++ 5? X R tv-- b+
DI+++ D+ G e* h- !r !y
========= END GCv3.12 ========
|