dev-cpp-users Mailing List for Dev-C++ (Page 465)
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: Eric E. <eng...@ya...> - 2002-12-27 02:48:55
|
I just found out about this project a week ago. I would like to use Dev-C++ with a GNU C compiler to target 68hc12 embedded processors. Has anyone done anything like this already? I'm a Delphi programmer and I can probably port the Dev-C++ version 4 source code for this purpose. But I don't have Delphi 6, so I can't use the newest sources. Eric Engler __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |
|
From: <Ger...@ne...> - 2002-12-27 02:23:39
|
Message: 1
From: "Danny Roelofs" <dro...@ho...>
To: <dev...@li...>
Date: Thu, 26 Dec 2002 02:36:28 +0100
Subject: [Dev-C++] rookie question... Getting the current directory
This is a multi-part message in MIME format.
------=_NextPart_000_0014_01C2AC87.978DF2E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
Just started today picking my programming hobby after 10 years when i =
used an amiga and a whole different programming
enviroment, i feel like a rookie again in the world of programming with =
c++ with dev4 & windows.....
Can someone tell me how to get the current directory, i think it would =
be something like this:
string test;
void main(void)
{
test =3D GetCurrentDir();
return 0;
}
But ofcourse, this doesnt work.... someone.. enlighten me..
i tryed all kinds of material but couldn't find something that worked =
with dev4 and i dont know where i have to find the problem.
thanks for your help
Danny.
//i dont know if its valid in C++, but with C, please do not void man()...
//it should return integer. otherwise, the behaviour is undefined. :)
Message: 7
Date: Thu, 26 Dec 2002 10:48:25 -0500
To: "Tri Nguyen" <tr...@ge...>, dev...@li...>
From: Matthews <dematthews@uwaterloo.c>
Subject: Re: [Dev-C++] Win exe files do not run / Ansi C or pure C
If I understand your problem corrrectly, you are unable to see the "Hello
world." message that is supposed to print out. To rectify this, add
#include <stdlib.h> and in the line preceeding the return 0 command add
system("PAUSE");
Also, I do not understand why you #included windows.h. There's no reason
to at all.
At 12:52 PM 26/12/2002 +0100, Tri Nguyen wrote:
Hej all,
I would like to learn C and make win exe.
I'm using Win98 SE and DevC++ version 4 (not the newest).
The installed dir is C:\dev-C++ with Ming compile system (incl. in the
package)
My problem is I can not se whether the exe file runs or not.
There are no error message after compiling.
The c files are just a "Hello world" print out.
All the files are in 2 zip files, one for proj03 and the second for proj04.
The second question is the different between Ansi C and C and which is most
suitable with DevC++.
Thanks a lot
TriMy,
---
//for your second question, on ANSI C. Actually the pure C your refering to
//is the ANSI C. It is the standard from which all implementations of the
//language is based. Borland, GCC, LCC, and MS VC++ supports this standards
//however lame or strong their implementations is. And of course, they also
//have their own extensions of the language.
__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp
Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/
|
|
From: <cg...@wo...> - 2002-12-26 23:04:39
|
Thank you, I tried it over my complete files and works fine.
I use MinGW 2.0.0-2 separately from Dev, too.
In my code there was nothing more than that movement between files, I'll=20
try to rebuild it and see what happens now. I neither tried yet to enter=20
your test inside my project. I'll do it one of these couple days.
Thanks again.
Abhijit Shylanath escribi=F3:
>Greets, Carlos.
>
> =20
>
>> Happy new year tewnty three (hurra for the Empire!)
>> =20
>>
>
>A Happy New Year to everyone.
>
> =20
>
>>I need make an operation over a huge amount of files, basically I
>>fstream.getline(buffer, 255); and then I do whatever. The problem is in
>>all the files one line is treated badly:
>>
>>original:
>>
>>3.429 145.1683002 5.4 0.908401 43.66
>>3.629 174.13 5.28 0.9093 42.86
>>3.859 175.61 5.14 0.909673 41.9
>>4.172 177.08 5.01 0.909293 40.8
>>4.649 178.56 4.91 0.908071 39.57
>> =20
>>
>
> =20
>
>>However remains the question, why can it happen?
>> =20
>>
>
>I tried a simple test program, it works fine with your input (FC returns=
no
>differences). I'm running GCC 3.2. See if this program works with source=
.txt
>being the above values.
>
>----------- Start ------------
>#include <iostream>
>#include <fstream>
>
>int main()
>{
> using std::cout;
> using std::cerr;
> using std::endl;
>
> const int BUF_SIZE =3D 256;
> char buf[BUF_SIZE];
>
> std::ifstream in_file;
> std::ofstream out_file;
>
> in_file.open("source.txt");
> if(!in_file)
> {
> cerr << "Couldn't open source.txt\n";
> return 1;
> }
> out_file.open("dest.txt");
>
> while(!in_file.eof())
> {
> in_file.getline(buf, BUF_SIZE);
> out_file << buf << endl;
> cout << buf << endl;
> }
>
> return 0;
>}
>
>---------- Stop ------------
>
>Tell me what you get. If you get the error (or even if you don't), try
>upgrading to the latest MinGW with GCC 3.2. The URL I used is
>http://osdn.dl.sourceforge.net/sourceforge/mingw/MinGW-2.0.0-2.exe.
>
>It may be out-dated now. Check the MinGW website.
>
>___________________________________________________________
>
>Abhijit Shylanath
>
>E-mail: mu...@gm... || ibr...@bi...
>Web-site: http://mudeth.tripod.com/
>
>
>
>
>
>-------------------------------------------------------
>This sf.net email is sponsored by:ThinkGeek
>Welcome to geek heaven.
>http://thinkgeek.com/sf
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
> =20
>
|
|
From: Brenden T. <br...@rc...> - 2002-12-26 21:15:14
|
Try getcwd():
/#include/ /<unistd.h>/
/#include/ /<io.h> // <stdio.h> is standard but MinGW uses io.h/
/main()/
/{/
/char/ /*cwd;/
/if/ /((cwd/ /=/ /getcwd(NULL,/ /64))/ /==/ /NULL)/
/{/
/perror("pwd");/
/exit(2) <http://www.mcsr.olemiss.edu/cgi-bin/man-cgi?exit+2>;/
/}/
/(void)printf("%s\n",/ /cwd);/
/free(cwd);/
/return(0);/
/}/
The man page is at:
http://www.mcsr.olemiss.edu/cgi-bin/man-cgi?getcwd+3
Note that this is POSIX, Windows has their own non-portable API for
directory and file operations.
Good luck!
Danny Roelofs wrote:
> Hi,
>
> Just started today picking my programming hobby after 10 years when i
> used an amiga and a whole different programming
> enviroment, i feel like a rookie again in the world of programming
> with c++ with dev4 & windows.....
>
> Can someone tell me how to get the current directory, i think it would
> be something like this:
>
> string test;
>
> void main(void)
> {
>
> test = GetCurrentDir();
>
>
>
> return 0;
> }
>
> But ofcourse, this doesnt work.... someone.. enlighten me..
>
> i tryed all kinds of material but couldn't find something that worked
> with dev4 and i dont know where i have to find the problem.
>
> thanks for your help
>
> Danny.
>
>
|
|
From: <muh...@fa...> - 2002-12-26 21:14:03
|
I just downloaded Devcpp4, all the files: upgrade, devcpp4.exe, devcpp401,devcpp4.src and installed all. You may want to check if this software is compatible with your OS. I installed the Devcpp on my NT and followed the same instruction from www.cprogramming.com today as a test and it works. You may have to reinstall again to make sure everything is done correctly. Let me know what the outcome is. MR dev...@li... ceforge.net To: dev...@li... Sent by: cc: dev...@li... Subject: Dev-cpp-users digest, Vol 1 #1188 - 1 msg forge.net 12/26/2002 03:00 PM Please respond to dev-cpp-users Send Dev-cpp-users mailing list submissions to dev...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/dev-cpp-users or, via email, send a message with subject or body 'help' to dev...@li... You can reach the person managing the list at dev...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of Dev-cpp-users digest..." Today's Topics: 1. Dev C++ on Windows XP (Bhaskar Subramanian) --__--__-- Message: 1 Date: Thu, 26 Dec 2002 12:52:06 -0700 (MST) From: Bhaskar Subramanian <bh...@un...> To: dev...@li... Subject: [Dev-C++] Dev C++ on Windows XP Hi, I just downloaded and installed dev C++ for my windows XP machine. I opened the hello project (hello world) and tried to compile it. But the compiler is giving lots of errors saying that iostream.h is not available. All the header files are there but the system is not able to recognize it. Do I have to set some environment variables or something?? What do I need to do? Your kind inputs in this regard would be appreciated. --Bhaskar --------------------------------------------------------- A Man is what his deep driving desire is. As his deep, driving desire is, so is his Will. As his Will is, so is his Deed. As his Deed is, So is his Destiny. ---- Katho Upanishad http://www.unm.edu/~bhaskar Email: bh...@un... Ph:1 505 243 1934 --------------------------------------------------------- --__--__-- _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users End of Dev-cpp-users Digest |
|
From: Brenden T. <br...@rc...> - 2002-12-26 20:22:59
|
Balazs is correct. However, there are a few other ways to do this. For
example, the C standard says that command line parameters will be passed
into main as a count, and as an array of pointers to stings, just as
Balazs said:
int main( int argc, char *argv[] ) {... }
argc is the ARGument Count, and argv is the ARGument Vector. However,
argv has one other little trick. It actually has argc + 1 vectors, and
the last vector is always NULL, so you can just ignore argc and count
through the strings untill you find the NULL one, and that is the end.
Obviously, this wouldn't work if some of your strings in the middle
have to be NULL, so watch out, but if they don't then it's a nice
alternative to having to maintain a seperate count, although a little
tricky to maintain. See K&R section "Command Line Arguments" more info
and nice pictures.
Also, you could have structure that has the count in the beginning and
then a variable sized char* vector after it. I believe gcc allows you
to declare variable sized vectors like this:
struct string_vect{
int count;
char *string[0];
} string_vect;
Then you have just one variable to pass into functions instead of two.
Again the maintainace cost is a little higher (you have to remeber to
allocate memory for this structure properly, i.e. malloc( sizeof (struct
string_vect) + sizeof (char* [10])) for ten strings for example, but
perhaps this would be better in the long run for you.
Good luck!
B.
P.S. I did NOT compile and check any of the code example given here.
Use at your own risk!
Khalid El-Kary wrote:
> Hi,
> I'm a newbie, just wanted to ask about the best way to make an array
> of strings (without using a string class) i mean using pointers "char *".
>
> I tried to make a pointer of pointer "char **" but i found that i'm
> unable to count the number of elements in this kind of work.
>
> Any help will be appreciated, thanx
>
> Regrads
> Khalid Al-kary
> http://creaturesx.ma.cx/kxparse/
>
>
> _________________________________________________________________
> Add photos to your e-mail with MSN 8. Get 3 months FREE*.
> http://join.msn.com/?page=features/featuredemail&xAPID=42&PS=47575&PI=7324&DI=7474&SU=
> http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_addphotos_3mf
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
|
|
From: Bhaskar S. <bh...@un...> - 2002-12-26 19:50:50
|
Hi, I just downloaded and installed dev C++ for my windows XP machine. I opened the hello project (hello world) and tried to compile it. But the compiler is giving lots of errors saying that iostream.h is not available. All the header files are there but the system is not able to recognize it. Do I have to set some environment variables or something?? What do I need to do? Your kind inputs in this regard would be appreciated. --Bhaskar --------------------------------------------------------- A Man is what his deep driving desire is. As his deep, driving desire is, so is his Will. As his Will is, so is his Deed. As his Deed is, So is his Destiny. ---- Katho Upanishad http://www.unm.edu/~bhaskar Email: bh...@un... Ph:1 505 243 1934 --------------------------------------------------------- |
|
From: Abhijit S. <mu...@gm...> - 2002-12-26 19:01:58
|
Greets, Carlos.
> Happy new year tewnty three (hurra for the Empire!)
A Happy New Year to everyone.
>
> I need make an operation over a huge amount of files, basically I
> fstream.getline(buffer, 255); and then I do whatever. The problem is in
> all the files one line is treated badly:
>
> original:
>
> 3.429 145.1683002 5.4 0.908401 43.66
> 3.629 174.13 5.28 0.9093 42.86
> 3.859 175.61 5.14 0.909673 41.9
> 4.172 177.08 5.01 0.909293 40.8
> 4.649 178.56 4.91 0.908071 39.57
> However remains the question, why can it happen?
I tried a simple test program, it works fine with your input (FC returns no
differences). I'm running GCC 3.2. See if this program works with source.txt
being the above values.
----------- Start ------------
#include <iostream>
#include <fstream>
int main()
{
using std::cout;
using std::cerr;
using std::endl;
const int BUF_SIZE = 256;
char buf[BUF_SIZE];
std::ifstream in_file;
std::ofstream out_file;
in_file.open("source.txt");
if(!in_file)
{
cerr << "Couldn't open source.txt\n";
return 1;
}
out_file.open("dest.txt");
while(!in_file.eof())
{
in_file.getline(buf, BUF_SIZE);
out_file << buf << endl;
cout << buf << endl;
}
return 0;
}
---------- Stop ------------
Tell me what you get. If you get the error (or even if you don't), try
upgrading to the latest MinGW with GCC 3.2. The URL I used is
http://osdn.dl.sourceforge.net/sourceforge/mingw/MinGW-2.0.0-2.exe.
It may be out-dated now. Check the MinGW website.
___________________________________________________________
Abhijit Shylanath
E-mail: mu...@gm... || ibr...@bi...
Web-site: http://mudeth.tripod.com/
|
|
From: Matthews <dem...@uw...> - 2002-12-26 15:49:28
|
If I understand your problem corrrectly, you are unable to see the "Hello
world." message that is supposed to print out. To rectify this, add
#include <stdlib.h> and in the line preceeding the return 0 command add
system("PAUSE");
Also, I do not understand why you #included windows.h. There's no reason
to at all.
At 12:52 PM 26/12/2002 +0100, Tri Nguyen wrote:
>Hej all,
>I would like to learn C and make win exe.
>I'm using Win98 SE and DevC++ version 4 (not the newest).
>The installed dir is C:\dev-C++ with Ming compile system (incl. in the
>package)
>My problem is I can not se whether the exe file runs or not.
>There are no error message after compiling.
>The c files are just a "Hello world" print out.
>All the files are in 2 zip files, one for proj03 and the second for proj04.
>
>The second question is the different between Ansi C and C and which is most
>suitable with DevC++.
>
>Thanks a lot
>
>TriMy,
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.427 / Virus Database: 240 - Release Date: 06-12-2002
>
>Attachment Converted: "C:\EUDORA\Attach\c03.zip"
>
>Attachment Converted: "C:\EUDORA\Attach\c04.zip"
>
|
|
From: Matthews <dem...@uw...> - 2002-12-26 15:49:25
|
I believe strlen() would work in this case. It counts the number of characters in an array until it reaches the null terminator (which would be the '\0' character, making yours redundant.) At 12:01 PM 26/12/2002 +0000, Khalid El-Kary wrote: >Thanx for your help! > >i just wanted to add that i need something for C not C++ ;), so i decided to >end the arrays with "-1" and then check for it, that's only in case i have >no "-1" in the array itself! and that's the case here > >have a nice hard coding! :) > >Regards, >Khalid Al-kary > > > > > > >> >>well u stated you were a newbie, as i was, maybe still am. i've been doing >>C++ for around a year now and as a general matter of fact, arrays are >>REALLY far too primitive for any REAL application. now i dont know the case >>with C, but in C++ u can use the various standard container classes that >>come with C++, such a <vector> or <list>. each of these classes have a >>lenght or size functon that u can use. >> >>also, creating your own container classes really isnt too hard, u could >>write your own vector which allows u to check the size or something. i >>dunno. >> >>happy programming :) >> >>------------------------------------------------- >> >>Hi, >>i'm a newbie asking about how can i count the number of elements in a >>non-string array? is this possible? >> >>infact returning to the origin from where the array was initialized >>will >>affect the efficency--causing me to run the same function twise! >> >>thanx for any help >> >>Regards, >>Khalid Al-kary >>http://creaturesx.ma.cx/kxparse/ >> >> >> >> >> >>--------------------------------- >>Yahoo! Movies >>- What's on at your local cinema? > > >_________________________________________________________________ >Protect your PC - get McAfee.com VirusScan Online >http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 > > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
|
From: Khalid El-K. <kha...@ho...> - 2002-12-26 12:01:15
|
Thanx for your help! i just wanted to add that i need something for C not C++ ;), so i decided to end the arrays with "-1" and then check for it, that's only in case i have no "-1" in the array itself! and that's the case here have a nice hard coding! :) Regards, Khalid Al-kary > >well u stated you were a newbie, as i was, maybe still am. i've been doing >C++ for around a year now and as a general matter of fact, arrays are >REALLY far too primitive for any REAL application. now i dont know the case >with C, but in C++ u can use the various standard container classes that >come with C++, such a <vector> or <list>. each of these classes have a >lenght or size functon that u can use. > >also, creating your own container classes really isnt too hard, u could >write your own vector which allows u to check the size or something. i >dunno. > >happy programming :) > >------------------------------------------------- > >Hi, >i'm a newbie asking about how can i count the number of elements in a >non-string array? is this possible? > >infact returning to the origin from where the array was initialized >will >affect the efficency--causing me to run the same function twise! > >thanx for any help > >Regards, >Khalid Al-kary >http://creaturesx.ma.cx/kxparse/ > > > > > >--------------------------------- >Yahoo! Movies >- What's on at your local cinema? _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 |
|
From: Tri N. <tr...@ge...> - 2002-12-26 11:53:06
|
Hej all, I would like to learn C and make win exe. I'm using Win98 SE and DevC++ version 4 (not the newest). The installed dir is C:\dev-C++ with Ming compile system (incl. in the package) My problem is I can not se whether the exe file runs or not. There are no error message after compiling. The c files are just a "Hello world" print out. All the files are in 2 zip files, one for proj03 and the second for proj04. The second question is the different between Ansi C and C and which is most suitable with DevC++. Thanks a lot TriMy, --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.427 / Virus Database: 240 - Release Date: 06-12-2002 |
|
From: Vlada D. <dj...@im...> - 2002-12-26 08:24:27
|
Hi, everybody. I want to include printing in my application. I wanted to do this using common dialogs (page setup dialog, print dialog), but when I saw that gigantic DEVMODE structure, I gave up. Do I have to fill the entire structure manualy, or I can use some default values? Is there a way to get informations about printers from the system? I am also confused about members of DEVNAME structure. I don't want to be anoying, but I hope someone can give some general idea about using these dialogs and printing. Thanks. ------------ Vlada |
|
From: Vlada D. <dj...@im...> - 2002-12-26 08:13:45
|
I didn't try this, but maybe it could work:
#include <stdlib.h>
void main(void)
{
test=3Dsystem("cd");
}
Since your main function is declared as void, it shouldn't return =
anything.
Vlada
----- Original Message -----=20
From: Danny Roelofs=20
To: dev...@li...=20
Sent: Thursday, December 26, 2002 2:36 AM
Subject: [Dev-C++] rookie question... Getting the current directory
Hi,
=20
Just started today picking my programming hobby after 10 years when i =
used an amiga and a whole different programming
enviroment, i feel like a rookie again in the world of programming =
with c++ with dev4 & windows.....
=20
Can someone tell me how to get the current directory, i think it would =
be something like this:
=20
string test;
=20
void main(void)
{
=20
test =3D GetCurrentDir();
=20
=20
=20
return 0;
}
=20
But ofcourse, this doesnt work.... someone.. enlighten me..
=20
i tryed all kinds of material but couldn't find something that worked =
with dev4 and i dont know where i have to find the problem.
=20
thanks for your help
=20
Danny.
|
|
From: Danny R. <dro...@ho...> - 2002-12-26 01:36:40
|
Hi,
Just started today picking my programming hobby after 10 years when i =
used an amiga and a whole different programming
enviroment, i feel like a rookie again in the world of programming with =
c++ with dev4 & windows.....
Can someone tell me how to get the current directory, i think it would =
be something like this:
string test;
void main(void)
{
test =3D GetCurrentDir();
return 0;
}
But ofcourse, this doesnt work.... someone.. enlighten me..
i tryed all kinds of material but couldn't find something that worked =
with dev4 and i dont know where i have to find the problem.
thanks for your help
Danny.
|
|
From: <cg...@wo...> - 2002-12-25 18:49:04
|
Happy new year tewnty three (hurra for the Empire!)
I need make an operation over a huge amount of files, basically I
fstream.getline(buffer, 255); and then I do whatever. The problem is in
all the files one line is treated badly:
original:
3.429 145.1683002 5.4 0.908401 43.66
3.629 174.13 5.28 0.9093 42.86
3.859 175.61 5.14 0.909673 41.9
4.172 177.08 5.01 0.909293 40.8
4.649 178.56 4.91 0.908071 39.57
result: (I simply I original.getline(buffer, 255); result << buffer << endl;
3.429 145.1683002 5.4 0.908401 43.66
3.629 146.6423431 5.28 0.9093 42.86
671 -26.5866636 40.8 //WHY THIS HAPPENS??????????????????!!!!!!
I'M ABOUT TO KILL MY COMPUTER!!!!!
4.649 151.707065 4.91 0.908071 39.57
These are a couple of lines from original which includes the conflicting
line:, the previous one and a couple of the previous and the next. I
don't see any conflicting value. I tried to onherit from fstream and
write my own getline, so it will stop only with '\n' or end of buffer
size, but I get the same error.
number of character | character
------------------------------------
54 6
10
51 3
46 .
56 8
53 5
57 9
9
49 1
55 7
53 5
46 .
54 6
49 1
9
53 5
46 .
49 1
52 4
9
48 0
46 .
57 9
48 0
57 9
54 6
55 7
51 3
9
52 4
49 1
46 .
57 9
10
52 4
46 .
I've made a count and it seems like getline doesn't recognize the
newlines, and is filling the buffer till the 255 characters I specify as
length limit, then it jumps about the number of characters per line to
the next line, althought all the operations which are done in a
line-per-line basis are done correctly for each line. I want substract a
value for the second one each line, and all lines have the second value
they need. I've tried increasing the size of the buffer and value passed
to getline as delimiter, I doubled the size and then it makes the same
error in the next line than before, then I double it again, but then
there is no difference, the error doesn't run to the next line.
I tried to make it a UNIX kind of file (through an editor program with
this ability) but the result is still the same. In getline I checked as
delimiter for \n, \r, 10, 13 and 12, and nothing worked.
Here is the piece of code where the fail happens, when passing from the
input file to the temporary one:
while(inFile.eof() == false){
inFile.getline(buffer, 5096);
first = buffer[0];
if (first == '/') //Some lines are commented with //, I want quit them.
point = &buffer[2]; //I know if ther first is / the second is the same.
else
point = buffer;
if (tempFile.is_open()) //Compiled with and without this line.
tempFile << point << endl; .
cout << point << endl;
}
But if in cout the lines are right, then getline is working fine, the
error is in tempFile << point << endl...
I'll have to recode with plain C file functions (I've done it changing
fstream.getline with fgets and fstream << with fprintf, now it works
with other odd errors which at least don't invalidate the files, like
printing lines more than once).
However remains the question, why can it happen?
|
|
From: <or...@vp...> - 2002-12-25 12:05:12
|
Hello again! Khalid El-Kary wrote: > Hi, > i'm a newbie asking about how can i count the number of elements in a > non-string array? is this possible? No, I suppose in C it is not possible. In C a "string" is considered a non-string array, because it is an array of char-s (char[]). And every "string" in C (a char[]) must be terminated with a '\0' character, which means that the last element must be '\0', otherwise you don't know, where to stop. So you need to store the number of elements in another variable, or you need a special value, that will indicate the end of the array. I think. -- Regards Balázs |
|
From: <or...@vp...> - 2002-12-25 11:54:11
|
Hello! Khalid El-Kary wrote: > Hi, > I'm a newbie, just wanted to ask about the best way to make an array of > strings (without using a string class) i mean using pointers "char *". > > I tried to make a pointer of pointer "char **" but i found that i'm > unable to count the number of elements in this kind of work. That's right, you cannot count the number of elements, if you created the array of char* pointers dynamically. You need another variable to store the number of elements. This is normal. -- Regards Balázs P.S.: Jesus was born! |
|
From: Khalid El-K. <kha...@ho...> - 2002-12-24 23:25:32
|
Hi, i'm a newbie asking about how can i count the number of elements in a non-string array? is this possible? infact returning to the origin from where the array was initialized will affect the efficency--causing me to run the same function twise! thanx for any help Regards, Khalid Al-kary http://creaturesx.ma.cx/kxparse/ _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 3 months FREE*. http://join.msn.com/?page=features/virus&xAPID=42&PS=47575&PI=7324&DI=7474&SU= http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_virusprotection_3mf |
|
From: Luis E. B. G. <lba...@is...> - 2002-12-24 21:27:50
|
Hello!! Merry Christmas and happy new year everyone!!!... God blees you all!!! Luis. _________________________ "Saty=E2t n=E2sti paro dharmah" _________________________ |
|
From: Khalid El-K. <kha...@ho...> - 2002-12-24 20:16:35
|
Hi, I'm a newbie, just wanted to ask about the best way to make an array of strings (without using a string class) i mean using pointers "char *". I tried to make a pointer of pointer "char **" but i found that i'm unable to count the number of elements in this kind of work. Any help will be appreciated, thanx Regrads Khalid Al-kary http://creaturesx.ma.cx/kxparse/ _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 3 months FREE*. http://join.msn.com/?page=features/featuredemail&xAPID=42&PS=47575&PI=7324&DI=7474&SU= http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_addphotos_3mf |
|
From: Charles K. <ch...@ke...> - 2002-12-24 19:56:25
|
Was trying to get pthreads to build under devcpp (4.9.71- gcc3.2). They make a call to "terminate()", which is not found under devcpp. Any thoughts on what include is missing to port this from msvc ? Charless ----- Original Message ----- From: "Abhijit Shylanath" <mu...@gm...> To: "Rodrigo Reis da Rocha" <r3...@ie...>; <dev...@li...> Sent: Tuesday, December 24, 2002 1:34 PM Subject: Re: [Dev-C++] ASM > Greets, Rodrigo. > > > I want to know how to find the "__asm" command sintax to use assembler > with Dev-cpp. > > http://www.c-for-dummies.com/compilers/djgpp_asm.html > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > |
|
From: q[>_<]p W. q[^_^]p <moa...@nt...> - 2002-12-24 19:49:01
|
Willz here from Ireland. Just a happy Christmas and New year to you all. And in the new year may you all not get too pissed with me asking stupid = questions all the time.I am a complete beginner to programming and well = you will be tortured with beginner questions so agin: Happy Christmas too you All.........:) |
|
From: Abhijit S. <mu...@gm...> - 2002-12-24 18:34:40
|
Greets, Rodrigo. > I want to know how to find the "__asm" command sintax to use assembler with Dev-cpp. http://www.c-for-dummies.com/compilers/djgpp_asm.html |
|
From: Rodrigo R. da R. <r3...@ie...> - 2002-12-24 14:20:57
|
Hi! I want to know how to find the "__asm" command sintax to use assembler with Dev-cpp. Thanks. R3 |