dev-cpp-users Mailing List for Dev-C++ (Page 130)
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: <Mat...@Ve...> - 2005-05-25 16:19:31
|
Set the compiler options in the preferences. -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of Gautham Nookala Sent: Wednesday, May 25, 2005 8:24 AM To: dev...@li... Subject: [Dev-C++] assembly listing How do I get the assembly listing for a C++ program? Using command line gcc the option -S gives me assembly output. How do I do the same in Dev-C++ IDE? ___________________________________________________________________ The information contained in this message and any attachment may be proprietary, confidential, and privileged or subject to the work product doctrine and thus protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify me immediately by replying to this message and deleting it and all copies and backups thereof. Thank you. |
|
From: Gautham N. <gau...@sb...> - 2005-05-25 15:23:52
|
How do I get the assembly listing for a C++ program? Using command line gcc the option -S gives me assembly output. How do I do the same in Dev-C++ IDE? |
|
From: Per W. <pw...@ia...> - 2005-05-24 19:45:30
|
Yes, it's plain text. /Per W On Tue, 24 May 2005, Guillermo Gutierrez wrote: > hopefully this now shows as plain text. > > > -----Original Message----- > > From: Guillermo Gutierrez > > Sent: Tuesday, May 24, 2005 8:20 AM > > To: 'dev...@li...' > > Subject: new version of Dev-cpp? > > > > When will we see a new version of Dev-C++, and will it include fixes for the display issues with the class browser? > > > > Guillermo Gutierrez > > Market Scan Information Systems > > Software Q.A. Supervisor > > (818) 575-2000 x2427 > > ggu...@ma... > > > > > ---------------------------- |
|
From: Guillermo G. <ggu...@ma...> - 2005-05-24 19:05:31
|
hopefully this now shows as plain text. > -----Original Message----- > From: Guillermo Gutierrez =20 > Sent: Tuesday, May 24, 2005 8:20 AM > To: 'dev...@li...' > Subject: new version of Dev-cpp? >=20 > When will we see a new version of Dev-C++, and will it include fixes = for the display issues with the class browser? >=20 > Guillermo Gutierrez > Market Scan Information Systems > Software Q.A. Supervisor > (818) 575-2000 x2427 > ggu...@ma... >=20 |
|
From: <Mat...@Ve...> - 2005-05-24 16:17:52
|
use the tolower and toupper functions -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of Patel, Nilesh M Sent: Tuesday, May 24, 2005 7:13 AM To: dev...@li... Subject: [Dev-C++] trying to minimize code Anyone know if there is a function call in c++ where if the user enters an 'A' or an 'a' it would be displayed as an 'A'. I know I can use an OR ( || ). Which I can use and works perfectly fine, but I was just curious is there was a function call in c++ that if any letter was entered it would be taken as a capital letter. I need to do this to about 15 letters. Any suggestions? Or should I just stick to the OR method. Thanks. -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of dev...@li... Sent: Saturday, May 21, 2005 11:15 PM To: dev...@li... Subject: Dev-cpp-users digest, Vol 1 #2427 - 8 msgs 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..." ============================================================================ == The contents of this message, together with any attachments, are intended only for the use of the person(s) to which they are addressed and may contain confidential and/or privileged information. Further, any medical information herein is confidential and protected by law. It is unlawful for unauthorized persons to use, review, copy, disclose, or disseminate confidential medical information. If you are not the intended recipient, immediately advise the sender and delete this message and any attachments. Any distribution, or copying of this message, or any attachment, is prohibited. ============================================================================ == ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 _______________________________________________ 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 ___________________________________________________________________ The information contained in this message and any attachment may be proprietary, confidential, and privileged or subject to the work product doctrine and thus protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify me immediately by replying to this message and deleting it and all copies and backups thereof. Thank you. |
|
From: Guillermo G. <ggu...@ma...> - 2005-05-24 15:25:18
|
When will we see a new version of Dev-C++, and will it include fixes for = the display issues with the class browser? Guillermo Gutierrez Market Scan Information Systems Software Q.A. Supervisor (818) 575-2000 x2427 ggu...@ma... |
|
From: Per W. <pw...@ia...> - 2005-05-24 15:22:06
|
You think about: #include <ctype.h> int toupper(int c); int tolower(int c); There are also a couple of similar functions directly for the Win32 API, for Unicode, wide characters, ... Note that setlocale() affects treatment. /Per W On Tue, 24 May 2005, Patel, Nilesh M wrote: > Anyone know if there is a function call in c++ where if the user enters an 'A' or an 'a' it would be displayed as an 'A'. I know I can use an OR ( || ). Which I can use and works perfectly fine, but I was just curious is there was a function call in c++ that if any letter was entered it would be taken as a capital letter. I need to do this to about 15 letters. Any suggestions? Or should I just stick to the OR method. Thanks. > |
|
From: Patel, N. M <Nil...@qu...> - 2005-05-24 14:13:21
|
Anyone know if there is a function call in c++ where if the user enters an = 'A' or an 'a' it would be displayed as an 'A'. I know I can use an OR ( ||= = ). Which I can use and works perfectly fine, but I was just curious is = there was a function call in c++ that if any letter was entered it would be= = taken as a capital letter. I need to do this to about 15 letters. Any = suggestions=3F Or should I just stick to the OR method. Thanks. -----Original Message----- =46rom: dev...@li... [mailto:dev...@li...]On Behalf Of dev...@li... Sent: Saturday, May 21, 2005 11:15 PM To: dev...@li... Subject: Dev-cpp-users digest, Vol 1 #2427 - 8 msgs 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..." =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D The contents of this message, together with any attachments, are intended = only for the use of the person(s) to which they are addressed and may = contain confidential and/or privileged information. Further, any medical = information herein is confidential and protected by law. It is unlawful for= = unauthorized persons to use, review, copy, disclose, or disseminate = confidential medical information. If you are not the intended recipient, = immediately advise the sender and delete this message and any attachments. = Any distribution, or copying of this message, or any attachment, is = prohibited. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D |
|
From: <and...@su...> - 2005-05-23 00:02:06
|
just perfect. Thanks! Andre -----Mensagem original----- De: A. Klingenstein [mailto:kli...@gm...] Enviada em: domingo, 22 de maio de 2005 10:56 Para: André Macário Barros Assunto: Re: [Dev-C++] On-Line Manuals, PDF Manuals & SDK André Macário Barros wrote: >Dear Users, > >1) On-line Language C Reference Manual: > >2) PDF free downloadable manual > > >3) SDK Manual: > > http://www.cppreference.com http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html for a free book http://www.microsoft.com/downloads/search.aspx?displaylang=en search for "platform sdk" Alex -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.322 / Virus Database: 266.11.14 - Release Date: 20/5/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.322 / Virus Database: 266.11.15 - Release Date: 22/5/2005 |
|
From: Dan W. <da...@ra...> - 2005-05-22 21:36:29
|
I'm using Dev C++ in Win98 and can't debug. A search of your postings proved I wasn't alone: http://sourceforge.net/mailarchive/message.php?msg_id=11337649 I'm about to install GDB 5.1.1-1 as per the recommendation above. Took me a loooong google search to find where to download the package. I think this issue could be addressed in the FAQ. Here's the download link: http://sourceforge.net/project/showfiles.php?group_id=94270&package_id=125275&release_id=256267 Update: I installed GDB 5.1.1-1, but when I try to debug I get bluescreened... :-/ |
|
From: TornadoChaser <kb...@gm...> - 2005-05-22 14:50:46
|
No, no question yet. I may ask for some in a few days if I can't iron out my difficulties. Right now I'm happy to tinker and try to figure it out on my own. Besides, I'm embarrassed about the way my code looks. ;) TC. Jonathan Dryhurst Roberts ( haptiK ) wrote: >hi good luck!, > >was there a question in there somewhere or no? :) > >- JDR > >On 5/22/05, TornadoChaser <kb...@gm...> wrote: > > >>Hello list, >> >>I'm a relatively inexperienced C++ programmer, I took an introduction >>class in college but now I'm trying to actually use C++ for fun. A >>friend of mine sent me to the DevC++ link because I needed a decent >>complier. Right now I'm trying to work on a simple game that would >>allow users to play a turn based RPG in a space combat setting. Users >>control a ship (or many ships) and fly around doing battle and >>exploring. So far I haven't been able to compile my limited source yet, >>but I'm doing my best to work through my errors. >> >>Again, greetings all. >> >>TC. >> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by Oracle Space Sweepstakes >>Want to be the first software developer in space? >>Enter now for the Oracle Space Sweepstakes! >>http://ads.osdn.com/?ad_id=7412&alloc_id=16344&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: TornadoChaser <kb...@gm...> - 2005-05-22 09:41:49
|
Hello list, I'm a relatively inexperienced C++ programmer, I took an introduction class in college but now I'm trying to actually use C++ for fun. A friend of mine sent me to the DevC++ link because I needed a decent complier. Right now I'm trying to work on a simple game that would allow users to play a turn based RPG in a space combat setting. Users control a ship (or many ships) and fly around doing battle and exploring. So far I haven't been able to compile my limited source yet, but I'm doing my best to work through my errors. Again, greetings all. TC. |
|
From: <and...@su...> - 2005-05-21 20:23:45
|
Dear Users,
1) On-line Language C Reference Manual:
Probably this question is in the 2nd ranking
position losing only for the system("PAUSE")
question, but I can´t find a good C/C++ Language
Reference On-Line Manual.
Let me explain the on-line manual features that I am
looking for:
-alphabetical order;
-sintax;
-brief description;
-example(s);
-navigable parameters (e.g., when you read the sintax if
you don´t know the meaning of one parameter, you clik on
it and go to the parameter explanation).
2) PDF free downloadable manuals:
Idem item 1) but a downloadable and printable version,
preferably in .pdf
3) SDK Manual:
Together with M$VS comes a SDK version that it´s possible
to better understand M$ specific Api functions. Does anybody
know if a poor guy can download the SDK without buy any
M$ product (e.g., a "free" link inside microsoft.com)?
Regards
Andre
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.322 / Virus Database: 266.11.14 - Release Date: 20/5/2005
|
|
From: <and...@su...> - 2005-05-21 20:02:54
|
Thank you all, gentlemen,
Mr. Westermark, Mr. Bohlender, and Mr. Molhanec.
very well explained.
Regards
Andre
-----Mensagem original-----
De: Per Westermark [mailto:pw...@ia...]
Enviada em: sábado, 21 de maio de 2005 14:28
Para: André Macário Barros
Cc: ListaDev
Assunto: Re: [Dev-C++] Pointer string declaration initialization problem
(?)
A string "hello" is in most environment considered write-protected. If you
assign a ointer directly to a string constant like this, you will get into
troubles when trying to overwrite the original string.
In some environments this will work, but you really shouldn't depend on
it.
The reason the string constant is often write-protected is that it is
stored directly in the application binary - together with the application
code. Changing it would then be similar to writing self-modifying code.
One other reason why it is problematic to change string constants, is that
multiple parts of the program may use the same constant even if it isn't
obvious. A lot of compilers detects similar text strings at different
parts of the source code and merges them into a single string literal.
/Per W
On Sat, 21 May 2005, André Macário Barros wrote:
> Dear users,
> This is a simple question:
> Please, consider the following the two codes with
> their respective results:
>
> code 1:
> 1 -#include <stdio.h>
> 2 -#include <stdlib.h>
> 3 -#include <string.h>
> 4 -
> 5 -int main()
> 6 -{
> 7 - char *name="name1";
> 8 -
> 9 - printf("%s\n", name);
> 10- strcpy(name, "name2");
> 11- printf("%s\n", name);
> 12-
> 13- system("PAUSE");
> 14- return 0;
> 15-}
>
> execution results from code 1:
> Access violation as a consequence of line 10.
>
> code 2:
> 1 -#include <stdio.h>
> 2 -#include <stdlib.h>
> 3 -#include <string.h>
> 4 -
> 5 -int main()
> 6 -{
> 7 - char *name;
> 8 -
> 10- name = malloc(6*sizeof(char));
> 11- if(!name) exit(1);
> 12- strcpy(name, "name1");
> 13- printf("%s\n", name);
> 14- strcpy(name, "name2");
> 15- printf("%s\n", name);
> 16-
> 17- system("PAUSE");
> 18- return 0;
> 19-}
>
> execution results from code 2:
> name1
> name2
>
> My question:
> Doesn´t a pointer support an implicit memory allocation
> through the declaration/inicialization on line 7 from code 1
> the same way a
>
> char name[]="name1";
>
> can do?
>
> Regards
> Andre
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.322 / Virus Database: 266.11.14 - Release Date: 20/5/2005
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by Oracle Space Sweepstakes
> Want to be the first software developer in space?
> Enter now for the Oracle Space Sweepstakes!
> http://ads.osdn.com/?ad_id=7412&alloc_id=16344&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
>
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.322 / Virus Database: 266.11.14 - Release Date: 20/5/2005
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.322 / Virus Database: 266.11.14 - Release Date: 20/5/2005
|
|
From: Andrei R. T. <and...@gm...> - 2005-05-21 19:02:46
|
hello jakob and list, I found a documentation for fstream at www.cplusplus.com. But are there any docs about it distributed with gcc or dev-c++ ? excuse-me for my ignorance ;-) []'s andrei Jakob EKlund wrote: > You can use any of them. Or c++ fstream wich is probably (IMHO) the > best one to use. > > Den 2005-05-21 06:27:36 skrev Andrei R. Thomaz <and...@gm...>: > >> hello list, >> >> I installed Dev-C++ today, and I would like to ask you: what are the >> available libraries to manipulate files ? Do I have to use the Win32 >> file functions, or the classical fopen() and fread() ? >> >> bye, >> andrei >> > > > > -- RGB Design Digital www.rgbdesigndigital.com.br an...@rg... / (51) 92067436 |
|
From: Per W. <pw...@ia...> - 2005-05-21 17:29:13
|
A string "hello" is in most environment considered write-protected. If you
assign a ointer directly to a string constant like this, you will get into
troubles when trying to overwrite the original string.
In some environments this will work, but you really shouldn't depend on
it.
The reason the string constant is often write-protected is that it is
stored directly in the application binary - together with the application
code. Changing it would then be similar to writing self-modifying code.
One other reason why it is problematic to change string constants, is that
multiple parts of the program may use the same constant even if it isn't
obvious. A lot of compilers detects similar text strings at different
parts of the source code and merges them into a single string literal.
/Per W
On Sat, 21 May 2005, Andr=E9 Mac=E1rio Barros wrote:
> Dear users,
> This is a simple question:
> Please, consider the following the two codes with
> their respective results:
>
> code 1:
> 1 -#include <stdio.h>
> 2 -#include <stdlib.h>
> 3 -#include <string.h>
> 4 -
> 5 -int main()
> 6 -{
> 7 - char *name=3D"name1";
> 8 -
> 9 - printf("%s\n", name);
> 10- strcpy(name, "name2");
> 11- printf("%s\n", name);
> 12-
> 13- system("PAUSE");
> 14- return 0;
> 15-}
>
> execution results from code 1:
> Access violation as a consequence of line 10.
>
> code 2:
> 1 -#include <stdio.h>
> 2 -#include <stdlib.h>
> 3 -#include <string.h>
> 4 -
> 5 -int main()
> 6 -{
> 7 - char *name;
> 8 -
> 10- name =3D malloc(6*sizeof(char));
> 11- if(!name) exit(1);
> 12- strcpy(name, "name1");
> 13- printf("%s\n", name);
> 14- strcpy(name, "name2");
> 15- printf("%s\n", name);
> 16-
> 17- system("PAUSE");
> 18- return 0;
> 19-}
>
> execution results from code 2:
> name1
> name2
>
> My question:
> Doesn=B4t a pointer support an implicit memory allocation
> through the declaration/inicialization on line 7 from code 1
> the same way a
>
> char name[]=3D"name1";
>
> can do?
>
> Regards
> Andre
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.322 / Virus Database: 266.11.14 - Release Date: 20/5/2005
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by Oracle Space Sweepstakes
> Want to be the first software developer in space?
> Enter now for the Oracle Space Sweepstakes!
> http://ads.osdn.com/?ad_id=3D7412&alloc_id=3D16344&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: Michal M. <mi...@mo...> - 2005-05-21 16:12:01
|
André Macário Barros wrote:
> Dear users,
> This is a simple question:
> Please, consider the following the two codes with
> their respective results:
>
> code 1:
> 1 -#include <stdio.h>
> 2 -#include <stdlib.h>
> 3 -#include <string.h>
> 4 -
> 5 -int main()
> 6 -{
> 7 - char *name="name1";
> 8 -
> 9 - printf("%s\n", name);
> 10- strcpy(name, "name2");
> 11- printf("%s\n", name);
> 12-
> 13- system("PAUSE");
> 14- return 0;
> 15-}
>
> execution results from code 1:
> Access violation as a consequence of line 10.
See documentation about -fwritable-strings
http://gcc.gnu.org/onlinedocs/gcc-3.4.4/gcc/C-Dialect-Options.html#index-fwritable_002dstrings-116
and AFAIK in gcc 4.0 this option was even removed
--
Regards,
Michal
ICQ# 175762750
|
|
From: <and...@su...> - 2005-05-21 15:47:50
|
Dear users,
This is a simple question:
Please, consider the following the two codes with
their respective results:
code 1:
1 -#include <stdio.h>
2 -#include <stdlib.h>
3 -#include <string.h>
4 -
5 -int main()
6 -{
7 - char *name="name1";
8 -
9 - printf("%s\n", name);
10- strcpy(name, "name2");
11- printf("%s\n", name);
12-
13- system("PAUSE");
14- return 0;
15-}
execution results from code 1:
Access violation as a consequence of line 10.
code 2:
1 -#include <stdio.h>
2 -#include <stdlib.h>
3 -#include <string.h>
4 -
5 -int main()
6 -{
7 - char *name;
8 -
10- name = malloc(6*sizeof(char));
11- if(!name) exit(1);
12- strcpy(name, "name1");
13- printf("%s\n", name);
14- strcpy(name, "name2");
15- printf("%s\n", name);
16-
17- system("PAUSE");
18- return 0;
19-}
execution results from code 2:
name1
name2
My question:
Doesn´t a pointer support an implicit memory allocation
through the declaration/inicialization on line 7 from code 1
the same way a
char name[]="name1";
can do?
Regards
Andre
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.322 / Virus Database: 266.11.14 - Release Date: 20/5/2005
|
|
From: Per W. <pw...@ia...> - 2005-05-21 10:14:48
|
You may use any file manipulation functions you like. fopen(), open, fstream, ... directly available besides the Win32 API functions. /Per W On Sat, 21 May 2005, Andrei R. Thomaz wrote: > hello list, > > I installed Dev-C++ today, and I would like to ask you: what are the > available libraries to manipulate files ? Do I have to use the Win32 > file functions, or the classical fopen() and fread() ? > > bye, > andrei > > -- > RGB Design Digital > www.rgbdesigndigital.com.br > > an...@rg... / (51) 92067436 |
|
From: Andrei R. T. <and...@gm...> - 2005-05-21 04:28:10
|
hello list, I installed Dev-C++ today, and I would like to ask you: what are the available libraries to manipulate files ? Do I have to use the Win32 file functions, or the classical fopen() and fread() ? bye, andrei -- RGB Design Digital www.rgbdesigndigital.com.br an...@rg... / (51) 92067436 |
|
From: Jose S. <joe...@gm...> - 2005-05-20 14:05:06
|
Hi, been getting a problem when compiling some of my code, that I can't=20
understand, Can anybody help me out.
the code where the error occurs is the following:
AAAReturnCode=20
SwigDirector_AAA_ClientAuthSession::TxDelivery(std::auto_ptr<AAAMessage >=
=20
msg) {
AAAReturnCode result ;
jlong jresult =3D 0 ;
std::auto_ptr<AAAMessage > *argp1 ;
std::auto_ptr<AAAMessage > *argp10 ;
JNIEnv * jenv =3D (JNIEnv *) NULL ;
jlong jmsg ;
AAAReturnCode *argp ;
jenv =3D swig_acquire_jenv();
if (!swig_override[1]) {
return AAA_Session<AAA_AuthSessionAttributes >::TxDelivery(msg);
}
Here=3D> *((std::auto_ptr<AAAMessage > *)&jmsg) =3D &msg;
jresult =3D (jlong) jenv->CallStaticLongMethod(Swig::jclass_exampleJNI,=20
Swig::director_methids[1], swig_get_self(), jmsg);
if (jenv->ExceptionOccurred()) return result;
argp =3D *(AAAReturnCode **)&jresult;=20
if (!argp) {
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to=20
dereference null AAAReturnCode");
return result;
}
result =3D *argp;=20
return result;
}
the compiler gives me this:
example_wrap.cxx: In member function `virtual AAAReturnCode
SwigDirector_AAA_ClientAuthSession::TxDelivery(std::auto_ptr<AAAMessage>)':
example_wrap.cxx:228: no match for `std::auto_ptr<AAAMessage>& =3D
std::auto_ptr<AAAMessage>*' operator
/usr/include/c++/3.2.3/memory:228: candidates are: std::auto_ptr<_Tp>&
std::auto_ptr<_Tp>::operator=3D(std::auto_ptr<_Tp>&) [with _Tp =3D AAAMessa=
ge]
/usr/include/c++/3.2.3/memory:350: std::auto_ptr<_Tp>&
std::auto_ptr<_Tp>::operator=3D(std::auto_ptr_ref<_Tp>) [with _Tp =3D
AAAMessage]
thanks=20
Jose
|
|
From: Puime <gp...@pa...> - 2005-05-20 11:06:51
|
you make it look so easy, but still doesn't work, there's no way to = enter the password and click on the unsubscribe button ! |
|
From: Per W. <pw...@ia...> - 2005-05-20 09:18:43
|
You mean the portability that have made M$ rename that function to
_fstat() - at the same time they renamed _mkdir(), _open(), _close(),
_read(), _write(), _chmod(), _access(), _chdir(), ...
For just quick-checking existence or read or write access, access() is the
nicest function - no structs and extra tests needed.
stat(), fstat(), lstat() are more powerful, but requires more work - extra
include files and a struct stat variable.
On the other hand. If the intention is to actually open and/or create the
file, there is normally no need to pre-check existence. The used open
command can handle it.
/Per W
On Fri, 20 May 2005, Gilles Crebassa wrote:
> Hello,
>
> with function "fstat" , you have possibility to
> receive size of file , owner ,.... and existence (+
> portability).
>
>
> Gilles
>
> --- Per Westermark <pw...@ia...> a =E9crit:
> > Have you looked at the access() function -
> > specifically there to check for
> > existence - or specific rights - for a file.
> >
> > /Per W
> >
> > On Fri, 20 May 2005 A_B...@gm... wrote:
> >
> > > Well, it's a little bit unconventional, but I
> > check file existans in this way:
> > >
> > > if(FILE* f =3D fopen("file", "r")){
> > > fclose(f);
> > > // file exists
> > > ...
> > > }else{
> > > // file doesn't exist
> > > ...
> > > }
> > >
> > > What speaks against this method ???
> > >
> > > CU, Acki
|
|
From: Gilles C. <cre...@ya...> - 2005-05-20 07:43:30
|
Hello,
with function "fstat" , you have possibility to
receive size of file , owner ,.... and existence (+
portability).
Gilles
--- Per Westermark <pw...@ia...> a écrit:
> Have you looked at the access() function -
> specifically there to check for
> existence - or specific rights - for a file.
>
> /Per W
>
> On Fri, 20 May 2005 A_B...@gm... wrote:
>
> > Well, it's a little bit unconventional, but I
> check file existans in this way:
> >
> > if(FILE* f = fopen("file", "r")){
> > fclose(f);
> > // file exists
> > ...
> > }else{
> > // file doesn't exist
> > ...
> > }
> >
> > What speaks against this method ???
> >
> > CU, Acki
>
>
>
>
-------------------------------------------------------
> This SF.Net email is sponsored by Oracle Space
> Sweepstakes
> Want to be the first software developer in space?
> Enter now for the Oracle Space Sweepstakes!
>
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&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
>
_____________________________________________________________________________
Découvrez le nouveau Yahoo! Mail : 1 Go d'espace de stockage pour vos mails, photos et vidéos !
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com
|
|
From: Per W. <pw...@ia...> - 2005-05-20 07:03:20
|
Have you looked at the access() function - specifically there to check for
existence - or specific rights - for a file.
/Per W
On Fri, 20 May 2005 A_B...@gm... wrote:
> Well, it's a little bit unconventional, but I check file existans in this way:
>
> if(FILE* f = fopen("file", "r")){
> fclose(f);
> // file exists
> ...
> }else{
> // file doesn't exist
> ...
> }
>
> What speaks against this method ???
>
> CU, Acki
|