dev-cpp-users Mailing List for Dev-C++ (Page 355)
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: <a_g...@ya...> - 2003-07-07 17:20:56
|
<html>
<head>
<title>testFile.c</title>
</head>
<!-- Generated by SynEdit HTML exporter -->
<body text="#000000" bgcolor="#FFFFFF">
<pre>
<code><font size=3 face="Courier New"><font color="#808000">#include <stdio.h>
</font><font color="#0000FF">int </font>main(<font color="#0000FF">int </font>argc,<font color="#0000FF">char </font>**argv)
{
FILE *fp=NULL;
<font color="#0000FF">unsigned long </font>pos=<font color="#FF00FF">0</font>;
<font color="#0000FF">char </font>c=<font color="#993366">'\0'</font>;
<font color="#0000FF">if</font>(argc == <font color="#FF00FF">1</font>){
fprintf(stderr,<font color="#993366">"Usage: %s <filename>"</font>,argv[<font color="#FF00FF">0</font>]);
exit(<font color="#FF00FF">1</font>);
}<font color="#008000">/*if no command line arguments*/
</font><font color="#0000FF">if</font>((fp=fopen(argv[<font color="#FF00FF">1</font>],<font color="#993366">"r"</font>))==NULL){
fprintf(stderr,<font color="#993366">"Could not open <%s>\n"</font>,argv[<font color="#FF00FF">1</font>]);
exit(<font color="#FF00FF">1</font>);
}<font color="#008000">/*if file open fails*/
</font><font color="#0000FF">while</font>(!feof(fp)){
c=fgetc(fp);
putchar(c);
pos=ftell(fp);
printf(<font color="#993366">"\nPosition now %d\n"</font>,pos);
}<font color="#008000">/*while file does not end*/
</font>fclose(fp);
printf(<font color="#993366">"\n\n Bye bye \n\n"</font>);
<font color="#0000FF">return </font>getchar();
}<font color="#008000">/*main*/
</font></font>
</code></pre>
</body>
</html> |
|
From: Daniel G. <sp...@ho...> - 2003-07-07 16:26:30
|
I got a load of linker errors from vector, but it compiles! Many thanks!!!
>From: "Smith, Jacob N." <jn...@ut...>
>To: 'Daniel Glenfield' <sp...@ho...>
>Subject: RE: [Dev-C++] Help using the STL please!
>Date: Mon, 07 Jul 2003 11:25:47 -0500
>
>Maybe include the header "<algorithm>". -j.
>
>-----Original Message-----
>From: Daniel Glenfield [mailto:sp...@ho...]
>Sent: Monday, July 07, 2003 11:21 AM
>To: dev...@li...
>Subject: [Dev-C++] Help using the STL please!
>
>
>Hi guys,
>page 1 of the book I'm going through and the code doesn't work. Header
>problem? Possibly. Take a look.
>It is complaining that 'sort' is undeclared. Now it auto-helps me with the
>function paramter list so it knows of it, but it will not compile under
>VC++
>
>6.0
>
>P.S. The book example doesn't say what headers to include, plus it has int
>main(), and no return value for the function. So mine looks slightly
>different in those respects.
>
>// Include the Standard Template Library
>#include <list>
>#include <vector>
>#include <iostream>
>#include <string>
>
>using namespace std;
>
>
>int main(int argc, char** argv)
>{
> // Create the container, in this case a vector.
> vector<string> StringVector;
> string TempString;
>
> while (getline(cin, TempString))
> {
> StringVector.push_back(TempString);
> }
>
> sort(StringVector.begin(), StringVector.end());
> copy(StringVector.begin(), StringVector.end(),
>ostream_iterator<string>(cout, "\n"));
>
> return 0;
>}
>
>'sort' is part of list I see from MSDN, so what's up? lol
>
>_________________________________________________________________
>Express yourself with cool emoticons - download MSN Messenger today!
>http://www.msn.co.uk/messenger
>
>
>
>-------------------------------------------------------
>This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data
>Reports, E-commerce, Portals, and Forums are available now. Download today
>and enter to win an XBOX or Visual Studio .NET.
>http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
>_______________________________________________
>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
>
_________________________________________________________________
Use MSN Messenger to send music and pics to your friends
http://www.msn.co.uk/messenger
|
|
From: Daniel G. <sp...@ho...> - 2003-07-07 16:21:09
|
Hi guys,
page 1 of the book I'm going through and the code doesn't work. Header
problem? Possibly. Take a look.
It is complaining that 'sort' is undeclared. Now it auto-helps me with the
function paramter list so it knows of it, but it will not compile under VC++
6.0
P.S. The book example doesn't say what headers to include, plus it has int
main(), and no return value for the function. So mine looks slightly
different in those respects.
// Include the Standard Template Library
#include <list>
#include <vector>
#include <iostream>
#include <string>
using namespace std;
int main(int argc, char** argv)
{
// Create the container, in this case a vector.
vector<string> StringVector;
string TempString;
while (getline(cin, TempString))
{
StringVector.push_back(TempString);
}
sort(StringVector.begin(), StringVector.end());
copy(StringVector.begin(), StringVector.end(),
ostream_iterator<string>(cout, "\n"));
return 0;
}
'sort' is part of list I see from MSDN, so what's up? lol
_________________________________________________________________
Express yourself with cool emoticons - download MSN Messenger today!
http://www.msn.co.uk/messenger
|
|
From: Ioannis V. <iv...@em...> - 2003-07-07 15:56:54
|
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf Of Provic
> Sent: Monday, July 07, 2003 5:31 PM
> To: dev...@li...
> Subject: Re: [Dev-C++] FILE positionning problem.
>
> void func()
I assume you play in C, so make th above void func(void)
void func() and void func(void) are not the same thing in C. In C empty
parenthesis means to not make any argument checking.
For example if you do func(7); and func(NULL); you will get no error
messages.
> {
> FILE *Fcarte;
> long int pos; // Position
> char Charou; // The character, converted in char
> int ICharou; // The original character
>
> Fcarte=fopen(carte, "r");
What is carte. It should be "carte".
> if (Fcarte==NULL)
> {
> printf("Impossible d'ouvrir de fichier bsp.\n");
> return;
> }
>
> while(1)
> {
> pos = ftell(Fcarte);
Useless.
//
> _________________Nb 1
> ICharou=fgetc(Fcarte);
> /* if (ICharou==EOF) // Here
> were there
> an EOF test : I removed it, it did bug a lot (?)
> break; */
>
> Charou=(char) ICharou;
There is no need for casting here.
> /*
> [stuff, using Charou...] */
>
> fseek(Fcarte, pos+1, SEEK_SET);
Useless (in theory, but you said you had problems?).
> _________________Nb 2
> }
>
> }
>
> before adding Nb1 and Nb2, it worked too buggly (?). thereafter, it
> works too slowly (normal).
>
> Hoping you will help, Thankssssss
Assuming you have the file named "carte" (without any extension) run the
following code:
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
FILE *Fcarte=fopen("carte" ,"r");
char c;
int input;
if(Fcarte==NULL)
{
fprintf(stderr, "\nMen the lifeboats. Women and children
first!\n\n");
return EXIT_FAILURE;
}
while((input=fgetc(Fcarte))!=EOF)
{
c=input;
/* Do whatever you want with c */
printf("File pos: %ld\n", ftell(Fcarte));
}
printf("\n\nIn theory the file pointer was advancing 1 long at a time\n");
return 0;
}
The results in my system:
C:\c>copy con carte
I have a mission to my life
^Z
1 file(s) copied.
C:\c>temp
File pos: 1
File pos: 2
File pos: 3
File pos: 4
File pos: 5
File pos: 6
File pos: 7
File pos: 8
File pos: 9
File pos: 10
File pos: 11
File pos: 12
File pos: 13
File pos: 14
File pos: 15
File pos: 16
File pos: 17
File pos: 18
File pos: 19
File pos: 20
File pos: 21
File pos: 22
File pos: 23
File pos: 24
File pos: 25
File pos: 26
File pos: 27
File pos: 29
In theory the file pointer was advancing 1 long at a time
C:\c>
Ioannis Vranos
* Programming pages: http://www.noicys.freeurl.com
* Alternative URL 1: http://run.to/noicys
* Alternative URL 2: http://www.noicys.cjb.net
|
|
From: Per W. <pw...@ia...> - 2003-07-07 14:59:35
|
First of all - notice that EOF is (-1) while fgetc() returns a unsigned
char cast as an int.
A valid char will then be an integer 0..255, while EOF is -1.
You don't assign to an int but to a char. Then you will not be able to see
the difference between a valid char and the EOF, since (char)-1 is a valid
character.
There is no need to do ftell()/fseek(). fgetc() does work!
int ch;
FILE *Fcarte;
Fcarte =3D foepn(carte,"rt"); /* "rt" for text stream to handle \r\n */
if (Fcarte =3D=3D NULL) {
printf("Failed open file\n");
return;
}
for (;;) {
ch =3D fgetc(Fcarte);
if (ch =3D=3D EOF) break;
printf("I just found the caracter %c (%02x)\n",
/* all characters not printable on all terminals, so just try to
* print 32 .. 127
*/
(ch >=3D ' ' && ch <=3D 127) ? ch : '.',
ch);
}
fclose(Fcarte);
On Mon, 7 Jul 2003, Provic wrote:
> See at the bottom...
>
> Per Westermark wrote:
>
> >Why - aren't we supposted to be clairvoyant and simply "see" the problem
> >before us in the air :-)
> >
> >/Per W
> >
> >On Mon, 7 Jul 2003, Ioannis Vranos wrote:
> >
> >
> >
> >>>-----Original Message-----
> >>>From: dev...@li...
> >>>[mailto:dev...@li...] On Behalf Of Provic
> >>>Sent: Monday, July 07, 2003 11:59 AM
> >>>To: dev...@li...
> >>>Subject: [Dev-C++] FILE positionning problem.
> >>>
> >>>
> >>>Hi !
> >>>My current problem is a little weird : I read in the man-pages that
> >>>fgetc increases automatically the position in a current opened file.
> >>>So my program reads each character of this file in a while :
> >>>it should
> >>>do that, but in fact it doesn't.
> >>>I resolved that by repositionning each time by fseek (param :
> >>>SEEK_SET)
> >>>at the right position ; but a file access monitoring daemon showed me
> >>>that my program isn't optimised at all, it performs 2 fseek which are
> >>>exactly the sames...
> >>>Where is the bug ?
> >>>I verified my code, no need to include it : no pb here.
> >>>
> >>>
> >>I think you had better post your code. :)
> >>
> >>
> >>
> >>
> So that is my code (no comments, they were in french)
>
> void func()
> {
> FILE *Fcarte;
> long int pos; // Position
> char Charou; // The character, converted in char
> int ICharou; // The original character
>
> Fcarte=3Dfopen(carte, "r");
> if (Fcarte=3D=3DNULL)
> {
> printf("Impossible d'ouvrir de fichier bsp.\n");
> return;
> }
>
> while(1)
> {
> pos =3D ftell(Fcarte); //
> _________________Nb 1
> ICharou=3Dfgetc(Fcarte);
> /* if (ICharou=3D=3DEOF) // Here were th=
ere
> an EOF test : I removed it, it did bug a lot (?)
> break; */
>
> Charou=3D(char) ICharou;
> /*
> [stuff, using Charou...] */
>
> fseek(Fcarte, pos+1, SEEK_SET); // _________________Nb=
2
> }
>
> }
>
> before adding Nb1 and Nb2, it worked too buggly (?). thereafter, it
> works too slowly (normal).
>
> Hoping you will help, Thankssssss
>
> Herv=E9
>
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
> _______________________________________________
> 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: Provic <pr...@wa...> - 2003-07-07 14:35:21
|
>
>
>> Hi !
>> My current problem is a little weird : I read in the man-pages that
>> fgetc increases automatically the position in a current opened file.
>> So my program reads each character of this file in a while : it
>> should do that, but in fact it doesn't.
>> I resolved that by repositionning each time by fseek (param :
>> SEEK_SET) at the right position ; but a file access monitoring daemon
>> showed me that my program isn't optimised at all, it performs 2 fseek
>> which are exactly the sames...
>> Where is the bug ?
>> I verified my code, no need to include it : no pb here.
>>
>
>
>
> I think you had better post your code.
>
So that is my code (no comments, they were in french)
void func()
{
FILE *Fcarte;
long int pos; // Position
char Charou; // The character, converted in char
int ICharou; // The original character
Fcarte=fopen(carte, "r");
if (Fcarte==NULL)
{
printf("Impossible d'ouvrir de fichier bsp.\n");
return;
}
while(1)
{
pos = ftell(Fcarte); //
_________________Nb 1
ICharou=fgetc(Fcarte);
/* if (ICharou==EOF) // Here were there
an EOF test : I removed it, it did bug a lot (?)
break; */
Charou=(char) ICharou;
/*
[stuff, using Charou...] */
fseek(Fcarte, pos+1, SEEK_SET); // _________________Nb 2
}
}
before adding Nb1 and Nb2, it worked too buggly (?). thereafter, it
works too slowly (normal).
Hoping you will help, Thankssssss
Hervé
|
|
From: Provic <pr...@wa...> - 2003-07-07 14:29:25
|
See at the bottom...
Per Westermark wrote:
>Why - aren't we supposted to be clairvoyant and simply "see" the problem
>before us in the air :-)
>
>/Per W
>
>On Mon, 7 Jul 2003, Ioannis Vranos wrote:
>
>
>
>>>-----Original Message-----
>>>From: dev...@li...
>>>[mailto:dev...@li...] On Behalf Of Provic
>>>Sent: Monday, July 07, 2003 11:59 AM
>>>To: dev...@li...
>>>Subject: [Dev-C++] FILE positionning problem.
>>>
>>>
>>>Hi !
>>>My current problem is a little weird : I read in the man-pages that
>>>fgetc increases automatically the position in a current opened file.
>>>So my program reads each character of this file in a while :
>>>it should
>>>do that, but in fact it doesn't.
>>>I resolved that by repositionning each time by fseek (param :
>>>SEEK_SET)
>>>at the right position ; but a file access monitoring daemon showed me
>>>that my program isn't optimised at all, it performs 2 fseek which are
>>>exactly the sames...
>>>Where is the bug ?
>>>I verified my code, no need to include it : no pb here.
>>>
>>>
>>I think you had better post your code. :)
>>
>>
>>
>>
So that is my code (no comments, they were in french)
void func()
{
FILE *Fcarte;
long int pos; // Position
char Charou; // The character, converted in char
int ICharou; // The original character
Fcarte=fopen(carte, "r");
if (Fcarte==NULL)
{
printf("Impossible d'ouvrir de fichier bsp.\n");
return;
}
while(1)
{
pos = ftell(Fcarte); //
_________________Nb 1
ICharou=fgetc(Fcarte);
/* if (ICharou==EOF) // Here were there
an EOF test : I removed it, it did bug a lot (?)
break; */
Charou=(char) ICharou;
/*
[stuff, using Charou...] */
fseek(Fcarte, pos+1, SEEK_SET); // _________________Nb 2
}
}
before adding Nb1 and Nb2, it worked too buggly (?). thereafter, it
works too slowly (normal).
Hoping you will help, Thankssssss
Hervé
|
|
From: Mark S. <mar...@li...> - 2003-07-07 13:51:29
|
Make sure that the file extension is .c in lower case NOT UPPER CASE .C else it takes it as being a c++ file (UNIX convention). regards Mark --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.495 / Virus Database: 294 - Release Date: 30/06/2003 The information contained in this e-mail message (and any attachment transmitted herewith) is privileged and confidential and is intended for the exclusive use of the addressee(s). If you are not an addressee, any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited. If you have received this communication in error, please contact us immediately so that we can correct the error. |
|
From: Per W. <pw...@ia...> - 2003-07-07 13:14:49
|
I'm not sure if a byte by definition may be anything but 8 bit.
However, at least IBM have old irons with 9-bit characters. I assume that
they are using own-defined floating point data too.
For just about all machines in the world, the fp format is IEEE.
A double is then stored as
S EEEEEEEEEEE FFFFFFFFFFF.....FFFFF
0 1..11 12..63
E=2047, F!=0 -> Not a number
E=2047, F=0, S=1 -> -infinity
E=2047, F=0, S=0 -> +infinity
E!=0 -> normalized number -1^S * 2^(E-1023) * (1.F)
E=0, F!=0 -> unnormalized number -1^S * 2^(-1022) * 0.F
E=0, F=0, S=1 -> -0
E=0, F=0, S=0 -> +0
Similar for floating point, but
8-bit E, 23-bit F
Replace E=2047 with E=255
Replace (E-1023) with (E-127)
Replace 2^(-1022) with 2^(-126)
/Per W
On Mon, 7 Jul 2003, Ioannis Vranos wrote:
> In a newsgroup out there there was a girl who wanted to see the
> representation of a given double in her system. All others provided low
> level messy stuff involving & operators etc.
>
>
> I provided the code:
>
>
> #include <iostream>
> #include <bitset>
> #include <limits>
>
>
> int main()
> {
> using namespace std;
>
> double d=1;
>
> unsigned char *p=reinterpret_cast<unsigned char *>(&d);
>
> // There are systems where 1 byte is more than 8 bits
> bitset<numeric_limits<unsigned char>::digits> byte;
>
> for(unsigned i=0; i<sizeof(d); ++i)
> {
> byte=p[i];
>
> for(unsigned j=0; j<byte.size(); ++j)
> cout<<byte[j];
> }
>
> cout<<endl;
> }
>
>
> However it seems to be printed in the opposite way (try making d an unsigned
> char). Perhaps it is the way it is implemented in the system, or I am taking
> something in the opposite way that I can't find out?
>
>
>
>
>
>
> Ioannis Vranos
>
> * Programming pages: http://www.noicys.freeurl.com
> * Alternative URL 1: http://run.to/noicys
> * Alternative URL 2: http://www.noicys.cjb.net
>
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
> _______________________________________________
> 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...> - 2003-07-07 13:03:20
|
Did you remember to link with -lstdc++ /Per W On Sun, 6 Jul 2003, R. D. Flowers wrote: > I just downloaded the recent beta of dev-cpp. I am on W98se. > > The linker says that .eh_frame+0x11 in my object file wants something called ___gxx_personality_v0 . > > My program is a short and simple hex dump console program in C . > > Can someone give me a hint? > > > -- > The Bear At Home > R. D. Flowers > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 > _______________________________________________ > 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...> - 2003-07-07 13:02:24
|
Why - aren't we supposted to be clairvoyant and simply "see" the problem before us in the air :-) /Per W On Mon, 7 Jul 2003, Ioannis Vranos wrote: > > -----Original Message----- > > From: dev...@li... > > [mailto:dev...@li...] On Behalf Of Provic > > Sent: Monday, July 07, 2003 11:59 AM > > To: dev...@li... > > Subject: [Dev-C++] FILE positionning problem. > > > > > > Hi ! > > My current problem is a little weird : I read in the man-pages that > > fgetc increases automatically the position in a current opened file. > > So my program reads each character of this file in a while : > > it should > > do that, but in fact it doesn't. > > I resolved that by repositionning each time by fseek (param : > > SEEK_SET) > > at the right position ; but a file access monitoring daemon showed me > > that my program isn't optimised at all, it performs 2 fseek which are > > exactly the sames... > > Where is the bug ? > > I verified my code, no need to include it : no pb here. > > > I think you had better post your code. :) > > > > > > > Ioannis Vranos > > * Programming pages: http://www.noicys.freeurl.com > * Alternative URL 1: http://run.to/noicys > * Alternative URL 2: http://www.noicys.cjb.net > > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 > _______________________________________________ > 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: <or...@vp...> - 2003-07-07 12:57:45
|
Ioannis Vranos wrote: > However it seems to be printed in the opposite way (try making d an unsigned > char). Perhaps it is the way it is implemented in the system, or I am taking > something in the opposite way that I can't find out? It is probably because of endianness, and it is normal. Because you directly access the memory, where the double is stored, it is system-dependent whether the low or high order byte comes first. Most systems are little endian (but there are many that are big endian). Look on the net for more details about little and big endian stuff. -- Greetings, Balázs |
|
From: Ioannis V. <iv...@em...> - 2003-07-07 11:19:20
|
In a newsgroup out there there was a girl who wanted to see the
representation of a given double in her system. All others provided low
level messy stuff involving & operators etc.
I provided the code:
#include <iostream>
#include <bitset>
#include <limits>
int main()
{
using namespace std;
double d=3D1;
unsigned char *p=3Dreinterpret_cast<unsigned char *>(&d);
// There are systems where 1 byte is more than 8 bits
bitset<numeric_limits<unsigned char>::digits> byte;
for(unsigned i=3D0; i<sizeof(d); ++i)
{
byte=3Dp[i];
for(unsigned j=3D0; j<byte.size(); ++j)
cout<<byte[j];=20
}
=20
cout<<endl;
}
However it seems to be printed in the opposite way (try making d an =
unsigned
char). Perhaps it is the way it is implemented in the system, or I am =
taking
something in the opposite way that I can't find out?
Ioannis Vranos
=20
* Programming pages: http://www.noicys.freeurl.com
* Alternative URL 1: http://run.to/noicys
* Alternative URL 2: http://www.noicys.cjb.net
|
|
From: Ioannis V. <iv...@em...> - 2003-07-07 10:49:55
|
> I'd also like to see a correct Reply-To in the header. There is > List-Post: <mailto:dev...@li...> > in the header, but my E-Mail client can't deal with that. Use the reply-to-all functionalit of your email client. Regarding the "bug" I do not know either why it exists. There has been an active discussion regarding the matter long ago, but I do not remember what was said. :-) Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL 1: http://run.to/noicys * Alternative URL 2: http://www.noicys.cjb.net |
|
From: Ioannis V. <iv...@em...> - 2003-07-07 10:47:25
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf Of Provic > Sent: Monday, July 07, 2003 11:59 AM > To: dev...@li... > Subject: [Dev-C++] FILE positionning problem. > > > Hi ! > My current problem is a little weird : I read in the man-pages that > fgetc increases automatically the position in a current opened file. > So my program reads each character of this file in a while : > it should > do that, but in fact it doesn't. > I resolved that by repositionning each time by fseek (param : > SEEK_SET) > at the right position ; but a file access monitoring daemon showed me > that my program isn't optimised at all, it performs 2 fseek which are > exactly the sames... > Where is the bug ? > I verified my code, no need to include it : no pb here. I think you had better post your code. :) Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL 1: http://run.to/noicys * Alternative URL 2: http://www.noicys.cjb.net |
|
From: <al...@ne...> - 2003-07-07 09:00:55
|
Hello Michal, Saturday, July 5, 2003, 10:18:10 PM, you wrote: > 2 admin: why isn't this mailing list setting correctly Reply-To header? > Can you, please, do something with it? I'd also like to see a correct Reply-To in the header. There is List-Post: <mailto:dev...@li...> in the header, but my E-Mail client can't deal with that. Thanks, Alex |
|
From: Provic <pr...@wa...> - 2003-07-07 08:57:49
|
Hi ! My current problem is a little weird : I read in the man-pages that fgetc increases automatically the position in a current opened file. So my program reads each character of this file in a while : it should do that, but in fact it doesn't. I resolved that by repositionning each time by fseek (param : SEEK_SET) at the right position ; but a file access monitoring daemon showed me that my program isn't optimised at all, it performs 2 fseek which are exactly the sames... Where is the bug ? I verified my code, no need to include it : no pb here. I would be pleased if you could help me ! Thanks a lot ! Hervé |
|
From: R. D. F. <ro...@ch...> - 2003-07-07 01:22:09
|
I just downloaded the recent beta of dev-cpp. I am on W98se. The linker says that .eh_frame+0x11 in my object file wants something called ___gxx_personality_v0 . My program is a short and simple hex dump console program in C . Can someone give me a hint? -- The Bear At Home R. D. Flowers |
|
From: Ioannis V. <iv...@em...> - 2003-07-06 11:17:39
|
> -----Original Message----- > From: dev...@li...=20 > [mailto:dev...@li...] On Behalf=20 > Of Michal Molhanec > Sent: Sunday, July 06, 2003 12:07 PM > To: dev...@li... > Subject: Re: [Dev-C++] Super charging the string class >=20 >=20 > ok, i've never did serious comparation but c++ lib in gcc2 was really=20 > terrible. recently i was updating some lib, written=20 > originally for gcc2,=20 > where was a class derived from streambuf and iostream, and i=20 > must have=20 > one code both for vc6 and gcc3 and different for gcc2. if we look at=20 > stl: vector in gcc2 lacks even the at() method! Yes it did, I remember that. However I never use vector<>::at() anyway. = :-) However VC++ missed things from the standard library which I do not = remember now, mainly because I was not using vc++ for C++. =20 > > better since VC++ 6 had also wrong language rules (like=20 > the wrong scope of > > temporary variables inside a for loop). >=20 > if i remember correctly this you can change by disabling language=20 > extensions (the problem is that than you won't be able to=20 > include some=20 > header files :-) ) Anyway with the existence of VC++ 2002/2003 and GCC 3.x we can forget = the bitter past (unless we have to work with VC++ 6/GCC 2.x nowadays). Ioannis Vranos =20 * Programming pages: http://www.noicys.freeurl.com * Alternative URL 1: http://run.to/noicys * Alternative URL 2: http://www.noicys.cjb.net |
|
From: Graham D. <g.d...@nt...> - 2003-07-06 09:28:53
|
The standard itself can be hard to wade through, since it's written formally, with the intent of being unambiguous (it doesn't always succeed!). I disagree that it's targetted at compiler writers: certainly it's of utmost importance to them, but to say that that's it's purpose.... no - the standard is there as an arbiter, since it is, by definition, always correct. And it behooves anyone who calls themself a professional to be familiar with the rules and regulations of the language they use. I use it mostly as a reference in cases of confusion or dispute - my first port of call is usually Meyers or Sutter or Stroustrup. For looking up what is and isn't in the standard library, the Standard is perfect, since you only have to check the section headings. David McKen wrote: > Quote from the C++ black book > > "NOTE: The ANSI/ISO C++ standard itself is really targeted for those > who want to create C++ compilers, and you might find it hard to wade > through." > > End quote > > ----- Original Message ----- > *From:* Graham Douglas <mailto:g.d...@nt...> > *Cc:* Dev-Cpp Mailing List > <mailto:dev...@li...> > *Sent:* Saturday, July 05, 2003 6:46 PM > *Subject:* Re: [Dev-C++] Super charging the string class > > The definitive source of course is the ISO C++ standard. You can > get a PDF copy of this for $18 from the ANSI store at > www.ansi.org <http://www.ansi.org> (follow the "Standards Store" > link). > > The books by Nicolia Josuttis and by Matthew Austern both provide > good reference material (sorry, I can't remember the titles > offhand, but a search on amazon should produce fairly obvious > results). > > David McKen wrote: > >> Ok what is a good refrence for the STL then? >> >> I have been using SGI web site and there is no warning (that I >> saw) saying that the hash_* containers and functions are not part >> of the STL standard (or the ANSI C++ standard). I did see the >> warning about bitvectors being taken out but nothing about hash_* >> >> ----- Original Message ----- >> *From:* Ioannis Vranos <mailto:iv...@em...> >> *To:* 'Dev-Cpp Mailing List' >> <mailto:dev...@li...> >> *Sent:* Saturday, July 05, 2003 3:52 PM >> *Subject:* RE: [Dev-C++] Super charging the string class >> >> -----Original Message----- >> *From:* dev...@li... >> <mailto:dev...@li...> >> [mailto:dev...@li...] *On Behalf >> Of *David McKen >> *Sent:* Saturday, July 05, 2003 6:50 PM >> *To:* Dev-Cpp Mailing List >> *Subject:* Fw: [Dev-C++] Super charging the string class >> >> Unfortunately I am using the Visual C++ implementation of >> the Standard C++ library (Visual C++ 6.0 Service pack 5).* * >> >> ** >> *It is sure that it will change at some time.* >> ** >> >> My chief concern is the fact that the entire hash_* >> functions* * >> >> ** >> *The standard library has not any hash function. However the >> upcoming C++0x standard will have.* >> ** >> >> and containers are missing (this may seem small but as >> I said earlier my program is quite heavy on text >> processing, so hashing is quite important to me.)* * >> >> ** >> ** >> *Yes. And VC++ 6 is too old (eons in computer age). Oh well, >> anyway. :-)* >> ** >> ** >> * >> >> >> >> >> >> Ioannis Vranos >> >> * Programming pages: http://www.noicys.freeurl.com >> <http://www.noicys.freeurl.com/> >> * Alternative URL 1: http://run.to/noicys >> * Alternative URL 2: http://www.noicys.cjb.net >> <http://www.noicys.cjb.net/> >> >> * >> >> ------------------------------------------------------------------------ >> Do you Yahoo!? >> SBC Yahoo! DSL >> <http://pa.yahoo.com/*http://rd.yahoo.com/evt=1207/*http://promo..yahoo.com/sbc/> >> - Now only $29.95 per month! > > ------------------------------------------------------------------------ > Do you Yahoo!? > SBC Yahoo! DSL > <http://pa.yahoo.com/*http://rd.yahoo.com/evt=1207/*http://promo.yahoo.com/sbc/> > - Now only $29.95 per month! |
|
From: Michal M. <mi...@mo...> - 2003-07-06 09:06:50
|
Ioannis Vranos wrote: >>From what I remember we could consider them as equal (each one supporting > features of the C++ standard library the other did not). However GCC 2.x was ok, i've never did serious comparation but c++ lib in gcc2 was really terrible. recently i was updating some lib, written originally for gcc2, where was a class derived from streambuf and iostream, and i must have one code both for vc6 and gcc3 and different for gcc2. if we look at stl: vector in gcc2 lacks even the at() method! > better since VC++ 6 had also wrong language rules (like the wrong scope of > temporary variables inside a for loop). if i remember correctly this you can change by disabling language extensions (the problem is that than you won't be able to include some header files :-) ) |
|
From: Ioannis V. <iv...@em...> - 2003-07-06 07:30:40
|
Excellent references are: =20 1) The C++ standard itself which is sold at the ANSI or ISO web sites. =20 http://www.rgai.hu/~beszedes/munka/ =20 =20 2) "The C++ Programming Language" 3rd Edition or Special Edition by = Bjarne Stroustrup (the creator of C++), which is best to read it cover to cover than just having it only for reference. =20 =20 =20 =20 =20 =20 Ioannis Vranos * Programming pages: <http://www.noicys.freeurl.com/> http://www.noicys.freeurl.com * Alternative URL 1: <http://run.to/noicys> http://run.to/noicys * Alternative URL 2: <http://www.noicys.cjb.net/> = http://www.noicys.cjb.net =20 -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of David = McKen Sent: Sunday, July 06, 2003 1:23 AM To: Dev-Cpp Mailing List Subject: Re: [Dev-C++] Super charging the string class Ok what is a good refrence for the STL then? =20 I have been using SGI web site and there is no warning (that I saw) = saying that the hash_* containers and functions are not part of the STL = standard (or the ANSI C++ standard). I did see the warning about bitvectors being taken out but nothing about hash_* ----- Original Message -----=20 From: Ioannis Vranos <mailto:iv...@em...> =20 To: 'Dev-Cpp Mailing List' <mailto:dev...@li...> = Sent: Saturday, July 05, 2003 3:52 PM Subject: RE: [Dev-C++] Super charging the string class -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of David = McKen Sent: Saturday, July 05, 2003 6:50 PM To: Dev-Cpp Mailing List Subject: Fw: [Dev-C++] Super charging the string class Unfortunately I am using the Visual C++ implementation of the Standard = C++ library (Visual C++ 6.0 Service pack 5).=20 =20 It is sure that it will change at some time. =20 My chief concern is the fact that the entire hash_* functions=20 =20 The standard library has not any hash function. However the upcoming = C++0x standard will have. =20 and containers are missing (this may seem small but as I said earlier = my program is quite heavy on text processing, so hashing is quite important = to me.)=20 =20 =20 Yes. And VC++ 6 is too old (eons in computer age). Oh well, anyway. :-) =20 =20 =20 =20 Ioannis Vranos * Programming pages: <http://www.noicys.freeurl.com/> http://www.noicys.freeurl.com * Alternative URL 1: <http://run.to/noicys> http://run.to/noicys * Alternative URL 2: <http://www.noicys.cjb.net/> = http://www.noicys.cjb.net _____ =20 Do you Yahoo!? SBC <http://pa.yahoo.com/*http://rd.yahoo.com/evt=3D1207/*http://promo.yahoo.= com/s bc/> Yahoo! DSL - Now only $29.95 per month! |
|
From: Ioannis V. <iv...@em...> - 2003-07-06 07:24:15
|
> -----Original Message----- > From: dev...@li...=20 > [mailto:dev...@li...] On Behalf=20 > Of Michal Molhanec > Sent: Saturday, July 05, 2003 11:16 PM > To: dev...@li... > Subject: Re: [Dev-C++] Super charging the string class >=20 >=20 > Per Westermark wrote: >=20 > > Feature-wise, VC6 was old when it was released. >=20 > but the c++ library is still better than in gcc 2 (ok in gcc=20 > 3 is superb) From what I remember we could consider them as equal (each one = supporting features of the C++ standard library the other did not). However GCC 2.x = was better since VC++ 6 had also wrong language rules (like the wrong scope = of temporary variables inside a for loop). VC++ 2003 and GCC 3.x are great in terms of standard compliance. Ioannis Vranos =20 * Programming pages: http://www.noicys.freeurl.com * Alternative URL 1: http://run.to/noicys * Alternative URL 2: http://www.noicys.cjb.net >=20 > 2 David: IMHO you can use STLport or SGI's STL under VC6 >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_06 1203_01/01 _______________________________________________ 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: Nathan S. <cat...@do...> - 2003-07-06 03:11:42
|
Yes the ':' operator in this instance just defines the initialization lis=
t.
Init lists can be used on any form of constructor to my knowledge, not ju=
st
for composed classes. Hence, they can be used to initialize data members =
of
that object.
Nathan.
----- Original Message -----
From: "Juliano P=E1vel Brasil Cust=F3dio" <jp...@bo...>
To: <dev...@li...>
Sent: Sunday, July 06, 2003 5:34 AM
Subject: [Dev-C++] Re: ":" Operator
Never mind... I've found it on the net. It can be also used to
initialize contained objetcts of a class... Is that right?
|
|
From: <eas...@t-...> - 2003-07-06 00:14:09
|
Hello everybody, I am using dev-c++ 4.9.8.0 and trying to integrate gettext in my app. Under linux it thiese two command lines should be used. xgettext -k_ german.c -o german.po msgfmt -o german.mo german.po But how should I do it using dev-c++?? Where should I add these two lines ?? Thanks , Martin |