dev-cpp-users Mailing List for Dev-C++ (Page 604)
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: David M. <ci...@ya...> - 2002-04-08 18:36:15
|
Sorry but I have to put in my 2 cents check out his site for information on the chips themselves http://www.emulators.com/pentium4.htm Check out round 1 for a comparison of both price and performance. it is under the Pentium 4 - Generation 7 or complete stupidity? section also as a C++ programmer you have nothing to worry about, the compiler takes care of those details. if you were programming in assembly the only difference is you have a few more or a few less instructions avalible this rarely makes a difference unless you have a program optimized for that specific processor as most of the extra instructions. ---- Original Message ----- > From: "Napoleon Ahiable" <nah...@so...> > To: <dev...@li...> > Sent: Sunday, April 07, 2002 4:35 PM > Subject: Re: [Dev-C++] AMD ATHLON v PENTIUM 4 > > > Hi all, > I am about to get myself a new PC. I have always used Intel based > PC's and > after all that I have heard about AMD ATHLON in terms of speed (ie > faster > than its INTEL competitor) I am tempted to give it a try. I however > want > know if this claim is true and if it has any drawbacks with respect > to > programming > > Cheers > > Napleon. __________________________________________________ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ |
|
From: christiaan s. <ck...@ia...> - 2002-04-08 18:16:55
|
i want one with initialization functions, cleanup functions an entry = point... the works! |
|
From: Marcantonio M. <mar...@ma...> - 2002-04-08 17:25:36
|
Hi, I understand that I am making questions that may be boring for = experienced C++ users, but I'm moving the very first steps with Dev-C++. I have created an ActiveX EXE server with Visual Basic 6. I am trying to = use CoCreateInstance from DEV-c++ to access it, but no matter what I do, = I can't make it work. Would anyone be so kind to show me the steps to instantiate a custom COM = object? Pretty please.. I have really tried before asking. Marcantonio |
|
From: Marcantonio M. <mar...@ma...> - 2002-04-08 17:03:12
|
Hi, I understand that I am making questions that may be boring for = experienced C++ users, but I'm moving the very first steps with Dev-C++. I have created an ActiveX EXE server with Visual Basic 6. I am trying to = use CoCreateInstance from DEV-c++ to access it, but no matter what I do, = I can't make it work. Would anyone be so kind to show me the steps to instantiate a custom COM = object? Pretty please.. I have really tried before asking. Marcantonio |
|
From: Ioannis V. <no...@ho...> - 2002-04-08 16:17:33
|
-----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Bob Wilson Sent: Monday, April 08, 2002 6:02 PM To: fee...@sa...; Dev-C++ User Mailing List Subject: [Dev-C++] Deliberate crashes I have several questions. How could someone who is expert enough to write a beginning book on C++ make such an error Deleting the contents of an invalid memory address (that is a memory address where there is no space allocated by new) invokes undefined behavior. Undefined behavior can be the program crashes, the OS crashes, the airplane falls, the robotic arm destroyes the machine. In your case the program does not crash but some other damage occurs (some contents of another thing are altered (e.g. of a function) or it can be that delete knows that it has erased the contents of that memory and doesn't clear them again. In any case it just *happened* to not crash your program immediately. 1. Is it perhaps because the ANSI/ISO definition of the language and what a compiler should do has changed? No. 1. Have GNU and the Gates crowd made similar unilateral changes to solve a pesky problem? It can be that some particular compiler take care of that but you can't rely on this. 1. Did I misread something which seems fairly straight forward? 2. Are there other pointer inconsistances hiding in the weeds waiting to pounce on the unsuspecting? Yes the problem may appear later. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net <http://www.noicys.cjb.net/> * Alternative URL: http://run.to/noicys |
|
From: <ech...@ne...> - 2002-04-08 16:00:43
|
"Daniel K. O." <dan...@ya...> wrote:
>Thanks Evan
>
>It solved the problems with missing headers.
>
>But I'm still having some problems:
>
>
> 2)) Look to this error:
> "144 callbacks.c
> warning: passing arg 2 of `create_dir_browser' discards qualifiers
>from
> pointer target type"
>
> Here is the code:
> ///
> /* Function prototype */
> 7: GtkWidget *create_dir_browser(gchar * title, gchar * current_path,
> GtkSelectionMode mode, void (*handler) (gchar *));
>
> 124: void on_dir_select29(gchar * dir);
>
> ...
>
> 141: GtkWidget *win;
> 142:
> 143: win = create_dir_browser(_("Select Directory"), g_get_home_dir(),
> 144: GTK_SELECTION_SINGLE, on_dir_select29);
> ///
>
> I get this error in many other points too. I have no idea of what to do
> (what does the "void (*handler) (gchar *)" mean?).
I would try casting the second argument to (gchar*):
win = create_dir_browser(_("Select Directory"), (gchar*)g_get_home_dir(),
GTK_SELECTION_SINGLE, on_dir_select29);
I believe this error occures because the appliction was orrginally written in C which is less strict with it's type checking than C++. A type cast is probobly all you need.
gtk is a C library orrignaly written on linux but later ported to acouple different OSes, it is roughly equvilant to the gui libs for widows except I think that those are written in C++.
"void (*handler) (gchar *)" means a function pointer to a function of taking a gchar* and returning void.
on_dir_select29 should be a function of this type.
Ex:
void my_handler(gchar* variable){
// do something
}
int main(){
void (*handler)(gchar*); // a function pointer
handler = my_handler; // initialize pointer note: a function name is treated as a pointer here - no need to dereference
handler(gchar_ptr_variable); // user pointer
}
I don't know why the linker errors are occuring, they might go away after the fixes above, if not I would need to see the code where the erors occure.
Evan
PS What kind of app are you porting?
>
>
>
>
>
>Well, commenting those lines, it compiles, but then I get linker errors:
>
>c:/projects/lopster/global.o: In function `user2_compare':
>//c/projects/lopster/src/global.c:5452: undefined reference to
>`inet_network'
>
>c:/projects/lopster/search.o: In function `search_fields_detach':
>//c/projects/lopster/src/search.c:2117: undefined reference to
>`gtk_window_reposition'
>
>
>
>
>My objects included:
>
>-lgtk.dll -lgdk-win32-2.0.dll -lgmodule-2.0.dll -lgobject-2.0.dll -lglib-2.0
>.dll -lwininet -lwsock32 -lgtk-win32-1.3.dll C:\Dev-C++\Lib\gtk.lib
>C:\Dev-C++\Lib\gtk-win32-1.3.lib -lc -lmswsock -lgtk-win32-2.0.dll
>C:\Dev-C++\Lib\gtk-win32-2.0.lib
>
>
>
>Again, thanks for any help.
>
>
>
>
>
>
>Daniel K. O.
>
>
>
>-----Mensagem original-----
>De: dev...@li...
>[mailto:dev...@li...]Em nome de Evan Hempel
><ech...@ne...>
>Enviada em: sexta-feira, 5 de abril de 2002 16:23
>Para: "Dev-Cpp-Users"
>Cc: "Daniel K. O."
>Assunto: [Dev-C++] Re: 10 quick questions
>
>
>It looks like you need gtk+ and pw32 (a posix emulation layer)
>
>You can find them at:
> Pw32:http://pw32.sourceforge.net/
> Gtk+:http://gtk.org (dev-c++ packages at
>http://www.bloodshed.net/dev/packages/gtk.html)
>
>I think that these 2 packages would remove most (all?) the errors. But, I
>haven't used either - just read some of their docs.
>
>Evan Hempel
>
>PS: I think that there also is a dev-c++ package for pw32
>
>
>_________________________________________________________
>Do You Yahoo!?
>Get your free @yahoo.com address at http://mail.yahoo.com
>
>
__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/
Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/
|
|
From: Bob W. <bo...@ph...> - 2002-04-08 16:00:15
|
I will appologize in advance for the length of this message. Anyone who =
has much experience in programming knows pointers are an extremely =
powerful and useful construct, but that they can be the quickest path to =
the hellfire and damnation of runtime erros and program crashes if =
careful attention is not paid to how they are used.=20
With that as a backdrop here is a quote from Sams Teach Yourself C++ in =
24 Hours, third Edition by Jesse Liberty.=20
-------------------------------------------------------------------------=
-------
When you call a delete on a pointer, the memory it points to is freed. =
Calling delete on that pointer again will crash your program! When you =
delete a pointer, set it to 0 (null). Calling delete on a null pointer =
is guaranteed to be safe. For example
Animal: *pDog =3D new Animal;
delete pDog; // frees the memory
pDog =3D 0; // sets the pointer to null
// . . .
delete pDog; // harmless
-------------------------------------------------------------------------=
-------
But it does not work that way. As a matter of fact with both the =
Bloodshed/GNU compiler supplied with the book and VC++ 6.0 it works just =
the opposite. The book uses this program to demonstrate allocating and =
deleting a pointer.=20
-------------------------------------------------------------------------=
-------
// Listing 9.4
// Allocating and deleting a pointer
#include <iostream>
int main()
{
int localVariable =3D 5;
int * pLocal=3D &localVariable;
int * pHeap =3D new int;
if (pHeap =3D=3D NULL)
{
std::cout << "Error! No memory for pHeap!!";
return 1;
}
*pHeap =3D 7;
std::cout << "localVariable: " << localVariable << "\n";
std::cout << "*pLocal: " << *pLocal << "\n";
std::cout << "*pHeap: " << *pHeap << "\n";
delete pHeap;
pHeap =3D new int;
if (pHeap =3D=3D NULL)
{
std::cout << "Error! No memory for pHeap!!";
return 1;
}
*pHeap =3D 9;
std::cout << "*pHeap: " << *pHeap << "\n";
delete pHeap;
return 0;
}
-------------------------------------------------------------------------=
-------
If you compile and run the program the output is as advertised in the =
book;
localVariable: 5
*pLocal: 5
*pHeap: 7
*pHeap: 9
However if you modify the code by setting pHeap to null and call delete =
on pHeap immedately after as shown below. The program still runs without =
error.=20
-------------------------------------------------------------------------=
-------
// Listing 9.4
// Allocating and deleting a pointer
#include <iostream>
int main()
{
int localVariable =3D 5;
int * pLocal=3D &localVariable;
int * pHeap =3D new int;
if (pHeap =3D=3D NULL)
{
std::cout << "Error! No memory for pHeap!!";
return 1;
}
*pHeap =3D 7;
std::cout << "localVariable: " << localVariable << "\n";
std::cout << "*pLocal: " << *pLocal << "\n";
std::cout << "*pHeap: " << *pHeap << "\n";
delete pHeap;
delete pHeap; // Try to crash program
pHeap =3D new int;
if (pHeap =3D=3D NULL)
{
std::cout << "Error! No memory for pHeap!!";
return 1;
}
*pHeap =3D 9;
std::cout << "*pHeap: " << *pHeap << "\n";
delete pHeap;
return 0;
}
-------------------------------------------------------------------------=
-------
If set pHeap to null, however, and then try to assign *pHeap a value, as =
shown below, the program will crash.=20
-------------------------------------------------------------------------=
-------
// Listing 9.4
// Allocating and deleting a pointer
#include <iostream>
int main()
{
int localVariable =3D 5;
int * pLocal=3D &localVariable;
int * pHeap =3D new int;
if (pHeap =3D=3D NULL)
{
std::cout << "Error! No memory for pHeap!!";
return 1;
}
*pHeap =3D 7;
std::cout << "localVariable: " << localVariable << "\n";
std::cout << "*pLocal: " << *pLocal << "\n";
std::cout << "*pHeap: " << *pHeap << "\n";
pHeap =3D 0;
*pHeap =3D33;
pHeap =3D new int;
if (pHeap =3D=3D NULL)
{
std::cout << "Error! No memory for pHeap!!";
return 1;
}
*pHeap =3D 9;
std::cout << "*pHeap: " << *pHeap << "\n";
delete pHeap;
return 0;
}
-------------------------------------------------------------------------=
-------
I have several questions.
1.. How could someone who is expert enough to write a beginning book =
on C++ make such an error
2.. Is it perhaps because the ANSI/ISO definition of the language =
and what a compiler should do has changed?=20
3.. Have GNU and the Gates crowd made similar unilateral changes to =
solve a pesky problem?
4.. Did I misread something which seems fairly straight forward?
5.. Are there other pointer inconsistances hiding in the weeds =
waiting to pounce on the unsuspecting?
|
|
From: Robert L. <rl...@gd...> - 2002-04-08 14:25:54
|
Hello, I am very new to Dev-C++ so excuse my ignorance. I've been blindly using the big money C++ compiler, but now I'm better. Here is my deal. I have a gui development library that utilizes opengl and glut that I want to link into my appication. Here are the steps I took. 1. Compiled the library 2. Developed an archive file from the object files using the command line gcc archive command (ar -ru lib.a *.o). 3. Created a new project that links in -lopengl32 -lglu32 -lglut32 and lib.a. (I put this in Further object files section of the project options window). 4. Attempted to compile my application When Dev-C++ attempts to link in the library it gives me an "undefined reference to `opengl function' error. It's almost as if it doesn't know where to find the opengl functions that I included. If I put the whole library source code into my project I can compile, link, and run the project without a hitch. Any clues as to what I'm doing wrong? Thanks for you help. Bobby |
|
From: Ioannis V. <no...@ho...> - 2002-04-08 14:09:49
|
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf
> Of Jason Hardman
> Sent: Monday, April 08, 2002 1:17 AM
> To: Dev-C++; Daniel Glenfield
> Subject: Re: [Dev-C++] difference between char* argv[] and
> char *argv[]
>
> Even more confusing (<evil laugh>) is that you can write
> *argv[], or **argv and they are
> interchangeable. I'm not sure about argv[][] though -
> probably invalid.
In C & C++ a function argument defined as an array is the same as if it
was defined as a pointer. That is both are pointers (and not an array).
Consider the code:
unsigned long slen(char p[10])
{
unsigned long size=0;
while(*p++)
size++;
return size;
}
So **argv, *argv[] and argv[][] are the same thing as function arguments
(only). For normal code only the first 2 can be considered compatible.
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
* Alternative URL: http://run.to/noicys
|
|
From: Benjamin W. <ben...@ho...> - 2002-04-08 12:46:28
|
It looks like you have had some great discussion on the AMD chips, and I figured that I would simply add my two-cents worth. AMD versus Intel... personally, I don't care. I have used AMD's in the past in both my laptop and desktop and they perform wonderfully, especially running Windows 2000 or better. I run Intel Pentium 3 here at work and really, I don't see any difference. It's personal preference, and since AMD is cheaper in the cost sense of the word, why not? Hope this helps, Ben _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com |
|
From: Jason H. <jas...@bt...> - 2002-04-08 06:51:06
|
I know you've been told they are the same by now, which is right, but I though I'd add the why of the two forms. There is an argument about which is better between some programmers. Some say that "char* variable;" is best because the pointer symbol is visibly linked to the char type, so it's clear that you are declaring a character pointer (a pointer to a character) and not just a character. The others say that this is misleading as if you write: char* var1, var2; it looks like both var1 and var2 are pointers, where as in fact var1 is a character pointer and var2 is just a character, so they say use the second method: char *var1, *var2; // two pointers In the end it's a matter of style, both are valid and you can even write (AFAIK): char * var1; // just to confuse you! There are other arguments, but I don't bother with any of it and just use what I want. Even more confusing (<evil laugh>) is that you can write *argv[], or **argv and they are interchangeable. I'm not sure about argv[][] though - probably invalid. My two cents, Jason. ----- Original Message ----- From: "Daniel Glenfield" <sp...@ho...> To: <dev...@li...> Sent: Sunday, April 07, 2002 12:07 PM Subject: [Dev-C++] difference between char* argv[] and char *argv[] Hi all, what's the difference between char* argv[] and char *argv[] ? imilarly, char* abc and char *abc ? Are they the SAME because the compiler ignores whitespace? Daniel _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com _______________________________________________ Dev-cpp-users mailing list Dev...@li... https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Daniel G. <sp...@ho...> - 2002-04-08 06:29:51
|
I think argv[][] would be a two dimensional array, n'est pas? Thanks for the information on the whole char* thing, I think I'll go for the *var type but we'll see (new job today so I guess I'll do what I'm told). Best regards, Daniel >From: "Jason Hardman" <jas...@bt...> >To: "Dev-C++" <dev...@li...>, "Daniel Glenfield" ><sp...@ho...> >Subject: Re: [Dev-C++] difference between char* argv[] and char *argv[] >Date: Mon, 8 Apr 2002 00:17:04 +0100 > >I know you've been told they are the same by now, which is right, but I >though I'd add the why of >the two forms. > >There is an argument about which is better between some programmers. Some >say that "char* variable;" >is best because the pointer symbol is visibly linked to the char type, so >it's clear that you are >declaring a character pointer (a pointer to a character) and not just a >character. The others say >that this is misleading as if you write: > >char* var1, var2; > >it looks like both var1 and var2 are pointers, where as in fact var1 is a >character pointer and var2 >is just a character, so they say use the second method: > >char *var1, *var2; // two pointers > >In the end it's a matter of style, both are valid and you can even write >(AFAIK): > >char * var1; // just to confuse you! > >There are other arguments, but I don't bother with any of it and just use >what I want. > >Even more confusing (<evil laugh>) is that you can write *argv[], or **argv >and they are >interchangeable. I'm not sure about argv[][] though - probably invalid. > >My two cents, Jason. > >----- Original Message ----- >From: "Daniel Glenfield" <sp...@ho...> >To: <dev...@li...> >Sent: Sunday, April 07, 2002 12:07 PM >Subject: [Dev-C++] difference between char* argv[] and char *argv[] > > >Hi all, >what's the difference between char* argv[] and char *argv[] ? imilarly, >char* abc and char *abc ? Are they the SAME because the compiler ignores >whitespace? > >Daniel > > > >_________________________________________________________________ >Chat with friends online, try MSN Messenger: http://messenger.msn.com > > >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com |
|
From: Jason H. <jas...@bt...> - 2002-04-08 02:33:54
|
My previous statement is right and is based upon an article at: http://news.zdnet.co.uk/story/0,,t269-s2107677,00.html Where it says: "AMD launched its "True Performance Initiative" with the Athlon XP processor last autumn, in order to shift consumers away from the perception that a chip with a faster clock speed offers better performance. Athlon XP chips come with a model number that indicates their performance relative to older Athlon chips, so that the Athlon XP 2000+ (at 1.67GHz) would offer roughly the same performance as an earlier Athlon clocking 2,000MHz (2GHz). Intel and its allies claim the model numbers are designed to invite comparison with Pentium 4 chips of a similar clock speed." Jason. ----- Original Message ----- From: "Ioannis Vranos" <no...@ho...> To: "Dev-C++" <dev...@li...> Sent: Monday, April 08, 2002 3:42 AM Subject: RE: [Dev-C++] AMD ATHLON v PENTIUM 4 > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Jason Hardman > Sent: Monday, April 08, 2002 1:48 AM > To: Dev-C++; Napoleon Ahiable > Subject: Re: [Dev-C++] AMD ATHLON v PENTIUM 4 > > > At the moment Athlons are faster and cheaper than their > equivalents in the P4 range, which is good > enough for me. Also, just a quick correction, the official > line with the Athlon XP ????+ where the > ???? is a number i.e. 2100, the number represents how fast > the clock speed of an Athlon based on the > older Athlon CPU core would have to run to get the same performance. Actually it is of the equivallent Intel CPU. Nothing to do with the previous core. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net * 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...@ho...> - 2002-04-08 02:13:44
|
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...] On Behalf Of Bob
Wilson
Sent: Monday, April 08, 2002 2:43 AM
To: Dev-C++ User Mailing List
Subject: [Dev-C++] Why don't they?
Yes, at my current level of knowledge, about the only thing I can do is
write console programs. Hopefully by the middle of this week that will
change.
Don't try to learn the language and an IDE at the same time. C++ is not
Basic and you must know what belongs to the official language and what
is a system extension. I will not lie to you, to learn using the
language and learn some IDE it will take at least 1 year. To learn using
the language efficiently 2+.
If you are in a hurry then learn some language with less abilities e.g.
Pascal/Delphi or Java etc.. But you can't write an OS in Delphi, Java,
VB etc. :) Nor a compiler for your own programming language.
To run the console program either open a console in the directory your
.cpp is placed and run the .exe from there or do:
#include <cstdlib>
and inside main() at the end:
std::system("pause");
I started out using system("PAUSE"), but since I wanted to learn how to
design a function which would determine if any key had been hit, what
that key was, and reset itself for later use, I started playing around
with the conio_mingw function kbhit(). Unfortunately that function does
not do what I want, and I haven't either figured out how to write the
code to do what I want yet. There may well be a pre-exiting function in
one of the copious C++ libraries which does what I want. In any case, I
know I will eventually figure it out.
Lets explain a bit to you what is the ANSI C++ 1998 standard. Do not
think programming is only for a PC. C++ is used from small embedded
microcontrollers (e.g. a telephone system) to large mainframes. The
ANSI/ISO C++ standard guarantees what can be considered portable (that
is ANSI/ISO C++ code can run everywhere). As a result, of all these C++
is designed for maximum efficiency under *serious* space/time
constraints. That's way that everything important is written in C++
(Java virtual machines, Visual Studio, Windows, Office, etc). ANSI C++
provides input/output facilities but as i see you wish to learn
everything at the same time. It can't be done. Read your book first to
understand the basics (abd learn some input/output) ad you will find
anything in course.
To understand why C++ will take some time to learn, it is because C++ is
a multiparadigm language and every paradigm is supported well and with
the maximum efficiency (for example it supports multiple inheritance
that Java etc do not support in the object oriented paradigm). Another
paradigm is the generic paradigm, that is algorithms and containers that
work for any type. The generic paradigm is implemented with C++'s
templates which was invented by Alexander Stepanov a Russian
mathematician, after discussions with Bjarne Stroustrup the creator of
C++ who is a genius.
A simple example of templates:
template <class T>
T add(T a, T b)
{
return a+b;
}
The above function works for any type of variables and returns value of
the same type. This can't be found in another language.
As I said, I am convinced that C++ is necessary to any success in the IT
field. Perhaps even more important, I am enjoying process of learning
the language. It is very versatile and very powerful. In its current
iteration, it is perhaps the best language for OOP (Object Oriented
Programming). Delphi or any of the late Borland Pascal compilers are
also excellent for OOP, but it looks as if C++ will be both more
versatile and more intuitive.
C++ supports 4 paradigms: Object Oriented, procedural, modular and
generic programming. And these in the best way (more things than the
other languages).
I agree that there should be no differences, and, while I have no
personal experience with Microsoft's Visual C++, I have read that Visual
C++ 4.0 matches the ANSI/ISO standard more closely that any of the
follow-on products because of Mirosoft added extentions.
No this is a mistake. Visual C++ 4 is too old. Even Visual C++ 6 was
considered as borken compiler (was made the same time of Window 95!).
With the new Visual C++ 7 things got better. Do not buy any older
version than 7. Also Borland C++ Builder is better (it has a RAD like VB
with much more components).
I am sure you have gathered by my comments above that I disagree with
your suggested order. You need to do both at the same time. Obviously
most of the effort should be expended on learning the language, but
efficient learning of the C++ is enhanced with some basic instruction on
the programming environment. By saying that, I am not advocating that
one's level of knowledge of the programming environment should be even
close to one's knowledge and familiarity with the C++ language when you
finish the book.
If you are referring to Dev-C++ programming environent, it is not so
difficult. If you are referring to some commercial IDE then i suggest
learn enough C++ before. Also keep in mind that it will take 1-2 years
at least. The language is the difficult part, the rest is done with some
IDE which provides some system extensions. That is some C++ library with
ready components that do the job. For example Borland's VCL provides a
TProgressBar to design a moving progress bar. Of course all these are
useless if you do not know how to use the ProgressBar object (that is
you know C++). To learn a professional IDE/library perfectly if you know
the language will not take more than 2-3 weeks. So concentrate on the
difficult part (the language) first.
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
<http://www.noicys.cjb.net/>
* Alternative URL: http://run.to/noicys
|
|
From: Ioannis V. <no...@ho...> - 2002-04-08 01:43:07
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Jason Hardman > Sent: Monday, April 08, 2002 1:48 AM > To: Dev-C++; Napoleon Ahiable > Subject: Re: [Dev-C++] AMD ATHLON v PENTIUM 4 > > > At the moment Athlons are faster and cheaper than their > equivalents in the P4 range, which is good > enough for me. Also, just a quick correction, the official > line with the Athlon XP ????+ where the > ???? is a number i.e. 2100, the number represents how fast > the clock speed of an Athlon based on the > older Athlon CPU core would have to run to get the same performance. Actually it is of the equivallent Intel CPU. Nothing to do with the previous core. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net * Alternative URL: http://run.to/noicys |
|
From: Ioannis V. <no...@ho...> - 2002-04-08 01:40:37
|
> -----Original Message-----
> From: Julian Calderon Almendros [mailto:jul...@er...]
> Sent: Sunday, April 07, 2002 11:58 PM
> To: Ioannis Vranos; Dev-C++
> Subject: RE: [Dev-C++] static members
>
>
> The authentic problem is:
>
> template<unsigned n> class A
> {
> static int x;
> };
The above has no logical meaning (=mistake).
>
> int A<n>::x=0;//??n??
This has no meaning too.
#include <iostream>
template <class T>
class A
{
public:
static int x;
};
template<class T>
int A<T>::x=1;
int main()
{
A<int> a;
std::cout<<a.x<<" "<<A<int>::x<<std::endl;
}
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
* Alternative URL: http://run.to/noicys
|
|
From: Bob W. <bo...@ph...> - 2002-04-08 00:54:36
|
MessageMy apologies to all! I thought I had proofread my last posting in depth, but when my copy was = delivered to me, and I read it again, I was appalled by the errors in = grammar. I'll try to do better the next time.=20 Regards, Bob |
|
From: Bob W. <bo...@ph...> - 2002-04-08 00:41:46
|
MessageIoannis,
Thanks for the response.=20
You did the right thing. C++ is great.
I am not sure it is "great," but its use is certainly wide spread. IMHO, =
there are better languages and better programming environments, but, as =
you mention, C++ is the most widely used language, and if you want to =
work in the highly competitive IT community, it is necessary to know =
C++.=20
You probably write console programs.=20
Yes, at my current level of knowledge, about the only thing I can do is =
write console programs. Hopefully by the middle of this week that will =
change.=20
To run the console program either open a console in the directory your =
.cpp is placed and run the .exe from there or do:
#include <cstdlib>
and inside main() at the end:
std::system("pause");
I started out using system("PAUSE"), but since I wanted to learn how to =
design a function which would determine if any key had been hit, what =
that key was, and reset itself for later use, I started playing around =
with the conio_mingw function kbhit(). Unfortunately that function does =
not do what I want, and I haven't either figured out how to write the =
code to do what I want yet. There may well be a pre-exiting function in =
one of the copious C++ libraries which does what I want. In any case, I =
know I will eventually figure it out.=20
I prefer the console option myself.
You recommended that to someone else. I had not thought of that, so I =
tried it. Thanks for the recommendation, but it seems take more time to =
switch between windows than to just cut and paste the required code into =
your source code and select the option to compile. Also, the limitation =
of the length of file names in the Console window is counter to good =
self documentation of function of the source files and the resulting =
programs.=20
The goal of the book is i guess to teach you the standardised ANSI/ISO =
C++ 1998 language
which is a very good thing.=20
I agree that it is best to learn the standard language, but anything =
that detracts from the goal is counter productive. I am fairly certain =
that I am not the only person who has spent an excessive amount of time =
trying to solve a problem with the IDE or programming environment =
because of either the lack of documentation or the lack of a good =
tutorial. The key to writing tight, efficient code that does something =
worth doing is a depth of knowledge of the language, the target =
operating system, data structures, and the correct algorithm to solve =
the problem or accomplish the task.=20
The key to becoming productive in any given programming environment is =
practice. This is the monkey-see, monkey-do part of becoming proficient =
with a new language/environment. If employment of the programming =
environment is obscure or there are undocumented gotcha's in the IDE, it =
simply increases the time required to learn the language to any given =
level of proficiency.=20
Also you start and end C-style comments at every line. This is waste =
of calories. C-style comments have scope till the */ is found and // =
comments one line only. For example:
/* This is a C-style comment.=20
It can consist of many lines and you do not need to open and close =
every one at
every line
*/
// This comment has scope till the end of
// the line only.
I am aware of that. I frame my comments only to make them standout =
visually. I spent too many hours either looking for almost hidden =
comments while trying to modify or fix bugs in old program that I or =
someone else had written. Repairing "broken" software taught me, like =
many others, how important it is to write code that is as self =
documenting as possible and to also sprinkle detailed comments =
throughout the code so that the next programmer that has to work on the =
software doesn't cuss the author as he tries to track the program logic. =
The extra key strokes are really a non-issue. My default source has a =
box at the top. All that is required is to do a simple cut and paste if =
I want to expand the comment. I do not have to recreate anything. All I =
do to write the comment is to set the keyboard to typeover rather than =
insert. The only real negative is that my style of comment bloats the =
size of the source. Considering that compilers discard comments and disk =
space is relatively cheap, that too is really a non-issue.
No, the aims are what they should be.
I agree that the aims are what they should be, i.e., to teach ANSI C++, =
but when the supplied programming environment detracts from or =
complicates the learning process, and those complications and =
distractions could be eliminated by a little bit of attention to the =
supplied programming environment, the book does not meet its goal in =
either an efficient or an elegant manner.=20
I am not sure if that book is enough easy for a newcomer though. If =
you feel someday that you can't go on with this i suggest "Accelerated =
C++" By Andrew Koenig - Barbara Moo.=20
No, I'll get through it and will learn the programming environment at =
the same time, but I could probably learn it 20% to 30% faster with more =
information about the supplied Bloodshed 4.01 programming environment.=20
I must mention however that i began C++ with "Teach Yourself C++ in 21 =
Days" myself too.=20
I went the less expensive route, Teach Yourself C++ in 24 Hours. It is =
not as complete, but it does have a good overview of the language.=20
Also keep in mind that with programming you must think a lot. :)=20
You can say that again. I don't mind the thinking, I enjoy it. I just =
don't like the unnecessary obfuscation provided by a lack of =
documentation.=20
You must like it very much etc, etc. Also keep in mind that C++ is the =
dominant general purpose programming language according to IDC for 2001 =
with 2.6-2.8 million developers worldwide. VB was second with about 1.5 =
and the rest follow. C++ as the best language has very advanced concepts =
but with this you can do everything (the entire Windows, Visual Studio, =
VB, Office, etc are written in C++). And all these to give you courage =
to keeep going on. :)
As I said, I am convinced that C++ is necessary to any success in the IT =
field. Perhaps even more important, I am enjoying process of learning =
the language. It is very versatile and very powerful. In its current =
iteration, it is perhaps the best language for OOP (Object Oriented =
Programming). Delphi or any of the late Borland Pascal compilers are =
also excellent for OOP, but it looks as if C++ will be both more =
versatile and more intuitive.=20
If you are taught ANSI/ISO C++ there should be no differences.
I agree that there should be no differences, and, while I have no =
personal experience with Microsoft's Visual C++, I have read that Visual =
C++ 4.0 matches the ANSI/ISO standard more closely that any of the =
follow-on products because of Mirosoft added extentions.=20
Both are valid. The second is used only when you want to pass command =
line parameters.=20
That should not be needed for learning C++.
That may be, but one worked and the other did not.=20
Better begin with no project. Only a new file and save it as .cpp. =
First learn the language. Then you will learn an IDE. So there is no =
surrender, only the proper order.
Now that I have learned how to use the project creation ability of the =
Bloodshed/GNU environment, it is not a problem.=20
I am sure you have gathered by my comments above that I disagree with =
your suggested order. You need to do both at the same time. Obviously =
most of the effort should be expended on learning the language, but =
efficient learning of the C++ is enhanced with some basic instruction on =
the programming environment. By saying that, I am not advocating that =
one's level of knowledge of the programming environment should be even =
close to one's knowledge and familiarity with the C++ language when you =
finish the book.=20
Regards,
Bob
|
|
From: Luigi S. <gi...@li...> - 2002-04-08 00:16:51
|
Hello Patrick, I have Borland BC++ 5.5 compiler and found that some documentation is shipped together with the compiler, the file should be named: bcb5tool.hlp and is a Windows help file. As for Dev-C++, I don't know where you can get documentation about how it calls the compiler and the "make" program. However, I have tried, myself, to do something similar to what you are planning, that is I have a way to use the DEV-C++ IDE 4.9.1.0 together with BC++ 5.5; in case you are interested I have uploaded what I came up with, on the page: http://digilander.iol.it/gisan2/docs/dev_bor.html At 11:11 01/04/02 +0200, Patrick Detollenaere wrote: >Hi, >Where can I find documentation about adapting bcc32 from >Borland to Devcpp? I'd like to use bcc32 with the new >beta version of the devcpp Ide. > >Detollenaere Patrick >Kerrestraat 6 >Oosteeklo >Belgium >bs2...@sk... > > >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users -- Luigi gi...@li... |
|
From: Jason H. <jas...@bt...> - 2002-04-08 00:02:58
|
I think I have encountered a similar problem to this before, although I can't remember what exactly
it was but the solution is along the lines of:
template<class DT> class A
{
static int x;
}
template<class DT> int A<DT>::x = 0;
I've not tested it but I hope it at least give you clue as to where to start.
There is some variation between compiler versions, as templates are a fairly new and complex
addition to C++.
Hope this helps, Jason.
----- Original Message -----
From: "Julian Calderon Almendros" <jul...@er...>
To: "Ioannis Vranos" <no...@ho...>; "Dev-C++" <dev...@li...>
Sent: Sunday, April 07, 2002 10:58 PM
Subject: RE: [Dev-C++] static members
The authentic problem is:
template<unsigned n> class A
{
static int x;
};
int A<n>::x=0;//??n??
>int main(void)
>{
> A a;
>
> return 0;
>}
>
>Ioannis
Thanks.
Julian.
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
* Alternative URL: http://run.to/noicys
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: <jul...@er...> - 2002-04-07 23:56:55
|
The code:
********************HeaderTemplateClasses.hpp
BEGIN**************************
template<unsigned n> class Class_A{
private:
template<unsigned m> struct Class_B{
unsigned A[m];
Class_B(void){for(unsigned I=0;I<m;I++) A[I]=I;}
};
static const Class_B<n> StDt;
public:
static unsigned GNum(unsigned index);
};
template<unsigned l>
unsigned Class_A<l>::GNum(unsigned i){
if(i < l)return StDt.A[i];
else return 0;}
template<unsigned p>
const Class_A<p>::Class_B<p> Class_A<p>::StDt;
********************HeaderTemplateClasses.hpp
END**************************
********************HeaderTemplateClasses.cpp
BEGIN**************************
#include "HeaderTemplateClasses.hpp"
********************HeaderTemplateClasses.cpp
END**************************
********************MAIN_FILE.cpp BEGIN**************************
#include <iostream>
#include <cstdlib>
#include "HeaderTemplateClasses.hpp"
using namespace std;
int main(void)
{
unsigned index=0;
do
{ cout << "Dame el indice que quieres conocer : ";
cin >> index;
cout << Class_A<3>::GNum(index) << " "
<< Class_A<5>::GNum(index) << " "
<< Class_A<7>::GNum(index) << endl;
}while(index!=11 && cin);
return 0;
}
********************MAIN_FILE.cpp END**************************
It is a copy&paste from the project for console in Dev-C++ 5 with MinGW
2.95.7 special.
Are there any sugestions to make better the code or are there any problem in
the code?.
Thanks.
Julián
|
|
From: <Swe...@ao...> - 2002-04-07 23:54:25
|
Does anyone know where I can find examples of an organizational chart that can List Full, Save filename, Help,Moveand Change records. Thanks=) |
|
From: Jason H. <jas...@bt...> - 2002-04-07 23:49:53
|
At the moment Athlons are faster and cheaper than their equivalents in the P4 range, which is good enough for me. Also, just a quick correction, the official line with the Athlon XP ????+ where the ???? is a number i.e. 2100, the number represents how fast the clock speed of an Athlon based on the older Athlon CPU core would have to run to get the same performance. Here's an article you may find interesting: http://news.zdnet.co.uk/story/0,,t269-s2107765,00.html Personally I think the Athlons represent a bettor ethos in engineering, and that Intel is trying to use big numbers i.e. clock speed and transistor count, to make the uneducated think it must be better. Jason. PS: BTW there's a pretty obvious mistake in the article where it says 1.733MHz which I assume should be 1.733GHz. My old spectrum processor (Z80) ran faster than 1.733MHz! :) ----- Original Message ----- From: "Napoleon Ahiable" <nah...@so...> To: <dev...@li...> Sent: Sunday, April 07, 2002 4:35 PM Subject: Re: [Dev-C++] AMD ATHLON v PENTIUM 4 Hi all, I am about to get myself a new PC. I have always used Intel based PC's and after all that I have heard about AMD ATHLON in terms of speed (ie faster than its INTEL competitor) I am tempted to give it a try. I however want know if this claim is true and if it has any drawbacks with respect to programming Cheers Napleon. _______________________________________________ Dev-cpp-users mailing list Dev...@li... https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: <jul...@er...> - 2002-04-07 21:58:09
|
The authentic problem is:
template<unsigned n> class A
{
static int x;
};
int A<n>::x=0;//??n??
>int main(void)
>{
> A a;
>
> return 0;
>}
>
>Ioannis
Thanks.
Julian.
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
* 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...@ho...> - 2002-04-07 21:36:55
|
class A
{
static int x;
};
int A::x=0;
int main(void)
{
A a;
return 0;
}
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.cjb.net
* Alternative URL: http://run.to/noicys
|