dev-cpp-users Mailing List for Dev-C++ (Page 619)
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: Ioannis V. <no...@ya...> - 2002-02-20 20:21:47
|
You will use system extensions. E.g. in case of Windows and Dev-C++ you can use win32 api. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.d2g.com * Alternative URL: http://run.to/noicys > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Ala...@cs... > Sent: Wednesday, February 20, 2002 3:14 PM > To: dev...@li... > Subject: [Dev-C++] Serial input(com port) > > > How do I get data from the serial port into my program? I > have looked at > every book I can find and no mention is made of receiving > serial input from a > com port. I want to hook up a Global Positioning System to my > the computer to > calculate course and speed. > Thanks > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
|
From: <Ala...@cs...> - 2002-02-20 13:14:40
|
How do I get data from the serial port into my program? I have looked at
every book I can find and no mention is made of receiving serial input from a
com port. I want to hook up a Global Positioning System to my the computer to
calculate course and speed.
Thanks
|
|
From: <gi...@li...> - 2002-02-20 08:58:59
|
Hello Mitchell, Tamra (HNA) I've added a possible solution, I suggest you use the pseudocode version and not the C version, I added it just for completeness. At 11:46 19/02/02 -0500, Mitchell, Tamra (HNA) wrote: >Trying to finish piglatin program and having a little problems. > >Any input or suggestions. > >Here is the code I have that works so far. > >I am trying to figure out how to reverse the works to be in piglatin > >ex: Hello there > >should reverse to elloHay erethay > >... >Tamra Y. Mitchell >Heinz North America >Database & Operating Systems Analyst >(412) 237-5232 Work >(412) 996-9078 Cell Phone -- gisan gi...@li... |
|
From: Yeoh H. <ye...@ya...> - 2002-02-20 02:04:35
|
Hi, You need to link with libshell32.a. Also, you might need to add this to your source code: #include = <shellapi.h> Regards, Yeoh ~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~ Author of "How to Create an eBook Using Visual C++" Free Downloads at http://www.yeohhs.com ICT eBooks by Yeoh HS ~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~ ----- Original Message -----=20 From: Fierytycoon=20 To: dev...@li...=20 Sent: Wednesday, February 20, 2002 8:44 AM Subject: [Dev-C++] How to link to shell functions? Hey, I #include <shlobj.h> in one my my projects. What further object = files/linker options do I need to place under Project Options in order = for my project to compile properly? Any input would be appreciated, = thanks. Fierytycoon |
|
From: Fierytycoon <fie...@ya...> - 2002-02-20 00:44:08
|
Hey, I #include <shlobj.h> in one my my projects. What further object files/linker options do I need to place under Project Options in order for my project to compile properly? Any input would be appreciated, thanks. Fierytycoon --------------------------------- Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games |
|
From: Kevin W. <ke...@me...> - 2002-02-19 22:05:32
|
Hi everyone,
It always pays to read the question carefully when you get an assignment
problem like this one.
Some key points are:
You can assume that there will only be up to 50 items in the inventory.
The question says to use a data structure for the items and define and
implement a set of operations to encapsulate it (sounds like a class? ).
Using a list (with a binary or linear search) is suggested - but it is
only a suggestion.
A lot of the work ( and therefore a lot of the marks) is concerned with
trapping errors and dealing with exceptions.
Personally, I would create an instance of a class for each item as it is
read from the dat file, and store a pointer to it in an array. For 50 items,
it doesn't seem worth the effort of using a binary tree. I like assignments
like these as there is plenty of scope to be creative!
Kev.
----- Original Message -----
From: Marton Rusk <mar...@ho...>
To: <dev...@li...>
Sent: Friday, February 15, 2002 10:23 PM
Subject: [Dev-C++] student needs a little help
> Hello Everyone,
>
> I'm currently a CS Student and need a little help. I have been given the
enclosed programming assignment but I'm not sure how to do it. It seems like
a simple problem to solve but I don't know how to do list let and from the
looks of the problem it will need one. I guess the teacher things we are
supposed to know how to do list already.
>
> Anyhow, I'd like a few pointers on how to do this problem if possible.
Maybe how to do the part of the code where it would require a list and
search.
>
> Any help is appreciated, thanks.
>
> Marton
>
>
> Program #2: Grocery Store Checkout (60 points)
>
>
>
> Your assignment is to write, run, and test a C++ program, pg2, to simulate
the operation of a
>
> grocery store checkout system. Your program should first build a data
structure to contain
>
> information on all the products available in the store. Then the program
should print the cash
>
> register receipt for each customer.
>
>
>
> INPUT
>
> The input for pg2 has two sources: the inventory information is input from
a text file,
>
> and the customer transactions are input from the keyboard.
>
>
>
> 1. The information about each product carried by the store is listed on a
single line in the
>
> inventory file "invent.dat", in the following format:
>
> <product number> <description> <price> <tax>
>
> where <product number> is a five-digit positive (nonzero) integer,
<description> is a string of
>
> at most 12 characters with no embedded blanks, <price> is a real
number, and <tax> is a
>
> character ('T' if the product is taxable; 'N' if it is not taxable).
The data in the inventory file is
>
> ordered from smallest to largest product number.
>
>
>
> 2. The customer transactions are input from the keyboard, in the following
format:
>
> <product number> <times>
>
> where <product number> is as described above, and <times> is an
integer in the range 1 to 100,
>
> indicating the quantity of this product desired. A zero input for
<product number> indicates the
>
> end of the customer's order. (The store will soon be using a scanner
to input the product number,
>
> but for now it is typed in by the cashier.)
>
>
>
> OUTPUT
>
>
>
> The program outputs should be written to a text file called
"receipts.out", which can be printed
>
> out for purposes of determining your grade.
>
>
>
> 1. The inventory information of invent.dat is echo printed to the output
file.
>
>
>
> 2. The cash register receipt for each customer is written to the output
file. The receipts should be
>
> nicely formatted, with the product description (not the product
number), number of items, item
>
> price, and total price for each product printed on a single line. At
the end of each customer's
>
> order, the subtotal for all items, amount of tax on taxable items, and
total bill should be printed,
>
> clearly labeled. (The tax rate is 7.5% for taxable items.)
>
>
>
> PROCESSING
>
>
>
> pg2 first reads in all of the inventory information from file invent.dat,
echo printing the
>
> information to the output file receipts.out. The program then prompts the
cashier to begin inputting
>
> the order for the first customer. This customer's order is processed, and
the receipt is printed to the
>
> output file.
>
> After each customer's order is processed, the program should ask the
cashier if another customer is
>
> to be processed. If the answer is 'Y', the program sets up to process the
next customer; if the answer
>
> is 'N', the program terminates with a friendly message.
>
>
>
> ERROR CHECKING
>
>
>
> The following input errors are possible and should be handled by pg2
>
>
>
> 1. Duplicate <product number> in inventory file. Write an error message to
the output file and skip
>
> the second entry.
>
> 2. <Product number> not in inventory file. Write an error message on the
receipt, ignore that product
>
> number, and continue with the next item.
>
> 3. <Times> not in the specified range. Write an error message to the
output file, ignore that line, and
>
> continue with the next item.
>
>
>
> EXAMPLE
>
>
>
> . From File "Invent.in":
>
> 11012 gallon-milk 1.99 N
>
> 11014 butter 2.59 N
>
> 11110 pie-shells 0.99 N
>
> 20115 laundry-soap 3.60 T
>
> 30005 homestyle-br 0.99 N
>
> . From keyboard (one customer):
>
> 11110 2
>
> 40012 3
>
> 20115 1
>
> 0
>
>
>
> . To "Receipts.out" file:
>
> ---------------------------------------------------------
>
> SEP 10, 1998 6:00 pm (* date and time optional *)
>
> Customer 1
>
> pie-shells 2 @ 0.99 1.98
>
> *** item 40012 not in inventory ***
>
> laundry-soap 1 @ 3.60 3.60 TX
>
> Subtotal 5.58
>
> Tax 0.27
>
>
>
> Total 5.85
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> DATA STRUCTURE
>
>
>
> The inventory information can be stored in a list of product records.
Assume that the maximum
>
> number of products is 50, for purposes of writing this program. As the
data in the inventory file
>
> is ordered from smallest to largest product number, it is very simple to
insert the product records
>
> into this data structure in order. You can use either a sequential or
binary search to locate a product
>
> number in the inventory.
>
> You should specify this data structure as an ADT, as described in the
chapter; define and implement
>
> a set of operations to encapsulate it.
>
>
>
>
>
> TEST PLAN
>
>
>
> Be sure to include test cases to test your error conditions in your test
plan.
>
>
>
> DELIVERABLES
>
>
>
> 1. A disk of the source code of the program pg2 and all included files.
>
> 2. Hard copy of a listing of your implemented test plan.
>
> 3. Hard copy of the output file, "receipts.out", produced by running your
program using the input
>
> specified in your test plan.
>
>
>
>
>
> --------------------------------------------------------------------------
------
> Send and receive Hotmail on your mobile device: Click Here
> _______________________________________________ Dev-cpp-users mailing list
Dev...@li...
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: Ioannis V. <no...@ya...> - 2002-02-19 20:23:05
|
<http://run.to/noicys> -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Devin Carless Sent: Tuesday, February 19, 2002 4:37 PM To: dev...@li... Subject: Re: [Dev-C++] 'New Source File' bug int array[]={1,2,3,4,5,6,7,8,9,10}; // one past the end vector<int>v3(&array[0], &array[10]); // Creates v3 having the values of array Ooo. I didn't know you could do that. The -only- source I have for initializing vectors in objects (ANSI-C++ won't let you specify a size if the vector is in an object) Huh? :) ANSI C++ lets you specify the size of a vector in any circumstance. uses a hack. The object's vector is declared without a size. In the constructor, a temp vector is declared /with/ a size, and the object's vector is equated to it. This has large time cost. Also for large vectors it has large space cost too. When the constructor ends, the temp vector goes out of scope. Problem solved, at the minor (hah) cost of some clarity. Large time/space cost for large vectors. We must try to avoid changing the size of the vector as also creating temporary ones. You can initialize them as i said, why to do these dirty tricks anymore? :) Ioannis * Ioannis Vranos * Programming pages: <http://www.noicys.d2g.com/> http://www.noicys.d2g.com * Alternative URL: <http://run.to/noicys> http://run.to/noicys |
|
From: Ioannis V. <no...@ya...> - 2002-02-19 20:19:55
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Devin Carless > Sent: Tuesday, February 19, 2002 4:19 PM > To: dev...@li... > Subject: [Dev-C++] Computers, chaos, and the supernatural > > > My response was, "Cool. I broke its brain." :)) > That hypothesis has the virtue of not having to resort to > the supernatural. I generally don't have much trouble with > anything else, though, and I've worked on other machines with > individual quirks. If this is a virus it's a very subtle > (and specific) one. > It's possible some of my problems are caused by a) a large > project and > b) very little RAM (24 M.) With all the read/writes to the > disk, something's bound to go awry. Many of the symptoms > also (see below) seem to indicate a memory leak. > > > I had Dev-C++ crash a compile on me yesterday (I can't > remember the exact title, but it referred to DEVCPP.EXE.) I Yes it crashes some rare times after many recompilations. > tried again and it went perfectly well. I also had an > untraceable ambiguous reference; I changed the name of the > function and things were fine. (The compiler said the > function, scaffold(void) was first defined in stl_vector.h, > but a search found no trace of such an animal. The debugger Perhaps that function was used inside the implementation file which is probably precompiled. > kept taking me to a line in bstring, which also seemed to > lack any function called scaffold().) > > Devin's Computational Chaos Theory : > I don't believe that computers are the entirely > deterministic systems they seem to be. Like the Newtonian > universe, there are hard-and-fast laws explaining behaviour. > But in any complex system chaos sets in. Maybe someone > misset a system parameter when the system was set up two > years ago. Maybe a sector on the disk is wonky, and that's > where the machine puts its cache. All of these things build > over time, and though each and every one they has a -reason-, > they are still -inexplicable-. You could go into the machine > and break things down and explain everything, but that's not > practical. So these bugs remain inexplicable and, for all > purposes, randomly caused. > 1) All systems increase in buggyness with respect to time > and their complexity. > 2) All of these bugs have natural causes. > 3) Many of these bugs will require an inordinate amount of > effort and skill to trace. > 4) Therefore, these are (practically) supernaturally caused. Now you have come across me there is no way that your machine will keep doing such things and escape untouched (what a statement!). I *strongly* suuspect you have memory problems. I am sending you attached (and to all in the list) memtest-86 which i consider as the best memory testing program. It is freeware. Run it and tell me the results (let it run all the default tests). > > Doesn't the following code execute properly at your system? > > Dunno. I have noticed that if certain things start going > wrong, e.g., the error messages from the compiler come out > garbled, that's a sign things might get worse. When the only > error message is garbled, that's the time to reboot the > machine. The gradual onset, with the problem solved by > rebooting, makes me suspect a memory management problem. After performing the memory test and find memory problems, uninstall & reinstalll Dev-C++ together with the latest version of MINGW (http://www.mingw.org). Keep me informed of the results. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.d2g.com * Alternative URL: http://run.to/noicys |
|
From: Devin C. <dcc...@ya...> - 2002-02-19 14:33:53
|
Message
I can now provide you with more info on this. Consider the code:
=20
Thank you - it's most helpful. I think it is time for me to rebuild =
the=20
initialization routines of my major objects.
int array[]=3D{1,2,3,4,5,6,7,8,9,10};
=20
// one past the end
vector<int>v3(&array[0], &array[10]); // Creates v3 having the values =
of array
Ooo. I didn't know you could do that. The -only- source I have for =
initializing vectors=20
in objects (ANSI-C++ won't let you specify a size if the vector is in =
an object) uses a=20
hack. The object's vector is declared without a size. In the =
constructor, a temp vector=20
is declared /with/ a size, and the object's vector is equated to it. =
When the constructor=20
ends, the temp vector goes out of scope. Problem solved, at the minor =
(hah) cost of=20
some clarity.
=20
|
|
From: Devin C. <dcc...@ya...> - 2002-02-19 14:17:19
|
> > Yes. But then again I've also had the compiler telling me > > there are undefined escape sequences in the middle of > > comments. (That one > > went away after a reboot.) > > Never had similar problems. Not even once. My response was, "Cool. I broke its brain." > > I've gotten the compiler to act in weird ways more than once. If > > others aren't having similar problems, then I suspect my system is > > possessed. (Dev-C++ won't work on my other machine, a Win95 > > 486; everything it compiles crashes.) > > ! Never had any slight problem. It may be a virus. That hypothesis has the virtue of not having to resort to the supernatural. I generally don't have much trouble with anything else, though, and I've worked on other machines with individual quirks. If this is a virus it's a very subtle (and specific) one. It's possible some of my problems are caused by a) a large project and b) very little RAM (24 M.) With all the read/writes to the disk, something's bound to go awry. Many of the symptoms also (see below) seem to indicate a memory leak. > Either you do programming mistakes, either you have hardware > or virus problem. I had Dev-C++ crash a compile on me yesterday (I can't remember the exact title, but it referred to DEVCPP.EXE.) I tried again and it went perfectly well. I also had an untraceable ambiguous reference; I changed the name of the function and things were fine. (The compiler said the function, scaffold(void) was first defined in stl_vector.h, but a search found no trace of such an animal. The debugger kept taking me to a line in bstring, which also seemed to lack any function called scaffold().) Devin's Computational Chaos Theory : I don't believe that computers are the entirely deterministic systems they seem to be. Like the Newtonian universe, there are hard-and-fast laws explaining behaviour. But in any complex system chaos sets in. Maybe someone misset a system parameter when the system was set up two years ago. Maybe a sector on the disk is wonky, and that's where the machine puts its cache. All of these things build over time, and though each and every one they has a -reason-, they are still -inexplicable-. You could go into the machine and break things down and explain everything, but that's not practical. So these bugs remain inexplicable and, for all purposes, randomly caused. 1) All systems increase in buggyness with respect to time and their complexity. 2) All of these bugs have natural causes. 3) Many of these bugs will require an inordinate amount of effort and skill to trace. 4) Therefore, these are (practically) supernaturally caused. > Doesn't the following code execute properly at your system? Dunno. I have noticed that if certain things start going wrong, e.g., the error messages from the compiler come out garbled, that's a sign things might get worse. When the only error message is garbled, that's the time to reboot the machine. The gradual onset, with the problem solved by rebooting, makes me suspect a memory management problem. --Devin _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
|
From: Benjamin W. <ben...@ho...> - 2002-02-19 13:45:41
|
<html><div style='background-color:'><DIV>
<P>Bob... I just had to chime in here... I love the "kids in a mall" analogy!<BR></P></DIV>
<DIV></DIV>
<DIV><FONT face="Geneva, Arial, Sans-serif" size=2>Benjamin Wheeless</FONT></DIV>
<DIV></DIV>
<DIV><FONT face="Geneva, Arial, Sans-serif" size=2><STRONG>Network Systems - Delta Airlines, Inc.</STRONG></FONT></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2><STRONG>Atlanta, GA - USA 30320</STRONG></FONT></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2><STRONG>==============================</STRONG></FONT></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>----Original Message Follows----
<DIV></DIV>From: "Bob Campbell" <RC...@PS...>
<DIV></DIV>To: "Dev-cpp" <DEV...@LI...>
<DIV></DIV>Subject: Fw: [Dev-C++] A Couple of Questions
<DIV></DIV>Date: Sun, 17 Feb 2002 17:09:57 -0500
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>----- Original Message -----
<DIV></DIV>From: "Bob Campbell" <RC...@PS...>
<DIV></DIV>To: "Rashan Jibowu" <RE...@HO...>
<DIV></DIV>Sent: Sunday, February 17, 2002 5:08 PM
<DIV></DIV>Subject: Re: [Dev-C++] A Couple of Questions
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>> Hi,
<DIV></DIV>>
<DIV></DIV>> > 1. How do I clear the screen (MS-DOS) before each time I run, or re-run
<DIV></DIV>a
<DIV></DIV>> > program?
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>> One way to clear the screen is to use system("cls");
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>> > 2. How do I use libraries in a C++ program?
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>> Each library has its own way of doing things. You can download and try
<DIV></DIV>> different libraries... some include tutorials.
<DIV></DIV>> You can also read up on things like the <IOSTREAM>library to see how it
<DIV></DIV>is
<DIV></DIV>> used and how you #include it in your programs.
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>> > 3. Why would a programmer want several separate source files to be
<DIV></DIV>> compiled
<DIV></DIV>> > into one program? Why not just keep all of the source code in one file?
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>> Just look at the complexity of some applications and think what it would
<DIV></DIV>be
<DIV></DIV>> like if the source was not broken up, organized, and used only when
<DIV></DIV>needed.
<DIV></DIV>> Imagine being stuck in a mall where there no walls separating the stores
<DIV></DIV>or
<DIV></DIV>> walls to separate departments within individual stores... utter chaos. And
<DIV></DIV>> if you are a parent, hell on earth...
<DIV></DIV>>
<DIV></DIV>> Bob
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>_______________________________________________
<DIV></DIV>Dev-cpp-users mailing list
<DIV></DIV>Dev...@li...
<DIV></DIV>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
<DIV></DIV></div><br clear=all><hr>Join the worlds largest e-mail service with MSN Hotmail. <a href='http://go.msn.com/bql/hmtag4_etl_EN.asp'>Click Here</a><br></html>
|
|
From: Benjamin W. <ben...@ho...> - 2002-02-19 13:43:26
|
<html><div style='background-color:'><DIV> <P>Good morning,</P></DIV> <P>It looks like this has already been answered so I'll make it short, my apologies..but I've been on vacation this past weekend and didn't get a chance to check mail.</P> <P>Anyway, there are "vectors" as they are known in mathematics and graphical programming techniques and then there are "vectors" as they are known in C++, which are just STL containers used, as Ioannis has already mentioned, to help handle situations where arrays break down and aren't quite efficient enough. They are a very good and useful tool.</P> <DIV><FONT face="Geneva, Arial, Sans-serif" size=2>Benjamin Wheeless</FONT></DIV> <DIV></DIV> <DIV><FONT face="Geneva, Arial, Sans-serif" size=2><STRONG>Network Systems - Delta Airlines, Inc.</STRONG></FONT></DIV> <DIV></DIV> <DIV><FONT face=Arial size=2><STRONG>Atlanta, GA - USA 30320</STRONG></FONT></DIV> <DIV></DIV> <DIV><FONT face=Arial size=2><STRONG>==============================</STRONG></FONT></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV>----Original Message Follows---- <DIV></DIV>From: "Daniel Glenfield" <SP...@HO...> <DIV></DIV>To: dev...@li... <DIV></DIV>Subject: Re: [Dev-C++] vectors <DIV></DIV>Date: Sun, 17 Feb 2002 16:49:45 +0000 <DIV></DIV> <DIV></DIV></div><br clear=all><hr>Get your FREE download of MSN Explorer at <a href='http://go.msn.com/bql/hmtag_etl_EN.asp'>http://explorer.msn.com</a>.<br></html> |
|
From: Ioannis V. <no...@ya...> - 2002-02-19 12:07:53
|
> -----Original Message-----
> From: dev...@li...
> [ <mailto:dev...@li...>
mailto:dev...@li...] On Behalf
> Of Devin Carless
> Sent: Saturday, February 16, 2002 6:20 PM
> To: dev...@li...
> Subject: Re: [Dev-C++] 'New Source File' bug
>
> >
> > What trouble.
>
> Initializing an array/vector of objects, of which some of the
> members are consts. That was my first problem.
>[...]
> Initializing a vector to anything
> interesting including constants without using push_back() is
> difficult; I ultimately solved the problem by ripping out almost
> every const in my project (not without some satisfaction)
> and using a Set() function. (I implemented a rudimentary
> sort of data protection by only allowing anything to be
> changed if the Name member was set to the constant
> NULLSTR.)
> I've also had problems initializing vectors from arrays.
> Vectors can be initialized in a wonderful panoply of ways,
> all of which are thoroughly useless for my purposes. It's
> recently occurred to me that this is probably a job for an
> overloaded assignment operator. I'm not certain how to
> do this for a vector (while vectors are finicky, templates are
> just plain sticky, and I haven't read much about them
> because I don't expect to need them for a while.)
I can now provide you with more info on this. Consider the code:
#include <vector>
int main()
{
using std::vector;
vector<int>v1(100); // array of 100 ints. Built in types are
initialised to 0
vector<int>v2(100, 1); // array of 100 ints with value 1
v1.assign(10, 20); // Erase the previous elements and place ten 20s.
int array[]={1,2,3,4,5,6,7,8,9,10};
// one past the end
vector<int>v3(&array[0], &array[10]); // Creates v3 having the values
of array
v2=v3;
v1.assign(&array[0], &array[2]); // Make v1 contain 1,2 . v1.size()==2
now
vector<int>v4(v1); // Create an exact copy of v1
}
Ioannis
* Ioannis Vranos
* Programming pages: <http://www.noicys.d2g.com/>
http://www.noicys.d2g.com
* Alternative URL: <http://run.to/noicys> http://run.to/noicys
|
|
From: <gi...@li...> - 2002-02-19 01:09:43
|
At 15:51 18/02/02 -0500, mi...@ju... wrote: >Hi everyone, i started using C++ a year ago and I'm having trouble with a >seemingly simple program. In our class we need to get a text file. We >then have to get its contents and convert all the letters to lowercase. >Could anyone perhaps give me a basic outline of how to set up the way to >get a files contents and then change them? If you are allowed to choose, I suggest redirection, instead of fstream. I've added a very simple program, just in case you need an hint Hope it helps. -- gisan gi...@li... |
|
From: <gi...@li...> - 2002-02-19 01:09:40
|
At 01:09 18/02/02 +0000, chromatonus 712 wrote: >... > >P.S. any suggestions on how to "balance" the tree? (trying to display all >the same elements, but arrange them in such a way as to minimize the # of >levels in the tree) Thank you! Give a look at this article: http://codeguru.earthweb.com/algorithms/BinTree.html -- gisan gi...@li... |
|
From: <mi...@ju...> - 2002-02-18 21:00:28
|
Hi everyone, i started using C++ a year ago and I'm having trouble with a seemingly simple program. In our class we need to get a text file. We then have to get its contents and convert all the letters to lowercase. Could anyone perhaps give me a basic outline of how to set up the way to get a files contents and then change them? ________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/web/. |
|
From: Benjamin L. <bl...@ta...> - 2002-02-18 15:36:27
|
Try loading the sound as a resource at compile time.
-BL
On 17 Feb 2002 at 23:21, Stein Nyg=E5rd wrote:
> Hi fellow-coders!
>
> I'm using
> PlaySound("mysound.wav", NULL, SND_FILENAME | SND_ASYNC);
> to play a rather large audiofile. The problem is that when I run my
> application straight after a reboot, the soundplaying is delayed. If the=
n
> run my app again, the sound plays nice 'n tight. I assume this i bacause=
the
> sound has to be loaded, and a program usually loads faster the second ti=
me
> you run it.
> Is there a way, that I can escape from this sad effect?
>
> Thanks!
>
> - stein
>
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: Ioannis V. <no...@ya...> - 2002-02-18 15:08:26
|
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf
> Of Devin Carless
> Sent: Monday, February 18, 2002 4:31 PM
> To: dev...@li...
> Subject: Re: [Dev-C++] 'New Source File' bug
>
>
> > This is broken compiler. Did it happen with MINGW32?
>
> Yes. But then again I've also had the compiler telling me
> there are undefined escape sequences in the middle of
> comments. (That one
> went away after a reboot.)
Never had similar problems. Not even once.
>
> I've gotten the compiler to act in weird ways more than once. If
> others aren't having similar problems, then I suspect my system is
> possessed. (Dev-C++ won't work on my other machine, a Win95
> 486; everything it compiles crashes.)
! Never had any slight problem. It may be a virus.
>
> > I am working using standard containers all the time and never
> > encountered any problem (except that MING doesn't support
> vector::at()
> > ).
>
> For me, every day is a fight against whatever new and
> interesting perversity the language, compiler or IDE will
> throw at me. :) Most of the time it's just my inadequate
> command of the language; I'm learning C++
> using a technique known colloquially as 'the Hard Way.'
Either you do programming mistakes, either you have hardware or virus
problem.
Doesn't the following code execute properly at your system?
#include <iostream>
#include <vector>
int main()
{
using namespace std;
vector<int>v(5000);
for(vector<int>::size_type i=0; i<v.size(); i++)
v[i]=i;
for(vector<int>::size_type i=0; i<v.size(); i++)
v[i]=i*2+i;
vector<int>::const_iterator p=v.begin();
while(p!=v.end())
cout<<*p++<<"\n";
}
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.d2g.com
* Alternative URL: http://run.to/noicys
|
|
From: <mj...@ar...> - 2002-02-18 14:39:52
|
searching for =22how to disable alt+ctrl+del=22 at http=3A//www=2Egoogle=2E=
com=3A
http=3A//www=2Egoogle=2Ecom/search=3Fhl=3Des=26q=3Dhow+to+disable+alt=252=
Bctrl=252Bdel=26lr=3D
the first link is=3A
http=3A//support=2Emicrosoft=2Ecom/default=2Easpx=3Fscid=3Dkb=3BEN-US=3Bq=
226359 (HOWTO=3A =
Disable Task Switching on Win32 Platforms (Q226359))
---
Miguel J=2E Trujillo Alvarado - Las Palmas de Gran Canaria
El mundo est=E1 escaso de genios Einstein muri=F3=2C
Mozart tambien y a mi me duele la cabeza
----- Mensaje Original -----
Remitente=3A =22thomas tehtra=22 =3Ctehtra=40hotmail=2Ecom=3E
Fecha=3A Lunes=2C Febrero 18=2C 2002 12=3A14 pm
Asunto=3A =5BDev-C++=5D ctrl+alt+delete
=3E how to disable the ctrl alt delete function=2E
|
|
From: Devin C. <dcc...@ya...> - 2002-02-18 14:27:28
|
> This is broken compiler. Did it happen with MINGW32?
Yes. But then again I've also had the compiler telling me there are
undefined escape sequences in the middle of comments. (That one
went away after a reboot.)
> Although i did not see any code, value wrapping may had occured.
>
> E.g.
>
> for(int i=0; i<Vec.size(); i++)
> { ...}
Not likely; the largest vector I'm dealing with should have sixty-four
elements. (This one had eight.)
> > something funny going on. (push_back() refusing to work was
> > one of them.)
>
> This is broken implementation issue.
I've gotten the compiler to act in weird ways more than once. If
others aren't having similar problems, then I suspect my system is
possessed. (Dev-C++ won't work on my other machine, a Win95
486; everything it compiles crashes.)
> I am working using standard containers all the time and never
> encountered any problem (except that MING doesn't support vector::at()
> ).
For me, every day is a fight against whatever new and interesting
perversity the language, compiler or IDE will throw at me. :) Most of the
time it's just my inadequate command of the language; I'm learning C++
using a technique known colloquially as 'the Hard Way.'
--Devin Carless
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
|
|
From: thomas t. <te...@ho...> - 2002-02-18 12:14:43
|
how to disable the ctrl alt delete function. _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com |
|
From: Ioannis V. <no...@ya...> - 2002-02-18 07:51:13
|
I found alike where: pic( root, make_array(root), s ); but make_array returns an int, not int *. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.d2g.com * Alternative URL: http://run.to/noicys > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of chromatonus 712 > Sent: Monday, February 18, 2002 3:09 AM > To: dev...@li... > Subject: [Dev-C++] display tree (another one) > > > hi, thank you for your previous help, but i have another > problem... I keep receiving this error and i don't know what > it means: passing `int' to argument 2 of `pic(node *, int *, > int)' lacks a cast |
|
From: Yeoh H. <ye...@ya...> - 2002-02-18 07:41:26
|
Hi Razmattaz, 1. Clear the Screen From the FAQ: use clrscr() to clear the screen. FAQ No. 12. I am having problems using Borland specific functions such as clrscr() Include conio.h to your source, and add C:\Dev-C++\Lib\conio.o to "Further Object Files" in Project Options (where C:\Dev-C++ is where you installed Dev-C++). 2. Use Libraries in a C++ Program a. Study the documentation that comes with the libraries. If there are examples or demos, study them to see how to use the class libraries. b. In your own cpp file, write the code that creates the libraries objects (or as derived class ) and call the member functions or override parent class's member functions. c. Include the relevant library's header file in this cpp file. Then in Project Options, click Load object files and select lib files to add to your project. 3. Why Separate source files. a. minimize compile and linking time. The latest project I'm working on consists of over 25,000 lines of code in 20 separate files.If all these were in one file, for every change I make, the project has to be recompiled and re-linked which will take a lot of time. In the case of multiple files, if I make changes that affects only 1 file, only that file need to be compiled and linked with the rest of the object code. b. organize your codes, especially C++ classes. I usually use 1 cpp file and 1 header file for each class. Code maintenance is an important issue so organizing your source codes is very important. c. for me, smaller text files are easier to edit. However, you need to use a text editor that can open multiple files. Tip: If you use multiple files, you might want to use grep.exe. This program allows you to search multiple files for key words. Regards, Yeoh ~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~ Author of "How to Create an eBook Using Visual C++" Free Downloads at http://www.yeohhs.com ICT eBooks by Yeoh HS ~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~ ----- Original Message ----- From: Rashan Jibowu <re...@ho...> To: <dev...@li...> Sent: Monday, February 18, 2002 5:03 AM Subject: [Dev-C++] A Couple of Questions > Hey Fellow Dev C++ Users: > > I have a couple of questions. Perhaps you can help me with them. > > 1. How do I clear the screen (MS-DOS) before each time I run, or re-run a > program? > > 2. How do I use libraries in a C++ program? > > 3. Why would a programmer want several separate source files to be compiled > into one program? Why not just keep all of the source code in one file? > > I look forward to your help, > ~ Razmattaz |
|
From: Ioannis V. <no...@ya...> - 2002-02-18 07:41:08
|
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf
> Of Rashan Jibowu
> Sent: Sunday, February 17, 2002 11:04 PM
> To: dev...@li...
> Subject: [Dev-C++] A Couple of Questions
>
>
> Hey Fellow Dev C++ Users:
>
> I have a couple of questions. Perhaps you can help me with them.
>
> 1. How do I clear the screen (MS-DOS) before each time I run,
> or re-run a
> program?
I assume C++.
#include <cstdlib>
...
using namespace std; or using std::system;
system("cls");
>
> 2. How do I use libraries in a C++ program?
You #include the appropriate header files and then you use the
functions/data structures you want.
>
> 3. Why would a programmer want several separate source files
> to be compiled
> into one program? Why not just keep all of the source code in
> one file?
Imagine a program of 100.000 lines of code. At every simple change you
would have to recompile all the code while keeping things in separate
files you would recompile only the file you changed. Except of that
keeping things separated in files according to what they do, makes it
easier to locate them.
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.d2g.com
* Alternative URL: http://run.to/noicys
|
|
From: Ioannis V. <no...@ya...> - 2002-02-18 07:36:20
|
Yes. Ioannis * Ioannis Vranos * Programming pages: <http://www.noicys.d2g.com/> http://www.noicys.d2g.com * Alternative URL: <http://run.to/noicys> http://run.to/noicys -----Original Message----- From: Daniel Glenfield [mailto:sp...@ho...] Sent: Sunday, February 17, 2002 8:30 PM To: no...@ya... Subject: RE: [Dev-C++] vectors Oh is it now? Thank you very much, I never learnt that on my course. ANSI C++ standard as well I assume? |