dev-cpp-users Mailing List for Dev-C++ (Page 4)
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
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
|
|
1
(2) |
2
(2) |
3
(9) |
4
(11) |
5
(15) |
6
(5) |
7
|
8
(1) |
9
(2) |
10
(8) |
11
(4) |
12
(4) |
13
(5) |
14
(5) |
15
(10) |
16
(14) |
17
(7) |
18
(2) |
19
|
20
(7) |
21
(12) |
22
(6) |
23
|
24
(4) |
25
(6) |
26
(16) |
27
(9) |
28
(7) |
29
(18) |
30
(9) |
|
|
|
|
|
|
From: Jason H. <jas...@bt...> - 2001-09-21 18:56:16
|
I've been looking at it myself to, and AFAICT there isn't standard string support for converting from int. None of the string members listed in "C++ The Complete Reference" do it. I have found an alternative way of doing what sprintf does, which is more C++ like, by using an Array Based Output Stream. e.g. #include <stdio.h> #include <stdlib.h> #include <strstream> #include <iostream> #include <string> int main(int argc, char *argv[]) { using namespace std; char str[80]; ostrstream outs(str, sizeof(str)); string mystring; outs << "An int " << 1024 << " or a float " << 1.234 << "." << ends; mystring = str; cout << mystring << endl; system("PAUSE"); return 0; } I tested it just in case, and it seems to work OK, but is also a long winded way of doing things. Jason. ----- Original Message ----- From: "Ioannis Vranos" <no...@ya...> To: <dev...@li...> Sent: Friday, September 21, 2001 8:24 PM Subject: RE: [Dev-C++] Integer to std::string? > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Jason Hardman > Sent: Friday, September 21, 2001 7:59 PM > To: dev...@li... > Subject: Re: [Dev-C++] Integer to std::string? > > > Thanks for that, I had forgotten about sprintf(). I have to > say it's not an ideal solution. It seems odd that the idea of > converting from numbers wasn't put into string. I think I may I did not say that the idea of converting from numbers to string isn't implemented in string, i said that i do not know it yet. :) > still write some kind of function to convert "tostring", > using sprintf is a more messy solution for my purpose. > > I'll be keeping my eye out for alternatives still though. > > Thanx, Jason. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com * Alternative URL: http://run.to/noicys _______________________________________________ Dev-cpp-users mailing list Dev...@li... https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
From: Ioannis V. <no...@ya...> - 2001-09-21 18:23:21
|
> -----Original Message----- > From: dev...@li...=20 > [mailto:dev...@li...] On Behalf=20 > Of Jason Hardman > Sent: Friday, September 21, 2001 7:59 PM > To: dev...@li... > Subject: Re: [Dev-C++] Integer to std::string? >=20 >=20 > Thanks for that, I had forgotten about sprintf(). I have to=20 > say it's not an ideal solution. It seems odd that the idea of=20 > converting from numbers wasn't put into string. I think I may=20 I did not say that the idea of converting from numbers to string isn't implemented in string, i said that i do not know it yet. :) > still write some kind of function to convert "tostring",=20 > using sprintf is a more messy solution for my purpose. >=20 > I'll be keeping my eye out for alternatives still though. >=20 > Thanx, Jason. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com * Alternative URL: http://run.to/noicys |
From: Jason H. <jas...@bt...> - 2001-09-21 17:59:46
|
Thanks for that, I had forgotten about sprintf(). I have to say it's not an ideal solution. It seems odd that the idea of converting from numbers wasn't put into string. I think I may still write some kind of function to convert "tostring", using sprintf is a more messy solution for my purpose. I'll be keeping my eye out for alternatives still though. Thanx, Jason. ----- Original Message ----- From: "Ioannis Vranos" <no...@ya...> To: <dev...@li...> Sent: Friday, September 21, 2001 9:23 AM Subject: RE: [Dev-C++] Integer to std::string? > I do not know string's member functions yet, but i know C well and you > can use sprintf() to convert a number to a C string, so: > > #include <cstdio> > #include <iostream> > #include <string> > > int main() > { > using namespace std; > > char array[100]; > > sprintf(array, "This is a string with numbers, %d is integer, %f is > float", 2, 5.5); > > string s=array; > > cout<<s<<endl; > } > > > Ioannis > > * Ioannis Vranos > * Programming pages: http://www.noicys.f2s.com > * Alternative URL: http://run.to/noicys |
From: Bobby N. <bwn...@fe...> - 2001-09-21 13:45:08
|
Luigi, Thanks, for the reply. Yes, I would be interested in the tool you referred to for generating makefiles. It it something like autoconf or automake? Most of my previous experience with Makefiles involves open source projects, many of which follow the free software foundations guidelines for generating a configuration script and makefiles. Although, at work, we use Imake to do the same thing. Thanks, Bobby Luigi Santillo wrote: > <snip> > Besides, keep in mihd that a Dev-IDE project instructs the compiler > to "always complile everything", which is not what one usually wants. > <snip> Ouch! No wonder the compile, link, execute cycle seemed slow. I assumed my machine was just wheezing, but that smarts to compile everything. And, I might add, it goes against the whole purpose of using a makefile to begin with. Sigh. > -- > gisan > gi...@li... > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users -- Sr. Programmer / Analyst FedEx Services 20 FedEx Parkway Collierville, TN 38017 (901) 263-6517 |
From: St0fF 6. <st...@gm...> - 2001-09-21 09:10:56
|
Hi ! Would be very interesting to know about that automatic makefile generating. I'm really (I MEAN THAT!) a newbie to C++. All I did before was Commodore 64 / 6510-Assembler Coding, starting with small convertion tools, to extremely large music editors (I made AcidTracker), and finally coding Demos. So you see I'm not new to the matter of programming, but I don't know shit'bout makefiles. So spread your word! Cheers, St0fF ----- Original Message ----- From: "Luigi Santillo" <gi...@li...> To: <dev...@li...> Sent: Friday, September 21, 2001 5:46 AM Subject: Re: [Dev-C++] Generating project file from an existing makefile > At 10.33 20/09/01 -0500, you wrote: > >... > >Previously, I've built everything from Makefiles that I put together by > >hand, and I'm not really looking forward to recreating all of that work > >as bloodshed project files. Is there any way to read in a makefile (gnu > >make) and have the IDE create the project file for me? > > You mean: is there anyway to convert a makefile into a project file? > Well, I don't think so. > > But why would you need to do so, can't you keep managing your old projects > using makefiles? > Besides, keep in mihd that a Dev-IDE project instructs the compiler > to "always complile everything", which is not what one usually wants. > > If you are tired of putting together makefiles by hand, I have a way to > generate them automatically (I don't mean the facility provided by Dev-IDE, > because that is a tool that converts a Dev-IDE project file into a > makefile, of course of the type "always compile everything"): let me know > if you are interested. > > -- > gisan > gi...@li... > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
From: Michael C. <jd...@ho...> - 2001-09-21 09:09:20
|
Hi, Sorry, ltoa is not part of the POSIX standard (but I have got an old book!), it is a vendor specific extension. You would have to use one of the c string library functions as suggested to you by someone before. You may want to look at the cout functions for precision as well. Michael >From: "Michael Codadeen" <jd...@ho...> >Reply-To: dev...@li... >To: dev...@li... >Subject: Re: [Dev-C++] Integer to std::string? >Date: Fri, 21 Sep 2001 08:57:53 +0000 > >Hi, > >Try > >--- >#include <stdlib.h> >#include <iostream.h> >#include <string> > >int main () >{ > int myInt = 5; > > string str (ltoa(myInt)); > cout << str << endl; > > return 0; >} >--- > >NOTE: I did not write this on DevC++ but on HPUX 10.20. > >Michael > >>From: "Jason Hardman" <jas...@bt...> >>Reply-To: dev...@li... >>To: "Dev-C++" <dev...@li...> >>Subject: [Dev-C++] Integer to std::string? >>Date: Fri, 21 Sep 2001 04:30:49 +0100 >> >>Hi, >> >>I'm a bit rusty in my C++ and I just cannot seem to find a way of >>initialising a std::string with an integer value. While I can write a >>function to do it quite easily I had thought that there was a either a >>standard function or member of string that would do it, but I can't find >>one. I might be missing something with being tired of course. I know in >>future I will want to be doing similar with float's too, and I hope there >>is >>an easy way of doing that. I don't want to have to reinvent the wheel if I >>can avoid it. >> >>I remember with AnsiString in BCB or (or Delphi) would take it as a >>constructor argument, but std::string doesn't seem to have that ability. >> >>Thanx for any help, Jason. >> >> >>_______________________________________________ >>Dev-cpp-users mailing list >>Dev...@li... >>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > >_________________________________________________________________ >Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |
From: Michael C. <jd...@ho...> - 2001-09-21 08:58:00
|
Hi, Try --- #include <stdlib.h> #include <iostream.h> #include <string> int main () { int myInt = 5; string str (ltoa(myInt)); cout << str << endl; return 0; } --- NOTE: I did not write this on DevC++ but on HPUX 10.20. Michael >From: "Jason Hardman" <jas...@bt...> >Reply-To: dev...@li... >To: "Dev-C++" <dev...@li...> >Subject: [Dev-C++] Integer to std::string? >Date: Fri, 21 Sep 2001 04:30:49 +0100 > >Hi, > >I'm a bit rusty in my C++ and I just cannot seem to find a way of >initialising a std::string with an integer value. While I can write a >function to do it quite easily I had thought that there was a either a >standard function or member of string that would do it, but I can't find >one. I might be missing something with being tired of course. I know in >future I will want to be doing similar with float's too, and I hope there >is >an easy way of doing that. I don't want to have to reinvent the wheel if I >can avoid it. > >I remember with AnsiString in BCB or (or Delphi) would take it as a >constructor argument, but std::string doesn't seem to have that ability. > >Thanx for any help, Jason. > > >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |
From: Ioannis V. <no...@ya...> - 2001-09-21 07:22:15
|
I do not know string's member functions yet, but i know C well and you can use sprintf() to convert a number to a C string, so: #include <cstdio> #include <iostream> #include <string> int main() { using namespace std; char array[100]; sprintf(array, "This is a string with numbers, %d is integer, %f is float", 2, 5.5); string s=array; cout<<s<<endl; } Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com * Alternative URL: http://run.to/noicys > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Jason Hardman > Sent: Friday, September 21, 2001 5:31 AM > To: Dev-C++ > Subject: [Dev-C++] Integer to std::string? > > > Hi, > > I'm a bit rusty in my C++ and I just cannot seem to find a > way of initialising a std::string with an integer value. > While I can write a function to do it quite easily I had > thought that there was a either a standard function or member > of string that would do it, but I can't find one. I might be > missing something with being tired of course. I know in > future I will want to be doing similar with float's too, and > I hope there is an easy way of doing that. I don't want to > have to reinvent the wheel if I can avoid it. > > I remember with AnsiString in BCB or (or Delphi) would take > it as a constructor argument, but std::string doesn't seem to > have that ability. > > Thanx for any help, Jason. > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
From: Michael C. <jd...@ho...> - 2001-09-21 06:57:00
|
Hi, I'd also be quite interested in your Makefile generation procedure. Are you taking about nmimake by chance ? Michael >From: Luigi Santillo <gi...@li...> >Reply-To: dev...@li... >To: dev...@li... >Subject: Re: [Dev-C++] Generating project file from an existing makefile >Date: Fri, 21 Sep 2001 05:46:21 +0200 > >At 10.33 20/09/01 -0500, you wrote: >>... >>Previously, I've built everything from Makefiles that I put together by >>hand, and I'm not really looking forward to recreating all of that work >>as bloodshed project files. Is there any way to read in a makefile (gnu >>make) and have the IDE create the project file for me? > >You mean: is there anyway to convert a makefile into a project file? >Well, I don't think so. > >But why would you need to do so, can't you keep managing your old projects >using makefiles? >Besides, keep in mihd that a Dev-IDE project instructs the compiler >to "always complile everything", which is not what one usually wants. > >If you are tired of putting together makefiles by hand, I have a way to >generate them automatically (I don't mean the facility provided by Dev-IDE, >because that is a tool that converts a Dev-IDE project file into a >makefile, of course of the type "always compile everything"): let me know >if you are interested. > >-- >gisan >gi...@li... > > >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |
From: Luigi S. <gi...@li...> - 2001-09-21 04:00:05
|
At 21.26 17/09/01 -0500, you wrote: >There is a problem with either my computer or C++: sometimes, the compiler >gets stuck and everything I compile ends in the same result!. I must >create a new file to get out of this dead end!. It's anoying because >sometimes I don't know when I fail the code. HELP! > Perhaps you get an "access violation" when compiling a project that you have created in a previous session of Dev-C++ and reopened to resume development? -- gisan gi...@li... |
From: Luigi S. <gi...@li...> - 2001-09-21 04:00:03
|
At 10.33 20/09/01 -0500, you wrote: >... >Previously, I've built everything from Makefiles that I put together by >hand, and I'm not really looking forward to recreating all of that work >as bloodshed project files. Is there any way to read in a makefile (gnu >make) and have the IDE create the project file for me? You mean: is there anyway to convert a makefile into a project file? Well, I don't think so. But why would you need to do so, can't you keep managing your old projects using makefiles? Besides, keep in mihd that a Dev-IDE project instructs the compiler to "always complile everything", which is not what one usually wants. If you are tired of putting together makefiles by hand, I have a way to generate them automatically (I don't mean the facility provided by Dev-IDE, because that is a tool that converts a Dev-IDE project file into a makefile, of course of the type "always compile everything"): let me know if you are interested. -- gisan gi...@li... |
From: Jason H. <jas...@bt...> - 2001-09-21 03:31:27
|
Hi, I'm a bit rusty in my C++ and I just cannot seem to find a way of initialising a std::string with an integer value. While I can write a function to do it quite easily I had thought that there was a either a standard function or member of string that would do it, but I can't find one. I might be missing something with being tired of course. I know in future I will want to be doing similar with float's too, and I hope there is an easy way of doing that. I don't want to have to reinvent the wheel if I can avoid it. I remember with AnsiString in BCB or (or Delphi) would take it as a constructor argument, but std::string doesn't seem to have that ability. Thanx for any help, Jason. |
From: tayo o. <ta...@ya...> - 2001-09-20 21:45:30
|
Please unsubscribe me from your list. Thanks. Tayo Odesanya --- Juan Manuel Alvarez Baez <onl...@ho...> wrote: > There is a problem with either my computer or C++: > sometimes, the compiler gets stuck and everything I > compile ends in the same result!. I must create a > new file to get out of this dead end!. It's anoying > because sometimes I don't know when I fail the code. > HELP! > > > Juan Manuel Alvarez Báez > Nicaragua > Onl...@ho... > __________________________________________________ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ |
From: Bobby N. <bwn...@fe...> - 2001-09-20 15:33:16
|
All, I'm new to the bloodshed IDE (downloaded it last night as a matter of fact) and am pretty impressed so far. I'm using it to support open source work that I do on my off time (i.e. at night after the family goes to sleep :-) Previously, I've built everything from Makefiles that I put together by hand, and I'm not really looking forward to recreating all of that work as bloodshed project files. Is there any way to read in a makefile (gnu make) and have the IDE create the project file for me? Thanks, Bobby Nations Sr. Programmer / Analyst FedEx Services |
From: Juan M. A. B. <onl...@ho...> - 2001-09-20 13:11:26
|
There is a problem with either my computer or C++: sometimes, the = compiler gets stuck and everything I compile ends in the same result!. I = must create a new file to get out of this dead end!. It's anoying = because sometimes I don't know when I fail the code. HELP! Juan Manuel Alvarez B=E1ez Nicaragua Onl...@ho... |
From: Ioannis V. <no...@ya...> - 2001-09-20 06:54:15
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Nurhidayat > Sent: Thursday, September 20, 2001 7:06 AM > To: dev...@li... > Subject: [Dev-C++] Bugs: Unallocated Memory > > > I've found bugs(?) when trying to code linked list record. > Compiler cannot allocated base type variable within > structure, but array of char work fine. > > Here is I simplified code: > > #include <stdlib.h> > #include <stdio.h> > > struct mystruct { > char name[8]; > int age; > }; > > int main() > { > mystruct *ptr; //test dynamic allocation > int *page; > ptr = new mystruct; //compiler must allocate memory > page = new int; > > printf("Address of name : %p\n", ptr->name); //allocated > printf("Address of age : %p\n", ptr->age); //give us > null pointer, why? > printf("Address of page : %p\n", page); //allocated > (for comparison) These 3 give to me: Address of name : 025D2440 Address of age : 72676F72 Address of page : 025D2470 But, this is not the address of age. Address of age is printf("Address of age : %p\n", &ptr->age); > > //so ... > printf("Enter name:"); scanf("%s", ptr->name); //success > printf("Enter age :"); scanf("%s", ptr->age); //raised error!!! The correct is scanf("%d", &ptr->age); > delete ptr; > delete page; > system("PAUSE"); > return 0; > } > > ___Nurhidayat___ Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com * Alternative URL: http://run.to/noicys |
From: Nurhidayat <dh...@ma...> - 2001-09-20 05:46:16
|
Oh.. It's not bug. I forget to write an ampersand in front of pointer variable... #include <stdlib.h> #include <stdio.h> struct mystruct { char name[8]; int age; }; int main() { mystruct *ptr; //test dynamic allocation int *page; ptr = new mystruct; //compiler must allocate memory page = new int; printf("Address of name : %p\n", ptr->name); //allocated printf("Address of age : %p\n", &(ptr->age)); //allocated // printf("Address of page : %p\n", page); //allocated (for comparison) //so ... printf("Enter name:"); scanf("%s", ptr->name); //success printf("Enter age :"); scanf("%d", &(ptr->age)); //success delete ptr; delete page; system("PAUSE"); return 0; } ___Nurhidayat___ |
From: Nurhidayat <dh...@ma...> - 2001-09-20 05:09:46
|
I've found bugs(?) when trying to code linked list record. Compiler cannot allocated base type variable within structure, but array of char work fine. Here is I simplified code: #include <stdlib.h> #include <stdio.h> struct mystruct { char name[8]; int age; }; int main() { mystruct *ptr; //test dynamic allocation int *page; ptr = new mystruct; //compiler must allocate memory page = new int; printf("Address of name : %p\n", ptr->name); //allocated printf("Address of age : %p\n", ptr->age); //give us null pointer, why? printf("Address of page : %p\n", page); //allocated (for comparison) //so ... printf("Enter name:"); scanf("%s", ptr->name); //success printf("Enter age :"); scanf("%s", ptr->age); //raised error!!! delete ptr; delete page; system("PAUSE"); return 0; } ___Nurhidayat___ |
From: Cory N. <Phr...@so...> - 2001-09-20 02:12:33
|
Go to www.rarsoft.com and get WinRAR (windows) or RAR (dos/unix) -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Ameer Khan Sent: Saturday, September 15, 2001 9:14 AM To: dev...@li... Subject: [Dev-C++] Programme for 'unrar" friends, I have a Programme installation file with ".rar" extention and the instruction given is to 'unrar' the same and instal. Which proramme is used to 'unrar ' the same and where it is available. With regards sm...@vs... |
From: graeme <gr...@dr...> - 2001-09-18 08:05:23
|
I'm not quite sure what it is you intend to do, so maybe you could clarify your request. 1) Are the variables to be created before you compile (relatively simple) or dynamically (a little harder)? 2) Will all the record fit into a single file or different files (if different how will they be split - by record or by field?) In the first approach to question 1) you will just need to create a structure or class to hold the variables. They have already been designed so the structure should be easy to create: For example: struct addr { char name [30]; char street [40]; char city [20]; char province [3]; unsigned long int code; }; The dynamic approach requires a little more work. First you need to know how much memory each record will require and then allocate sufficient space for that record. You will probably want to use the sizeof(int) and sizeof(char) function calls to ensure that the size allocation is portable. Once you have determined the total size requirements the value can be stored in the memory space by using pointer arithmetic and union overlays. This gets a little complicated so I won't go into the detail unless you need it. With the saving to disk there are many approaches and I think that the approach you take will depend upon whether you are using C or C++. I tend to use C++ and have a preference for the << operator which I make a friend of the class I am creating. >I am trying to create a "datatable" (similar to a database about 10 = >records containing about 26 variables per record), the "datatable" will = >contain integer and text values. And I need to find out how to create = >the storage areas and how to save them to a discfile and load them back = >in to memory. |
From: Ioannis V. <no...@ya...> - 2001-09-18 03:42:35
|
I had told you what's wrong and i had sent you the correct code! :) Anyway, the problem is that you define the already defined in Dev-C++ header files ULONG, USHORT. I am sending you the corrected reghide.h. The change is that i have commented out 2 lines of code at the beginning of the file. Keep coding, Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com * Alternative URL: http://run.to/noicys > -----Original Message----- > From: We...@ha... [mailto:We...@ha...]=20 > Sent: Monday, September 17, 2001 7:54 PM > To: no...@ya... > Cc: no...@ya... > Subject: [Dev-C++] Dev-C++ and VC++ 6.0 >=20 >=20 > Hi Ioannis, >=20 > Thkz for all help me! The code is for NT. I'm sending it together! = =3D] >=20 > If u can see and help me! =3D] I will be very happy! >=20 > OT.: Do u have ICQ ? >=20 > Thkz, sorry for my poor english >=20 > Best Regards. >=20 > [ ]'s >=20 >=20 |
From: Joseph, B. & E. V. <bl...@ho...> - 2001-09-17 22:14:32
|
In answer to: I am sorry if this is a stupid question but: How did you get the first = =3D one to work? Which one did you click on on the bottom of the various =3D versions of the code? What kind of project type did you use? empty? =3D Empty Window? Etc... I used an empty prject and loaded the source file from the site (the = Visual CPP one that you can download). Then I had to change = CDS_FULLSCREEN to 0 (zero). Then go to the "Project->Project Options" = menu and under "Further object files or linker options:" put this line -lopengl32 -lglu32 then you should be able to compile it! If you have further trouble, I = can send you the project file, etc. Glad I could help, Blumojo |
From: Darren P C. <eni...@ho...> - 2001-09-17 18:47:39
|
Hi this is my first post, so be gentle with me ;) I am trying to create a "datatable" (similar to a database about 10 = records containing about 26 variables per record), the "datatable" will = contain integer and text values. And I need to find out how to create = the storage areas and how to save them to a discfile and load them back = in to memory. I've read a couple of books on the subject of C++ programming, but they = were so confusing that they made my brain trickle out of my ears. So I = was looking for some help that could explain it in a way that even a = total idiot like myself could understand it. Thanx Knight^in^Shining^Armour |
From: Giuseppe F. <egi...@ti...> - 2001-09-17 12:58:03
|
----- Original Message -----=20 From: Tomas Dolejsi=20 To: dev...@li...=20 Sent: Saturday, September 15, 2001 7:44 PM Subject: RE: [Dev-C++] strings for win32 (ABOUT UNICODE) Hi Guiseppe! I learned a little about unicode and Win32 API. Let me share this with = you. Win32 contains both ASCII and wide char modifications of functions = that require text parameter(s). e.g. There's no entry point in the USER32.DLL for the function called = MessageBox. Instead, there are two others. MessageBoxA (for ascii) and MessageBoxW = (for wide chars). But you don't need to worry about it. Simply use MessageBox function. How all this works? The real functions are defined in WinUser.h exactly that: int WINAPI MessageBoxA (WHND hWnd, LPCSTR lpText, LPCSTR lpCaption, = UINT uType) ; int WINAPI MessageBoxW (WHND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, = UINT uType) ; Beside this definitions, you'll find there following code: #ifdef UNICODE #define MessageBox MessageBoxW #else #define MessageBox MessageBoxA #endif It means that if you the call MessageBox function the MessageBoxA = function will be called, unless you insert this line #define UNICODE in the beginning of your own code. It is the same with other text based functions (TextOut, sprintf, = fprintf, strlen, strstr, atc.) There's a pice of my code I work on MessageBox(hWnd, "Furcadia Character Description Editor\nCopyright = =A9 2001 Tomas Dolejsi\nVersion 1.01 (Freeware)\n\nCompiled with DevC++ = 4 ", "Fcde", MB_OK); If you want to use the UNICODE (wide char) instead of ASCII, adding = the line #define UNICODE is one thing. You also need to convert all text = (and char) constants you give the functions as the parameters. The = converison is carried out with L key (e.g. wchar_t * pw =3D L"Hello!" = .) Type wchar_t is unsigned short. There's a macro TEXT() which = converts the given text if UNICODE directive is defined.=20 TEXT() macro is defined in WinNT.h:=20 #ifdef UNICODE #define TEXT(q) L##q #else #define TEXT(q) q #endif That's all from me. I also attach a simple dialog example (originaly = from Ch. Petzold's Programing Windows). Best luck! Hi Tomas. The code compile in my computer too.=20 Thanks for your help.=20 Giuseppe |
From: Vassili <v.v...@bt...> - 2001-09-17 11:27:17
|
Try the Community Discussion Forum at http://java.sun.com/ I found a nice editor at http://www.jcreator.com/ It's got the VC++ feel to it. ----- Original Message -----=20 From: Jesper=20 To: dev...@li...=20 Sent: Monday, September 17, 2001 11:30 AM Subject: [Dev-C++] (no subject) This has nothing to do with C++, but i was wondering if anybody knows = a good mail-list for Java? |