dev-cpp-users Mailing List for Dev-C++ (Page 166)
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: Malcolm N. <m.n...@wa...> - 2004-11-24 12:44:27
|
> Aloha from Honolulu, > I'm using wxDevC++ which has Dev-C++ 4.9.9.0 and wxWidgets beta 6.3 > combined. When I first start there appears a window down the right side > of the wxDevC++ main screen. This has the word "All" in a white box > with a grayed out arrow (it looks like a selection box). Then below are > various Icons and Lables: An Arrow Icon with "Selector", a Box Icon > (white square with arrow heads pointing out on each of the 4 sides) with > "BoxSizer", The same Box Icon with "StaticBoxSizer",... A capital A Icon > with "StaticText",etc. These look like various widgets that can be > inserted into a program. But as soon as I open anything; a new file or > project, an existing file or project, anything that opens in the main > window, this "Widgets Window" disappears and there seems no way to get > it back. I've displayed every toolbar and menu I can find in every tool > option listed, but nothing relates to it. I can't find it mentioned in > the help files for DevC++ or wxWidgets. Does anybody know what it is? > How do I get it back once I start writing code? It has interesting > things I want to experiment with, but it only exists on the initial > screen. I have to exit and restart the program to get it back and as > soon as I open anything it's gone. A very frustrating Arrrgh! Anyone > out there have a clue? > Mahalo (Thank You), > Roger Furer Sorry if this seems too simple for you, but there may be others on the list who require this level of explanation. The best way to work with wxDevC++ (as far as I am concerned) is to start a new project. File - New - Project... Then (assuming you are using Beta 6.4 (the current release) wxWidgets Frame, or wxWidgets Dialog. Create a directory for the project, and save into that directory. Now just hit F9 (by hit I of course mean gently press, we don't want you to break your keyboard). The simple frame project should compile correctly, and you should be presented with a basic frame based window. Close this. Now, on the properties bar on the left of the screen, press the Project tab, then expand the project presented. Within this file list is one named "newProgramFrame.wxform". Double click on this file (or select the newProgramFrame.wxform tab and you will see the basic form for the project. What do you want to do now? To add a menu - In the drop down list (the one with All in it), select Menu. Click on MenuBar, then click on the form. An icon appears on the form. This icon represents the menu, unfortunately at the moment there is no real wysiwyg in wxDevC++. Now to create a menu, on the properties bar click on "EditMenuItems", then on the "..." button which appears. This should produce the dialog where you can create your menu. To Create a toolbar - In the drop down list select Toolbar. Click once on ToolBar, once on the form. Voila a toolbar. Now click on ToolButton, and then on the newly created ToolBar on the form. You have to repeat this for all the buttons or other controls you want on the ToolBar. If you want to add a Sizer (wxWidgets uses Sizers to arrange the space around controls (see http://neume.sourceforge.net/sizerdemo/ for a simple explanation) and their use is the same as for the previous controls. Single click on the control name and then a single click on the form (be aware though thatwxDevC++ dowsn't allow you to drop a sizer on a form which already has other Standard Components (such as the previously mentioned Menu and ToolBar). Basically the Form is where you design the look of the program. You can insert a new wxFrame or wxDialog and there should be a new filename.form file created where you design the new dialog. I hope that this sufficiently answers your question. Best Mal |
|
From: Zachary U. <ne...@gm...> - 2004-11-24 10:27:01
|
Ok ,I used one of the workarounds (named the file in C:\WINDOWS\TEMP to have .devpak extension then double-clicked file to install) and it *seems* to have worked however when I restart Dev-C++ and go to WebUpdate module the item I just installed again shows up in the list of non-installed! In this case it was "Dev-C++ Update debug info". Has a developer patch been issued for this yet? Regards, Zach |
|
From: Zachary U. <ne...@gm...> - 2004-11-24 09:46:35
|
On Wed, 24 Nov 2004 11:01:28 +1300, spiro harvey <spi...@gm...> > > please, when you reply to emails, especially those on a mailing list, > cut out all the irrelevant crap. just quote what's important. just > hitting reply and leaving everything quoted gets especially annoying > for those who subscribe to the digest version. ok. sorry spiro. > and if it helps you any, I just clicked on that link that you typed in > here and it worked fine for me. i can access it now. zach |
|
From: Roger F. <ra...@ha...> - 2004-11-24 09:41:59
|
Aloha from Honolulu, I'm using wxDevC++ which has Dev-C++ 4.9.9.0 and wxWidgets beta 6.3 combined. When I first start there appears a window down the right side of the wxDevC++ main screen. This has the word "All" in a white box with a grayed out arrow (it looks like a selection box). Then below are various Icons and Lables: An Arrow Icon with "Selector", a Box Icon (white square with arrow heads pointing out on each of the 4 sides) with "BoxSizer", The same Box Icon with "StaticBoxSizer",... A capital A Icon with "StaticText",etc. These look like various widgets that can be inserted into a program. But as soon as I open anything; a new file or project, an existing file or project, anything that opens in the main window, this "Widgets Window" disappears and there seems no way to get it back. I've displayed every toolbar and menu I can find in every tool option listed, but nothing relates to it. I can't find it mentioned in the help files for DevC++ or wxWidgets. Does anybody know what it is? How do I get it back once I start writing code? It has interesting things I want to experiment with, but it only exists on the initial screen. I have to exit and restart the program to get it back and as soon as I open anything it's gone. A very frustrating Arrrgh! Anyone out there have a clue? Mahalo (Thank You), Roger Furer |
|
From: spiro h. <spi...@gm...> - 2004-11-23 22:01:37
|
> i think maybe sourceforge is down now because when i try access the > websites I get "Server not found error" > even i tried: http://sourceforge.net/projects/dev-cpp/ and > http://dev-cpp.sourceforge.net > i hope the sites come back online soon! please, when you reply to emails, especially those on a mailing list, cut out all the irrelevant crap. just quote what's important. just hitting reply and leaving everything quoted gets especially annoying for those who subscribe to the digest version. and if it helps you any, I just clicked on that link that you typed in here and it worked fine for me. -- "Here's a bucket, go and kick it." -- Kill Yourself (Stormtroopers of Death) my life: http://spiroharvey.blogspot.com |
|
From: Zachary U. <ne...@gm...> - 2004-11-23 21:40:08
|
hi guys! i think maybe sourceforge is down now because when i try access the websites I get "Server not found error" even i tried: http://sourceforge.net/projects/dev-cpp/ and http://dev-cpp.sourceforge.net i hope the sites come back online soon! Zach On Tue, 23 Nov 2004 09:17:37 -0800 (PST), Adrie Stolk <adr...@ya...> wrote: > I don't think Zach need to file another bug-report for it, > bug-reports with some similarity: > http://sourceforge.net/tracker/index.php?func=detail&aid=1065474&group_id=10639&atid=110639 > > http://sourceforge.net/tracker/index.php?func=detail&aid=1030994&group_id=10639&atid=110639 > > http://sourceforge.net/tracker/index.php?func=detail&aid=1006424&group_id=10639&atid=110639 > > First one is from Zach, second one contains a workaround these two are > still open; but the last one (and the oldest) is closed so the problem > seems to be solved already. > Zach, you might want to check that bug-report out. > Perhaps if the issue is solved the other bug-reports could be closed > too. > > Adrie > > > > --- Per Westermark <pw...@ia...> wrote: > > > Yes, the developers are reading this. > > > > However, go to > > http://sourceforge.net/projects/dev-cpp/ > > scroll down a bit and select 'Bugs'. > > > > This is the official bug tracking system for Dev-C++. > > > > /Per W > > > > On Mon, 22 Nov 2004, Zachary Uram wrote: > > > > > do the developers even read this list? > > > i posted a major bug (cannot install updates) in latest version > > Dev-C++ > > > a while ago and no has responded yet on the list. > > > does anyone have the developers email addresses? > > > > > > zach > > > > > > > > ------------------------------------------------------- > > SF email is sponsored by - The IT Product Guide > > Read honest & candid reviews on hundreds of IT Products from real > > users. > > Discover which products truly live up to the hype. Start reading now. > > > > http://productguide.itmanagersjournal.com/ > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > __________________________________ > Do you Yahoo!? > Meet the all-new My Yahoo! - Try it today! > http://my.yahoo.com > > |
|
From: Terry O. <te...@st...> - 2004-11-23 20:21:12
|
I am running dev-cpp 4.9.9.0 and the mysql devpak 4.0.16. The OS is XP pro. I have tried the mysqlclienttest with both 4.0.22 mysql and 4.1. I have a user, database and table set up that I can access from the command line mysql client without any problem. With mysql 4.0.22 running mysqlclienttest I get an error =91unable to connect to = server=92. With mysql 4.1 I get an error =91unable to select database=92. I am = anxious to get going with dev-cpp and mysql and I=92m getting nowhere. Any help is appreciated.=20 |
|
From: Adrie S. <adr...@ya...> - 2004-11-23 17:17:47
|
I don't think Zach need to file another bug-report for it, bug-reports with some similarity: http://sourceforge.net/tracker/index.php?func=detail&aid=1065474&group_id=10639&atid=110639 http://sourceforge.net/tracker/index.php?func=detail&aid=1030994&group_id=10639&atid=110639 http://sourceforge.net/tracker/index.php?func=detail&aid=1006424&group_id=10639&atid=110639 First one is from Zach, second one contains a workaround these two are still open; but the last one (and the oldest) is closed so the problem seems to be solved already. Zach, you might want to check that bug-report out. Perhaps if the issue is solved the other bug-reports could be closed too. Adrie --- Per Westermark <pw...@ia...> wrote: > Yes, the developers are reading this. > > However, go to > http://sourceforge.net/projects/dev-cpp/ > scroll down a bit and select 'Bugs'. > > This is the official bug tracking system for Dev-C++. > > /Per W > > On Mon, 22 Nov 2004, Zachary Uram wrote: > > > do the developers even read this list? > > i posted a major bug (cannot install updates) in latest version > Dev-C++ > > a while ago and no has responded yet on the list. > > does anyone have the developers email addresses? > > > > zach > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real > users. > Discover which products truly live up to the hype. Start reading now. > > http://productguide.itmanagersjournal.com/ > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > __________________________________ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com |
|
From: Michal M. <mi...@mo...> - 2004-11-23 15:22:50
|
Justin Fan wrote:
> During installing updates, the Package Manager showed me that some
> package can't be installed because some dependent package should be
> installed first and they are not installed yes. But after I ignored
> this info and finished installing all other packages, how can I get a
> list of all packages that haven't been installed ever? I can see lots
> of packages When I opened Package Manager, but how to know if a
> package has been installed?
if it's visible in Package Manager than you can be sure it was installed
> BTW. Which directory will the WebUpdate put those updates to? If I can
> find them, I needn't download them again.
Dev-Cpp\Packages
--
Regards,
Michal
|
|
From: Michal M. <mi...@mo...> - 2004-11-23 15:18:52
|
Justin Fan wrote: > During installing updates, I met this error message several times, and > I had to kill Package Manager Process by Ctrl+Alt+Del. Is this a bug? yes, this is known bug, see http://sourceforge.net/tracker/index.php?func=detail&aid=1006289&group_id=10639&atid=110639 but the devpak should be corretly installed even if this bug shows -- Regards, Michal |
|
From: Justin F. <jus...@gm...> - 2004-11-23 07:16:06
|
---------- Forwarded message ---------- From: Justin Fan <jus...@gm...> Date: Tue, 23 Nov 2004 15:10:04 +0800 Subject: [Dev-C++] How to verify if a package has been installed or not? To: dev...@li... Hi, During installing updates, the Package Manager showed me that some package can't be installed because some dependent package should be installed first and they are not installed yes. But after I ignored this info and finished installing all other packages, how can I get a list of all packages that haven't been installed ever? I can see lots of packages When I opened Package Manager, but how to know if a package has been installed? BTW. Which directory will the WebUpdate put those updates to? If I can find them, I needn't download them again. -- Thanks Z.J. -- Thanks Z.J. |
|
From: Justin F. <jus...@gm...> - 2004-11-23 06:46:16
|
During installing updates, I met this error message several times, and I had to kill Package Manager Process by Ctrl+Alt+Del. Is this a bug? -- Thanks Z.J. |
|
From: Per W. <pw...@ia...> - 2004-11-23 06:36:56
|
Yes, the developers are reading this. However, go to http://sourceforge.net/projects/dev-cpp/ scroll down a bit and select 'Bugs'. This is the official bug tracking system for Dev-C++. /Per W On Mon, 22 Nov 2004, Zachary Uram wrote: > do the developers even read this list? > i posted a major bug (cannot install updates) in latest version Dev-C++ > a while ago and no has responded yet on the list. > does anyone have the developers email addresses? > > zach |
|
From: Zachary U. <ne...@gm...> - 2004-11-23 03:58:14
|
do the developers even read this list? i posted a major bug (cannot install updates) in latest version Dev-C++ a while ago and no has responded yet on the list. does anyone have the developers email addresses? zach |
|
From: MD T <md...@re...> - 2004-11-23 03:02:09
|
Hi all,=A0=0AI am in a experimenting mood now. Mine is experiment on earth= s' energy fields' uniqueness. I am trying to do it by developing random num= ber generaator and sending it to different friends from each continemtal an= d asking them to run the program and see the results.=0A1]I want the progra= m to generate numbers from 00 to 99 each one from every decade, eg., 01,18,= 22,39,41,58,62,77,83,96; One set of 10 numbers every second which means six= ty numbers every minute with time logging for every respective set of numbe= rs.=0Ae.g, 11:01:01 01,18,22,39,41,58,62,77,83,96;=0A 11:01:02 00,= 12,28,31,40,53,69,72,85,99;=0A=0Aand so on upto=0A 11:01:59 09,11..= .......................93;=0A=0AIt must be saved in the proper file. This p= rogram could be using srand function or any other suitable one.=0ATime logg= ing should be with options also. For e.g., I want to see the 10 numbers gen= erated for 11.01.03 and when I enter this time the program should display t= he numbers.=0A Can we use this program in our mobile phones and how to put = it into mobile and operate it?=0A2] Another program of generating Random nu= mbers using noises from different sources including white noise of the chao= s. The features should remain the same as above with time logging and resul= ts display with the time.=0ADo you think this is possible? Can I use the pr= ogram in my mobile using the noises from the mic input and white noise gene= rated by the circuit of the mobile phone itself?=0AI hope my lengthy letter= will not bother you. Shall I expect a encouragement to my experiments by y= ou?=0AThanks and best regards,=0AMD T.=0A=0A=0A |
|
From: Peter B. <jum...@ii...> - 2004-11-23 02:43:35
|
Hi All, In the Editor Options in the Code section, you can put in code that can be inserted into the source file using Insert. Is it possible to use variables in there, such as for time, date etc? I cant find any info on this. Thank You, Regards, Peter |
|
From: youngs <you...@ut...> - 2004-11-23 01:43:13
|
what you read is '2', '3', '3', not 2,3,3, so get wrong result.
you should use : c=3Dgetc(nombre)-'0' to get correct digital.
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...]On Behalf Of Darren
Sent: 2004?11?23? 7:22
To: dev...@li...
Subject: Re: [Dev-C++] question about file
i can't see any problem with your logic though i would use
while ( !feof(nombre));
Rather than
while (c !=3D EOF);
Perhaps you should debug and see what is being read from the file. also
consider how the file is layed out.
=2E
----- Original Message -----
From: "Gabriel Alejand Ya=F1ez Lemus" <gab...@ud...>
To: <dev...@li...>
Sent: Monday, November 22, 2004 10:20 PM
Subject: [Dev-C++] question about file
> Hi!!
> I made a source code in C for read numbers from a file, plus them and s=
how
> the result on screen.This is the code.
>
> #include <stdio.h>
> #include <stdlib.h>
>
> int main()
> {
> FILE *nombre;
> int c,a=3D0;
>
> nombre =3D fopen("Prueba.txt", "r");
>
> if (nombre =3D=3D NULL)
> {
> printf("El archivo no existe \n");
> exit (EXIT_FAILURE);
> }
> else
> {
> do
> {
> c =3D getc(nombre);
> a=3Da +c;
>
> }
> while (c !=3D EOF);
> }
> printf("%d",a);
> fclose(nombre);
>
> return EXIT_SUCCESS;
> }
>
> I don't know why this code doesn't work. The file "prueba.txt" contains
> the numbers 2 3 and 3.The program must do "2+3+3" and show on screen "8=
"
> but i don't know what's wrong, the program shows "151".
>
> Help me please!
>
> Anybody have a good day!
>
>
>
>
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://productguide.itmanagersjournal.com/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.797 / Virus Database: 541 - Release Date: 15/11/04
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: Darren <dar...@nt...> - 2004-11-22 23:55:26
|
i can't see any problem with your logic though i would use
while ( !feof(nombre));
Rather than
while (c != EOF);
Perhaps you should debug and see what is being read from the file. also
consider how the file is layed out.
.
----- Original Message -----
From: "Gabriel Alejand Yañez Lemus" <gab...@ud...>
To: <dev...@li...>
Sent: Monday, November 22, 2004 10:20 PM
Subject: [Dev-C++] question about file
> Hi!!
> I made a source code in C for read numbers from a file, plus them and show
> the result on screen.This is the code.
>
> #include <stdio.h>
> #include <stdlib.h>
>
> int main()
> {
> FILE *nombre;
> int c,a=0;
>
> nombre = fopen("Prueba.txt", "r");
>
> if (nombre == NULL)
> {
> printf("El archivo no existe \n");
> exit (EXIT_FAILURE);
> }
> else
> {
> do
> {
> c = getc(nombre);
> a=a +c;
>
> }
> while (c != EOF);
> }
> printf("%d",a);
> fclose(nombre);
>
> return EXIT_SUCCESS;
> }
>
> I don't know why this code doesn't work. The file "prueba.txt" contains
> the numbers 2 3 and 3.The program must do "2+3+3" and show on screen "8"
> but i don't know what's wrong, the program shows "151".
>
> Help me please!
>
> Anybody have a good day!
>
>
>
>
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://productguide.itmanagersjournal.com/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.797 / Virus Database: 541 - Release Date: 15/11/04
|
|
From: Rob L. <rob...@nt...> - 2004-11-22 23:25:14
|
two things:
1. getc extracts an ascii character from the file to get its corresponding
integer value u must subtract 48 from it
2. a=a+c also adds EOF to a which is -1 u need to check for EOF before u do
a=a+c
hope this helps
Rob
----- Original Message -----
From: "Gabriel Alejand Yañez Lemus" <gab...@ud...>
To: <dev...@li...>
Sent: Monday, November 22, 2004 10:20 PM
Subject: [Dev-C++] question about file
> Hi!!
> I made a source code in C for read numbers from a file, plus them and show
> the result on screen.This is the code.
>
> #include <stdio.h>
> #include <stdlib.h>
>
> int main()
> {
> FILE *nombre;
> int c,a=0;
>
> nombre = fopen("Prueba.txt", "r");
>
> if (nombre == NULL)
> {
> printf("El archivo no existe \n");
> exit (EXIT_FAILURE);
> }
> else
> {
> do
> {
> c = getc(nombre);
> a=a +c;
>
> }
> while (c != EOF);
> }
> printf("%d",a);
> fclose(nombre);
>
> return EXIT_SUCCESS;
> }
>
> I don't know why this code doesn't work. The file "prueba.txt" contains
> the numbers 2 3 and 3.The program must do "2+3+3" and show on screen "8"
> but i don't know what's wrong, the program shows "151".
>
> Help me please!
>
> Anybody have a good day!
>
>
>
>
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://productguide.itmanagersjournal.com/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: Per W. <pw...@ia...> - 2004-11-22 23:12:19
|
Your program isn't reading numbers from the file. It is reading
characters.
If your file constains "123" your program will add
'1' + '2' + '3' which is
49 + 50 + 51
Also, your program is adding the EOF return value. You should test for EOF
before adding...
If you want to convert a single ascii digit to it's integer value you have
to do (c - '0').
Also, since you haven't specified if your numbers may be more than
single-digit or if they are separated by something, we can't really help
with suggestions for better methods to read from the file.
/Per W
On Mon, 22 Nov 2004, Gabriel Alejand Ya=F1ez Lemus wrote:
> Hi!!
> I made a source code in C for read numbers from a file, plus them and sho=
w
> the result on screen.This is the code.
>
> #include <stdio.h>
> #include <stdlib.h>
>
> int main()
> {
> FILE *nombre;
> int c,a=3D0;
>
> nombre =3D fopen("Prueba.txt", "r");
>
> if (nombre =3D=3D NULL)
> {
> printf("El archivo no existe \n");
> exit (EXIT_FAILURE);
> }
> else
> {
> do
> {
> c =3D getc(nombre);
> a=3Da +c;
>
> }
> while (c !=3D EOF);
> }
> printf("%d",a);
> fclose(nombre);
>
> return EXIT_SUCCESS;
> }
>
> I don't know why this code doesn't work. The file "prueba.txt" contains
> the numbers 2 3 and 3.The program must do "2+3+3" and show on screen "8"
> but i don't know what's wrong, the program shows "151".
>
> Help me please!
>
> Anybody have a good day!
>
>
>
>
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://productguide.itmanagersjournal.com/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: Gabriel A. <gab...@ud...> - 2004-11-22 22:55:47
|
Hi!!
I made a source code in C for read numbers from a file, plus them and show
the result on screen.This is the code.
#include <stdio.h>
#include <stdlib.h>
int main()
{
FILE *nombre;
int c,a=0;
nombre = fopen("Prueba.txt", "r");
if (nombre == NULL)
{
printf("El archivo no existe \n");
exit (EXIT_FAILURE);
}
else
{
do
{
c = getc(nombre);
a=a +c;
}
while (c != EOF);
}
printf("%d",a);
fclose(nombre);
return EXIT_SUCCESS;
}
I don't know why this code doesn't work. The file "prueba.txt" contains
the numbers 2 3 and 3.The program must do "2+3+3" and show on screen "8"
but i don't know what's wrong, the program shows "151".
Help me please!
Anybody have a good day!
|
|
From: <in...@vp...> - 2004-11-22 21:41:04
|
Good day. Sorry for my English, I'm Russian.. I'm using Dev-C++ 4.8.9.10 and have following problems: I'm trying to create UDP server socket listening port 57(dhcp). The code is: -----BEGIN_CUT----- unsigned int port = 57; int mySocket = socket(AF_INET, SOCK_DGRAM, 0); struct sockaddr_in server; server.sin_family = AF_INET; server.sin_port = htons(port); server.sin_addr.s_addr = INADDR_ANY; listen(mySocket, 5); -----END_CUT----- When I'm trying to run program, it cannot start listening... Where is my mistake? -- Best regards, Владимир 'insider' Прохоров mailto:in...@vp... ICQ#:179598229 The Bat! 3.0.1.33 @ Windows 2000 (Build 2195 Service Pack 4) Tuesday, November 23, 2004 12:26:54 AM |
|
From: Water C. <wt...@ya...> - 2004-11-22 21:11:11
|
There is one dll someone gave me. he wrote the dll in c. I have to use a C program to call a function in that dll. How to do it? how to use a c dll from a c program? --------------------------------- Do you Yahoo!? The all-new My Yahoo! Get yours free! |
|
From: <ms...@wp...> - 2004-11-22 18:44:37
|
Dnia 2004-11-22 18:24, Użytkownik Pascal napisał: > Anyone use the cg toolkit for NVidia with devcpp? http://www.g-productions.net/list.php?c=fl_devpak But I haven't use it. Marcin |
|
From: Pascal <p.t...@ti...> - 2004-11-22 17:28:06
|
Anyone use the cg toolkit for NVidia with devcpp? |