dev-cpp-users Mailing List for Dev-C++ (Page 257)
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: P.D. v. Z. <pd...@xs...> - 2004-02-02 14:29:24
|
Hi, In the version of Dev-C++ that I have installed (4.9.8.5), there is an option under "Compiler Options" called "Use fast but imperfect dependency generation". If you uncheck that checkbox, Dev-C++ will use a somewhat slower approach to determine what to compile, and it will detect changes to your header files. Regards, Paul -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Mark Ainsworth Sent: Monday, February 02, 2004 11:16 AM To: dev...@li... Subject: [Dev-C++] getting make to include .h files Dear all, Having just discovered Dev-C++, I can honestly say I love it. Well done everyone involved. I just have a quick question though. Having created a quick project. Well it wasn't that quick because it involved using mysql so I've had to hack some libraries. Those who have done it know what I mean. Anyway, I include my own .h file as part of the project. Is there a quick way to get the autogenerated make file to include references to the headerfile. I have had to patch the file myself. Otherwise if I make a change in the header file, and then recompile, make thinks there isn't anything to do because makefile.win doesn't contain any references to my .h file. thanks Mark. ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ 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: Mark A. <mar...@nt...> - 2004-02-02 11:16:11
|
Dear all, Having just discovered Dev-C++, I can honestly say I love it. Well done everyone involved. I just have a quick question though. Having created a quick project. Well it wasn't that quick because it involved using mysql so I've had to hack some libraries. Those who have done it know what I mean. Anyway, I include my own .h file as part of the project. Is there a quick way to get the autogenerated make file to include references to the headerfile. I have had to patch the file myself. Otherwise if I make a change in the header file, and then recompile, make thinks there isn't anything to do because makefile.win doesn't contain any references to my .h file. thanks Mark. |
|
From: Maya <Esc...@ne...> - 2004-02-02 10:57:59
|
I have a program that compiles, but that does not display in the way it is supposed to. To better explain the problem I have it in a web page that shows snapshot of the window and the code related to the problem. http://www.vif.com/users/escalante/fltk_sample.html Can someone please tell me what I am doing wrong? Thanks in advance! -- * YOU first you said that there were weapons of mass destruction * Then YOU said that the only way to expose them was through a war * YOU sent over 150 children to die * Kill those who did not agree with you * And now WE know it was all a lie. * Daddy must be very proud of you, boy! * Between you and I, is Osama your father's idea too? * The media's the most powerful entity on earth. They have the power to make the innocent guilty and to make the guilty innocent, and that's power. - Malcom X * You cannot exercise your power to a point of humiliation. - Jean Chretien From WE to YOU, with love: * E-Mail Policy http://www.vif.com/users/escalante/Email_Policy.html |
|
From: Oleksandr Y. <erm...@ma...> - 2004-02-02 10:03:13
|
>>Does anyone know about a FLTK list that might be active? >>The fl...@ea... seems to be down! > Yes, i have the same problem. > There are no letters from fl...@ea.... > But on FLTK site this maillist is active. > Two weeks ago i've solved similar problem by resubscribing. > May be we should try again... Hmmm, now fltk-general maillist is active again(even without resubscribing). But in my mailbox there are no letters, that were posted last week. On the FLTK site these postings exist ! Something going wrong(may be on my side). -- Best regards, Oleksandr mailto:erm...@ma... |
|
From: Oleksandr Y. <erm...@ma...> - 2004-02-02 09:49:58
|
>Does anyone know about a FLTK list that might be active? >The fl...@ea... seems to be down! Yes, i have the same problem. There are no letters from fl...@ea.... But on FLTK site this maillist is active. Two weeks ago i've solved similar problem by resubscribing. May be we should try again... -- Best regards, Oleksandr mailto:erm...@ma... |
|
From: Michael C U. <mu...@cb...> - 2004-02-02 01:16:26
|
In Win98, no. You get the native Windows 98 widgets. If you want the WinXP look and feel on Win98, you will need to get something like Window Blinds and download a WinXP theme for it. On Mon, 2 Feb 2004, FABIAN HUENUMAN wrote: > Hi! > I=B4m working under windows 98 and dev-c++ 4.9.8.5 with wxwindows and I w= ould > like to know if I can create interfaces with windows xp look and feel. So= me > body knows how can I do this? > Is this possible in this environtment? > > thanks for the atention. > Fabian. > > _________________________________________________________________ > Charla con tus amigos en l=EDnea mediante MSN Messenger: > http://messenger.latam.msn.com/ > > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > 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: Goran <go...@de...> - 2004-02-02 00:47:39
|
Dana ponedeljak 2. februar 2004. 01:20, FABIAN HUENUMAN je napisao/la: > Hi! > I=B4m working under windows 98 and dev-c++ 4.9.8.5 with wxwindows and I w= ould > like to know if I can create interfaces with windows xp look and feel. So= me > body knows how can I do this? > Is this possible in this environtment? Do you want to have windows XP L&F in win98 or in winXP? =46or the first, you will need some kind of skining system and I donot know= if=20 wxWindows support that. =46or the second, as wxWindows uses native WinAPI code, you will have winXP= look=20 and feel. Bye, Goran |
|
From: FABIAN H. <fhu...@ho...> - 2004-02-02 00:20:55
|
Hi! I´m working under windows 98 and dev-c++ 4.9.8.5 with wxwindows and I would like to know if I can create interfaces with windows xp look and feel. Some body knows how can I do this? Is this possible in this environtment? thanks for the atention. Fabian. _________________________________________________________________ Charla con tus amigos en línea mediante MSN Messenger: http://messenger.latam.msn.com/ |
|
From: Maya <Esc...@ne...> - 2004-02-01 14:53:33
|
Does anyone know about a FLTK list that might be active?
The fl...@ea... seems to be down!
Thanks in advance!
--
* YOU first said that there were weapons of mass destruction
* Then YOU said that the only way to expose them was through a war
* YOU sent over 150 children to die
* Kill those who did not agree with you
* And now WE know it was all a lie.
* Daddy must be very proud of you, boy!
* Between you and, is Osama your father's idea too?
From WE to YOU, with love:
* E-Mail Policy
http://www.vif.com/users/escalante/Email_Policy.html
* You cannot exercise your power to a point of humiliation.
- Jean Chretien
* The media's the most powerful entity on earth. They have the
power to make the innocent guilty and to make the guilty
innocent, and that's power.
- Malcom X
|
|
From: <de...@ci...> - 2004-01-31 21:59:02
|
In the first form you have two different types, and you can use either.
For instance
struct _Human fred;
Human joe;
Note that it is simply to avoid always having to refer to struct _Human
that the typedef is used. This is traditional C usage.
In C++ on the other hand the second form is used, and the type is Human,
not struct Human.
So you can use
Human joe;
C++ compilers will compile the first form too, but the resulting types
will be _Human and Human unless there is an extern "C" block surrounding
the declaration.
In article <BAY...@ho...>,
coo...@ho... (Noorez Kassam) wrote:
> what is the difference between these two
>
> typedef struct _Human
> {
> int height;
> }Human;
>
> struct Human
> {
> int height;
> };
>
>
> and in the first one, what does 'Human' mean at the end? In both
> structs u can declare a Human type, even without the Human thing at the
> end in the first one
|
|
From: Scott S. <age...@co...> - 2004-01-31 21:24:24
|
The .dll is only for linking dynamically, where you use a .dll and it is distributed with your file versus being put in the .exe. Make sure you have all of the required .a files linked, and none of your headers are in the bin list. Or, try pulling the bin thing from the list of headers and libs and see what happens. If you can get access to another compiler, try using it. I am not sure if you have tried reinstalling Dev-C++ yet. Have you? Also, try upgrading to the latest version of Dev-C++. Daniel Watson wrote: >Thanks for the suggestion Scott. It's pointing to the proper bin in >Dev-C++ in the compiler options. > >I tried going through the compiler options and found nothing but the >default listed and the G++ directory within the include file. But, I did >notice that I had set Dev-C++ to create a Project for C++ so it made a >resource file with that in it to link the icon. I took it out and still >got the same message. > >So I decided to try another example from scratch. The hello C. Upon >creating a project I chose the OpenGL for the project, linked the glut >file, but I am still getting the same message... > >gcc: Compilation of header file requested >gcc: file path prefix `C:\DEV-C_~1\Bin\' never used > > >This is the hello.c example at this link... > >http://www.opengl.org/resources/code/basics/redbook/index.html > > >Is there a newer version of the glut that I should be using? I went to >the Nate Robins site and downloaded the (everything you need to get >started with glut) link. Do I need to use the glut32.dll as well? >Should it be in the G++ file within the Include directory? > >Any other ideas would be greatly appreciated, >DWW > > >-----Original Message----- >From: Scott Simontis [mailto:age...@co...] >Sent: Friday, January 30, 2004 3:30 PM >To: Daniel Watson >Subject: Re: [Dev-C++] OpenGL with Glut blues... > >There is no order they need to be in. However, I think it helps to sort >them out. I list custom headers first, then library headers, then C++ >headers, and finnaly C headers. It looks like it is saying that one of >the headers has C:\DEV-C_~1\Bin\ in it. All of the headers aren't there. > >Go to Tools -> Compiler Options. Then, click on the Directories tab. >Next, click on the Libraries, C Headers, and C++ Headers sub tabs and >make sure C:\Dev-C_~1\Bin or anything like that is in one of those >fields. >Daniel Watson wrote: > > > >>I am trying to compile a basic example from the openGL site, >>alpha3d.c. >>(http://www.opengl.org/resources/code/basics/redbook/index.html) >> >>At first I was getting a number of undefined references. >> >>After going through a number of postings on bloodshed for including >>links, then not including some links but try this link, I am down to >>two linker errors... >> >>g++: Compilation of header file requested >>g++: file path prefix `C:\DEV-C_~1\Bin\' never used >>Here are the two files I have linked in... >>C:\Dev-C++\Include\Gl\glut.h >>C:\Dev-C++\Lib\glut32.lib >> >>I have also set the comppiler option to support All ANSI C. >> >>And here are the include lines at the opening of the script... >> >>#include <Gl/glut.h> >>#include <stdlib.h> >>#include <stdio.h> >> >>Is there a certain order the includes should be in? >>I am using glut 3.7.6 >> >>Thanks in advance, >>DWW >> >> >> > > > > >------------------------------------------------------- >The SF.Net email is sponsored by EclipseCon 2004 >Premiere Conference on Open Tools Development and Integration >See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. >http://www.eclipsecon.org/osdn >_______________________________________________ >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: Scott S. <age...@co...> - 2004-01-31 20:42:44
|
Just write a .cpp file with all the functions your library will use, and use the command line tools to convert it into a .a file. Then, make a .h file with function and variable declerations, and you are set. invognito incognito wrote: > > > Hi I am AFROMEISTER and this is my first ever post to the list, > > I have been wondering for some time and searched through the forums, > but as I am a C++ newbie I have been unable to find any information > that I can use about making a library using Dev-C++. My e-mail adress > is MVC...@ho... <mailto:MVC...@ho...> and any > information or URL's relating to making a library using Dev-C++ would > be gratefully reveived. > sincerely thankfull, > > AFROMEISTER > > > ------------------------------------------------------------------------ > Hot chart ringtones and polyphonics. Click here. > <http://g.msn.com/8HMBENAU/2737??PS=> > ------------------------------------------------------- The SF.Net > email is sponsored by EclipseCon 2004 Premiere Conference on Open > Tools Development and Integration See the breadth of Eclipse activity. > February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn > _______________________________________________ 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: Scott S. <age...@co...> - 2004-01-31 20:41:02
|
Lets just leave this topic in the dust. This could become a flame war at any second, and I don't want this to offend anymore people. If we aren't going to stop this, at least only e-mail it to those who want to hear it. Maya wrote: > OK? > > ku...@sp... wrote: > >>Well said Maya!! :-) >> >>NOW WE FIND THERE IS NO FUSTRATION IN C++ WHEN , ONE APPLY THE RULES OF >>C++ , IN THE REALM OF MACHINES, THAT IS SOFTWARES THAT RUNS THEM. >> >>Rudolph ;-)) >> >> >> >>----- Original Message ----- >>From: "Maya" <Esc...@ne...> >>To: "Dev-C++ Mailing List" <dev...@li...> >>Sent: Friday, January 30, 2004 12:08 AM >>Subject: Re: [Dev-C++] fustrations in c++ >> >> >> >> >>>Religion has not value in the science realm. Religion is based on faith, >>>and the absolute value of it is the corner stone of any religion. >>>Science on the other hand makes no attempt to apply faith to any of its >>>certainties, or lack of it for that matter. >>>Please leave it at that, don't pursue this issue any longer. I realize >>>this topic is important to you, but it is taking space in a mail group >>>that does not deal with that area of life. I would *very* strongly >>>suggest that you move this line of emails to either a personal [email to >>>email] level or to alt.religion.... news group. >>>In other words, knock it off kids! >>>Have a good one, and if you are going to have more than one.... give me >>>shout, eh! >>> >>> >>> >>> >>> >> >> >> >> > >-- > >FYI >http://www.astro.umd.edu/~marshall/abbrev.html > >E-Mail Policy >http://www.vif.com/users/escalante/Email_Policy.html > >* You cannot exercise your power to a point of humiliation. > - Jean Chretien > >* The media's the most powerful entity on earth. They have the > power to make the innocent guilty and to make the guilty > innocent, and that's power. > - Malcom X >* "Innocent until proven guilty", no... not in Canada!! > > |
|
From: Oleksandr Y. <erm...@ma...> - 2004-01-31 20:02:16
|
Hello Miguel, Friday, January 30, 2004, 3:22:05 AM, you wrote: > Hmmm. I am a bit puzzled. Could you tell which one is this OO library? > Who must derive from/delegate on CGObject? Or it is a Policy class, that > becomes the template parameter of some other class? This library is GTL. http://www.gtl.kis.ru/bin/GTL10R8.exe This class with "delete this" is the template parameter of pointers "container" class. (see line #33 /Source/Gobject.cpp) This library is based on MFC :-( Therefore i have no plans to use it in real work, but some design concepts of this library are interesting(and may be some of them are dangerous :-) ). > [...], but valgrind > used from commandline would be a nice asset to add to Win32 debugging > tools. Yes, it will be useful tool. Among similar tools under Win32 i have used only CodeGuard (comes with Borland C++ Builder 5 or later(may be)). Valgrind under Win32 can be a good open source replacement. -- Best regards, Oleksandr mailto:erm...@ma... |
|
From: Oleksandr Y. <erm...@ma...> - 2004-01-31 19:51:38
|
Obi <ob...@ch...> wrote: > Also you need to be sure the instance is actually new-ed. If the instance > is an automatic or static variable callinf "delete this" will have undefined > behaviour, probably bad. > If you want to "delete this" you are recommended to have private > constructors and destructor. Use a factory method to create objects. Good idea. Thank you. Private constructor/destructors (friend'ed only for container of ptrs) will prevent incorrect using of this class. -- Best regards, Oleksandr mailto:erm...@ma... |
|
From: Ed C. <em...@ed...> - 2004-01-31 19:16:55
|
Hi, The former declares a datatype named Human; the latter declares a structure tag Human. To declare a Human named Joe, in the first case you would simply type: Human Joe; In the latter, it would be: struct Human Joe; See also http://www.eskimo.com/~scs/C-faq/q2.1.html -Ed |
|
From: Maya <Esc...@ne...> - 2004-01-31 19:15:15
|
OK? ku...@sp... wrote: >Well said Maya!! :-) > >NOW WE FIND THERE IS NO FUSTRATION IN C++ WHEN , ONE APPLY THE RULES OF >C++ , IN THE REALM OF MACHINES, THAT IS SOFTWARES THAT RUNS THEM. > >Rudolph ;-)) > > > >----- Original Message ----- >From: "Maya" <Esc...@ne...> >To: "Dev-C++ Mailing List" <dev...@li...> >Sent: Friday, January 30, 2004 12:08 AM >Subject: Re: [Dev-C++] fustrations in c++ > > > > >>Religion has not value in the science realm. Religion is based on faith, >>and the absolute value of it is the corner stone of any religion. >>Science on the other hand makes no attempt to apply faith to any of its >>certainties, or lack of it for that matter. >>Please leave it at that, don't pursue this issue any longer. I realize >>this topic is important to you, but it is taking space in a mail group >>that does not deal with that area of life. I would *very* strongly >>suggest that you move this line of emails to either a personal [email to >>email] level or to alt.religion.... news group. >>In other words, knock it off kids! >>Have a good one, and if you are going to have more than one.... give me >>shout, eh! >> >> >> >> >> > > > > -- FYI http://www.astro.umd.edu/~marshall/abbrev.html E-Mail Policy http://www.vif.com/users/escalante/Email_Policy.html * You cannot exercise your power to a point of humiliation. - Jean Chretien * The media's the most powerful entity on earth. They have the power to make the innocent guilty and to make the guilty innocent, and that's power. - Malcom X * "Innocent until proven guilty", no... not in Canada!! |
|
From: Michael C U. <mu...@cb...> - 2004-01-31 18:02:00
|
On Sat, 31 Jan 2004, Per Westermark wrote: > No, you are confusing the declaration of a pointer variable with the use > of one. Oops. Yeah. I read it too quickly and missed that it was an assignment. I also missed that he had a second x in there. |
|
From: Per W. <pw...@ia...> - 2004-01-31 17:54:17
|
Hmmm. I assume your example was ment to be: int x,y; int *p = &x; /* Don't forget the address operator here... */ p += 1; /Per W On Sat, 31 Jan 2004, Michael C Urban wrote: > On Sat, 31 Jan 2004, Brian Gordon wrote: > > > I'm new to C++ and in my C++ book, I am learning about pointers. I have > > a question: can you store an address to some kind of "omnitype" pointer? > > I am thinking about doing something like this: > > Although in my last message I showed you how to do what you are asking, I > would also stress that directly manipulating pointer addresses is usually > quite risky unless you are doing some kind of very low level programming > (like programming a microcontroller). Pointer address manipulation is only > guranteed to behave well if you are dealing with an array, where you know > the the elements of the array are stored contigiously in memory. The > following code sample is a disaster waiting to happen: > > int x, y; > int *p = x; > p += 1; > > In this case, I have increased the address of *p by one integer offset. In > other words, I have increased the address that *p points to by 32 bits. So > *p no longer points at x. But does it point at y? Probably not, because > there is no gurantee that x and y are stroed contigiously in memory, even > though they were declared one right after the other. So in the above > sample, we cannot predict what the results will be since *p now points to > an address with unpredictable contents. (More then likely, *p now points > to garbage). > > Hope that clears things up, and hope I wasn't just telling you stuff you > already know. But you said you were new to C++, and it looked like what > you were doing was probably unsafe. > > Mike > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > 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: Michael C U. <mu...@cb...> - 2004-01-31 17:52:44
|
On Sat, 31 Jan 2004, Michael C Urban wrote: > int x, y; > int *p = x; > p += 1; Oops. Of course, that should have been: int x, y; int *p = &x; p += 1; Mike |
|
From: Per W. <pw...@ia...> - 2004-01-31 17:52:02
|
No, you are confusing the declaration of a pointer variable with the use of one. int *point = 0x241xff5f; does not change what *point contains. It is just an assignment with wrong type, i.e the hexadecimal constant is not of type 'pointer to int'. int *point = (*int)0x241xff5f; would work better - except for the fact that the hexadecimal constant is broken - where does the second x come from? The problem with this construct is that since you don't know what the address 0x241... points to, you don't know if the program has the right to read the address. If it hasn't, the program will be terminated! /Per W On Sat, 31 Jan 2004, Michael C Urban wrote: > Brian, > > > int *point = 0x241xff5f; > > cout << *point; > > This doesn't work because it changes the value that *point contains. > Remembet that * is the dereference operator. It access the value rather > than the address. > > To access the pointer itself, you don't want anything before it. So here > is an example to do what you want: > > int *point; /* declare a pointer */ > point = 0x241xff5f; /* change the address that it points to */ > cout < *point; /* derefernce the poiner and print its value */ > > Notice that i don't use any operator when assigning the value to point. > That's because I want to change the actual address that point is point at, > rather than change the value that the current address of point contains. > > Of course, the above example is only useful if you know that the address > contains an int value. Also, if you try to access a memory address that > doesn't belong to your program, Windows might catch you and kill your > program. So make sure you know that the address you assign to point is > actually "owned" by your program. > > Hope this helps, > > Mike > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > 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: Michael C U. <mu...@cb...> - 2004-01-31 17:48:16
|
On Sat, 31 Jan 2004, Brian Gordon wrote: > I'm new to C++ and in my C++ book, I am learning about pointers. I have > a question: can you store an address to some kind of "omnitype" pointer? > I am thinking about doing something like this: Although in my last message I showed you how to do what you are asking, I would also stress that directly manipulating pointer addresses is usually quite risky unless you are doing some kind of very low level programming (like programming a microcontroller). Pointer address manipulation is only guranteed to behave well if you are dealing with an array, where you know the the elements of the array are stored contigiously in memory. The following code sample is a disaster waiting to happen: int x, y; int *p = x; p += 1; In this case, I have increased the address of *p by one integer offset. In other words, I have increased the address that *p points to by 32 bits. So *p no longer points at x. But does it point at y? Probably not, because there is no gurantee that x and y are stroed contigiously in memory, even though they were declared one right after the other. So in the above sample, we cannot predict what the results will be since *p now points to an address with unpredictable contents. (More then likely, *p now points to garbage). Hope that clears things up, and hope I wasn't just telling you stuff you already know. But you said you were new to C++, and it looked like what you were doing was probably unsafe. Mike |
|
From: RUDOLPH <ku...@sp...> - 2004-01-31 17:14:15
|
Well said Maya!! :-) NOW WE FIND THERE IS NO FUSTRATION IN C++ WHEN , ONE APPLY THE RULES OF C++ , IN THE REALM OF MACHINES, THAT IS SOFTWARES THAT RUNS THEM. Rudolph ;-)) ----- Original Message ----- From: "Maya" <Esc...@ne...> To: "Dev-C++ Mailing List" <dev...@li...> Sent: Friday, January 30, 2004 12:08 AM Subject: Re: [Dev-C++] fustrations in c++ > Religion has not value in the science realm. Religion is based on faith, > and the absolute value of it is the corner stone of any religion. > Science on the other hand makes no attempt to apply faith to any of its > certainties, or lack of it for that matter. > Please leave it at that, don't pursue this issue any longer. I realize > this topic is important to you, but it is taking space in a mail group > that does not deal with that area of life. I would *very* strongly > suggest that you move this line of emails to either a personal [email to > email] level or to alt.religion.... news group. > In other words, knock it off kids! > Have a good one, and if you are going to have more than one.... give me > shout, eh! > > > |
|
From: Michael C U. <mu...@cb...> - 2004-01-31 15:59:04
|
Brian, > int *point = 0x241xff5f; > cout << *point; This doesn't work because it changes the value that *point contains. Remembet that * is the dereference operator. It access the value rather than the address. To access the pointer itself, you don't want anything before it. So here is an example to do what you want: int *point; /* declare a pointer */ point = 0x241xff5f; /* change the address that it points to */ cout < *point; /* derefernce the poiner and print its value */ Notice that i don't use any operator when assigning the value to point. That's because I want to change the actual address that point is point at, rather than change the value that the current address of point contains. Of course, the above example is only useful if you know that the address contains an int value. Also, if you try to access a memory address that doesn't belong to your program, Windows might catch you and kill your program. So make sure you know that the address you assign to point is actually "owned" by your program. Hope this helps, Mike |
|
From: Brian G. <mic...@ad...> - 2004-01-31 15:19:59
|
I'm new to C++ and in my C++ book, I am learning about pointers. I have
a question: can you store an address to some kind of "omnitype" pointer?
I am thinking about doing something like this:
int *point = 0x241xff5f;
cout << *point;
so I can see what is in block 0x241xff5f. However, Dev_C++ won't allow
me to compile this, and I think I know why: 0x241xff5f isn't
neccessarily an int. Is there any way to do something like:
readMem("0x241xff5f");
and it would return the ONE BYTE that is located at 0x241xff5f? Would
the first block of code work if I put an "&" in front of the address?
|