dev-cpp-users Mailing List for Dev-C++
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
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
1
(5) |
2
(2) |
3
(5) |
4
(5) |
|
5
(5) |
6
(9) |
7
(6) |
8
(10) |
9
(5) |
10
(3) |
11
(6) |
|
12
(5) |
13
(3) |
14
(6) |
15
(1) |
16
(2) |
17
(5) |
18
(1) |
|
19
(3) |
20
(2) |
21
(3) |
22
(13) |
23
(4) |
24
(8) |
25
(5) |
|
26
(1) |
27
(11) |
28
(7) |
29
(10) |
30
(12) |
|
|
|
From: Michal M. <mi...@mo...> - 2005-06-30 17:08:05
|
Fábio Emilio Costa wrote: > I don't know if anyone has perceived it, but libintl DevPak come without > xgettext utility, so we cannot extract and merge hte string files for > internacionalization. Why? Where could I obtain xgettext? e.g. http://prdownloads.sourceforge.net/gnuwin32/gettext-0.14.4-bin.zip and install it using PackMan -- Regards, Michal ICQ# 175762750 |
|
From: Per W. <pw...@ia...> - 2005-06-30 16:54:48
|
std::xx is for symbols declared inside of the std namespace. Your own
operator is definitely not defined in the std namespace - and you should
never try to define anyting in that namespace. It is only used for
standardized variables, types, methods etc.
You only add the xx:: prefix to a symbol when referencing symbols outside
of the current namespace or any namespace you have specifically said you
are using.
If you don't use any namespaces yourself, just write:
friend std::ostream& operator<<(std::ostream&,const jme::Money&);
std::ostream& operator<<(std::ostream& os,const jme::Money& obj) {
...
}
If the operator was defined within the jme namespace, then you have to
also do the friend declaration specifying:
friend std::ostream& jme::operator<<(std::ostream&,const jme::Money&);
and somewhere else specify the implementation within the jme namespace:
:
namespace jme {
std::ostream& operator<<(std::ostream& os,const Money&) {
...
}
}
/Per W
On Thu, 30 Jun 2005 jal...@go... wrote:
> Yes, I just notice that, so this are the changes I have made:
>
> --- Money.hpp
> friend std::ostream& std::operator<<( std::ostream&, const jme::Money& );
> friend std::istream& std::operator>>( std::istream&, jme::Money& );
>
>
> --- Money.cpp
> std::operator<<( std::ostream& os, const jme::Money& obj ) {
> os << obj.getAmount();
> return os;
> }
> std::istream&
> std::operator>>( std::istream& is, jme::Money& obj ) {
> is >> obj.amount;
> return is;
> }
> --------------
> But this is giving me linker errors sayng:
>
>
> ========= ERROR ===========
> In file included from money.cpp:2:
> money.hpp:67: error: `std::ostream& std::operator<<(std::ostream&, const
> jme::Money&)' should have been declared inside `std'
> money.hpp:68: error: `std::istream& std::operator>>(std::istream&,
> jme::Money&)' should have been declared inside `std'
>
>
> What am I doing wrong!!?
>
> Again thanks for you help.
>
>
>
>
> > What namespaces are you using.
> >
> > You have declared the friend operator as:
> > std::ostream& operator<<(...)
> > and implemented it as:
> > std::ostream& jme::operator<<(...)
> >
> > Without a maching output operator, the compiler will emit the pointer to
> > the object instead.
> >
> > /Per W
> >
> > On Thu, 30 Jun 2005 jal...@go... wrote:
> >
> >> In my class, when I use the "getter" to display the value I get the
> >> right
> >> output, but when I try using the overloaded extractor operator (<<) I
> >> get
> >> some hex value displayed. Here is some of the code:
> >> --- snip
> >> Main.cpp
> >> int main() {
> >> Money money("12.21");
> >>
> >> std::cout << "Value is: " << money.getAmount() << std::endl; // 12.21
> >> std::cout << "Value is: " << money << std::endl; // hex value????
> >> return 0;
> >> }
> >>
> >>
> >>
> >> The class goes like this:
> >> ---snip
> >> Money.hpp
> >> class Money {
> >> protected:
> >> float amount; //!< This variable holds the numerical value
> >> public:
> >> //! Constor
> >> Money(const std::string&);
> >>
> >> //!Copy constructor
> >> Money( const Money& );
> >>
> >> //!Destructor
> >> ~Money() { std::cout << amount << std::endl;} //<<=== 12.21
> >>
> >> // Setters
> >> ...
> >> // Getters
> >> const float getAmount() const;
> >>
> >> // Overloaded operators
> >> .....
> >> friend std::ostream& operator<<( std::ostream&, const jme::Money& );
> >> friend std::istream& operator>>( std::istream&, jme::Money& );
> >> ....
> >> } ; //Money
> >>
> >>
> >>
> >> and the code looks like this
> >> --- snip
> >> jme::Money::Money( const std::string& x){
> >> this->setAmount(x); // this metho converts the std::string to a
> >> float
> >> }
> >> const float jme::Money::getAmount() const {
> >> return this->amount;
> >> }
> >> std::ostream&
> >> jme::operator<<( std::ostream& os, const jme::Money& obj ) {
> >> os << obj.getAmount(); //<<==== 0x4b1120
> >> return os;
> >> }
> >> ----- end of snip
> >> As you can see when using the member method getAmount() the value
> >> displayed is in the right format, however the extractor operator is not
> >> doing
|
|
From: Franziska E. <fra...@ya...> - 2005-06-30 16:09:32
|
hi...
you should remove the std:: before operator:
--- Money.hpp
friend ostream& std::operator<<( std::ostream&, const jme::Money& );
friend istream& std::operator>>( std::istream&, jme::Money& );
--- Money.cpp
operator<<( std::ostream& os, const jme::Money& obj ) {
os << obj.getAmount();
return os;
}
std::istream&
operator>>( std::istream& is, jme::Money& obj ) {
is >> obj.amount;
return is;
}
>Yes, I just notice that, so this are the changes I have made:
>
>--- Money.hpp
>friend std::ostream& std::operator<<( std::ostream&, const jme::Money& );
>friend std::istream& std::operator>>( std::istream&, jme::Money& );
>
>
>--- Money.cpp
>std::operator<<( std::ostream& os, const jme::Money& obj ) {
> os << obj.getAmount();
> return os;
>}
>std::istream&
>std::operator>>( std::istream& is, jme::Money& obj ) {
> is >> obj.amount;
> return is;
>}
>--------------
>But this is giving me linker errors sayng:
>
>
>========= ERROR ===========
>In file included from money.cpp:2:
>money.hpp:67: error: `std::ostream& std::operator<<(std::ostream&, const
>jme::Money&)' should have been declared inside `std'
>money.hpp:68: error: `std::istream& std::operator>>(std::istream&,
>jme::Money&)' should have been declared inside `std'
>
>
>What am I doing wrong!!?
>
>Again thanks for you help.
>
>
>
>
>
>
>>What namespaces are you using.
>>
>>You have declared the friend operator as:
>> std::ostream& operator<<(...)
>>and implemented it as:
>> std::ostream& jme::operator<<(...)
>>
>>Without a maching output operator, the compiler will emit the pointer to
>>the object instead.
>>
>>/Per W
>>
>>On Thu, 30 Jun 2005 jal...@go... wrote:
>>
>>
>>
>>>In my class, when I use the "getter" to display the value I get the
>>>right
>>>output, but when I try using the overloaded extractor operator (<<) I
>>>get
>>>some hex value displayed. Here is some of the code:
>>>--- snip
>>>Main.cpp
>>>int main() {
>>> Money money("12.21");
>>>
>>> std::cout << "Value is: " << money.getAmount() << std::endl; // 12.21
>>> std::cout << "Value is: " << money << std::endl; // hex value????
>>> return 0;
>>>}
>>>
>>>
>>>
>>>The class goes like this:
>>>---snip
>>>Money.hpp
>>>class Money {
>>> protected:
>>> float amount; //!< This variable holds the numerical value
>>> public:
>>> //! Constor
>>> Money(const std::string&);
>>>
>>> //!Copy constructor
>>> Money( const Money& );
>>>
>>> //!Destructor
>>> ~Money() { std::cout << amount << std::endl;} //<<=== 12.21
>>>
>>> // Setters
>>> ...
>>> // Getters
>>> const float getAmount() const;
>>>
>>> // Overloaded operators
>>> .....
>>> friend std::ostream& operator<<( std::ostream&, const jme::Money& );
>>> friend std::istream& operator>>( std::istream&, jme::Money& );
>>> ....
>>>} ; //Money
>>>
>>>
>>>
>>>and the code looks like this
>>>--- snip
>>>jme::Money::Money( const std::string& x){
>>> this->setAmount(x); // this metho converts the std::string to a
>>>float
>>>}
>>>const float jme::Money::getAmount() const {
>>> return this->amount;
>>>}
>>>std::ostream&
>>>jme::operator<<( std::ostream& os, const jme::Money& obj ) {
>>> os << obj.getAmount(); //<<==== 0x4b1120
>>> return os;
>>>}
>>>----- end of snip
>>>As you can see when using the member method getAmount() the value
>>>displayed is in the right format, however the extractor operator is not
>>>doing
>>>
>>>
>>
>>-------------------------------------------------------
>>SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
>>from IBM. Find simple to follow Roadmaps, straightforward articles,
>>informative Webcasts and more! Get everything you need to get up to
>>speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
>>_______________________________________________
>>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
>>
>>
>>
>
>
>
>-------------------------------------------------------
>SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
>from IBM. Find simple to follow Roadmaps, straightforward articles,
>informative Webcasts and more! Get everything you need to get up to
>speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
>_______________________________________________
>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
>
>
>
>
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
|
|
From: <fab...@ya...> - 2005-06-30 15:47:24
|
Hello! I don't know if anyone has perceived it, but libintl DevPak come without xgettext utility, so we cannot extract and merge hte string files for internacionalization. Why? Where could I obtain xgettext? Obrigado! Fabio Emilio Costa Borda da Mata - MG - Brazil ICQ #:173799674 fab...@ya... Nick:SamWeasley MSN: huf...@ho... Jabber: Sam...@ja... Yahoo! Messenger:hufflepuff0305 Linux User #328087 (counter.li.org) Orkut Profile: www.orkut.com/Profile.aspx?uid=16619557238254357700 "Copie. Seja Legal. Não seja trouxa! Use Software Livre!" --------------------------------- Yahoo! Acesso Grátis: Internet rápida e grátis. Instale o discador agora! |
|
From: <jal...@go...> - 2005-06-30 15:09:22
|
Yes, I just notice that, so this are the changes I have made:
--- Money.hpp
friend std::ostream& std::operator<<( std::ostream&, const jme::Money& );
friend std::istream& std::operator>>( std::istream&, jme::Money& );
--- Money.cpp
std::operator<<( std::ostream& os, const jme::Money& obj ) {
os << obj.getAmount();
return os;
}
std::istream&
std::operator>>( std::istream& is, jme::Money& obj ) {
is >> obj.amount;
return is;
}
--------------
But this is giving me linker errors sayng:
=3D=3D=3D=3D=3D=3D=3D=3D=3D ERROR =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
In file included from money.cpp:2:
money.hpp:67: error: `std::ostream& std::operator<<(std::ostream&, const
jme::Money&)' should have been declared inside `std'
money.hpp:68: error: `std::istream& std::operator>>(std::istream&,
jme::Money&)' should have been declared inside `std'
What am I doing wrong!!?
Again thanks for you help.
> What namespaces are you using.
>
> You have declared the friend operator as:
> std::ostream& operator<<(...)
> and implemented it as:
> std::ostream& jme::operator<<(...)
>
> Without a maching output operator, the compiler will emit the pointer t=
o
> the object instead.
>
> /Per W
>
> On Thu, 30 Jun 2005 jal...@go... wrote:
>
>> In my class, when I use the "getter" to display the value I get the
>> right
>> output, but when I try using the overloaded extractor operator (<<) I
>> get
>> some hex value displayed. Here is some of the code:
>> --- snip
>> Main.cpp
>> int main() {
>> Money money("12.21");
>>
>> std::cout << "Value is: " << money.getAmount() << std::endl; // 12.=
21
>> std::cout << "Value is: " << money << std::endl; // hex value????
>> return 0;
>> }
>>
>>
>>
>> The class goes like this:
>> ---snip
>> Money.hpp
>> class Money {
>> protected:
>> float amount; //!< This variable holds the numerical value
>> public:
>> //! Constor
>> Money(const std::string&);
>>
>> //!Copy constructor
>> Money( const Money& );
>>
>> //!Destructor
>> ~Money() { std::cout << amount << std::endl;} //<<=3D=3D=3D 12.21
>>
>> // Setters
>> ...
>> // Getters
>> const float getAmount() const;
>>
>> // Overloaded operators
>> .....
>> friend std::ostream& operator<<( std::ostream&, const jme::Money& )=
;
>> friend std::istream& operator>>( std::istream&, jme::Money& );
>> ....
>> } ; //Money
>>
>>
>>
>> and the code looks like this
>> --- snip
>> jme::Money::Money( const std::string& x){
>> this->setAmount(x); // this metho converts the std::string to a
>> float
>> }
>> const float jme::Money::getAmount() const {
>> return this->amount;
>> }
>> std::ostream&
>> jme::operator<<( std::ostream& os, const jme::Money& obj ) {
>> os << obj.getAmount(); //<<=3D=3D=3D=3D 0x4b1120
>> return os;
>> }
>> ----- end of snip
>> As you can see when using the member method getAmount() the value
>> displayed is in the right format, however the extractor operator is no=
t
>> doing
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dcl=
ick
> _______________________________________________
> 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: Scott S. <ssi...@sp...> - 2005-06-30 14:54:33
|
Salvatore Lionetti wrote: >Hi, >my name's Salvatore and i write you from Italy. >please: > where are stored information about >Tools->CompilersOptions->Compilers? > >Thank you for your attention, >have a good day > > > > > > > >___________________________________ >Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB >http://mail.yahoo.it > > >------------------------------------------------------- >SF.Net email is sponsored by: Discover Easy Linux Migration Strategies >from IBM. Find simple to follow Roadmaps, straightforward articles, >informative Webcasts and more! Get everything you need to get up to >speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click >_______________________________________________ >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 > > > On Windows XP, C:\Documents and Settings\Your User Name\Application Data\Dev-Cpp\devcpp.cfg. -- ~~Scott Simontis~~ ssi...@sp... |
|
From: Per W. <pw...@ia...> - 2005-06-30 13:26:05
|
What namespaces are you using.
You have declared the friend operator as:
std::ostream& operator<<(...)
and implemented it as:
std::ostream& jme::operator<<(...)
Without a maching output operator, the compiler will emit the pointer to
the object instead.
/Per W
On Thu, 30 Jun 2005 jal...@go... wrote:
> In my class, when I use the "getter" to display the value I get the right
> output, but when I try using the overloaded extractor operator (<<) I get
> some hex value displayed. Here is some of the code:
> --- snip
> Main.cpp
> int main() {
> Money money("12.21");
>
> std::cout << "Value is: " << money.getAmount() << std::endl; // 12.21
> std::cout << "Value is: " << money << std::endl; // hex value????
> return 0;
> }
>
>
>
> The class goes like this:
> ---snip
> Money.hpp
> class Money {
> protected:
> float amount; //!< This variable holds the numerical value
> public:
> //! Constor
> Money(const std::string&);
>
> //!Copy constructor
> Money( const Money& );
>
> //!Destructor
> ~Money() { std::cout << amount << std::endl;} //<<=== 12.21
>
> // Setters
> ...
> // Getters
> const float getAmount() const;
>
> // Overloaded operators
> .....
> friend std::ostream& operator<<( std::ostream&, const jme::Money& );
> friend std::istream& operator>>( std::istream&, jme::Money& );
> ....
> } ; //Money
>
>
>
> and the code looks like this
> --- snip
> jme::Money::Money( const std::string& x){
> this->setAmount(x); // this metho converts the std::string to a float
> }
> const float jme::Money::getAmount() const {
> return this->amount;
> }
> std::ostream&
> jme::operator<<( std::ostream& os, const jme::Money& obj ) {
> os << obj.getAmount(); //<<==== 0x4b1120
> return os;
> }
> ----- end of snip
> As you can see when using the member method getAmount() the value
> displayed is in the right format, however the extractor operator is not
> doing
|
|
From: Salvatore L. <sal...@ya...> - 2005-06-30 13:09:22
|
Hi, my name's Salvatore and i write you from Italy. please: where are stored information about Tools->CompilersOptions->Compilers? Thank you for your attention, have a good day ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it |
|
From: <jal...@go...> - 2005-06-30 12:32:45
|
In my class, when I use the "getter" to display the value I get the right
output, but when I try using the overloaded extractor operator (<<) I get
some hex value displayed. Here is some of the code:
--- snip
Main.cpp
int main() {
Money money("12.21");
std::cout << "Value is: " << money.getAmount() << std::endl; // 12.21
std::cout << "Value is: " << money << std::endl; // hex value????
return 0;
}
The class goes like this:
---snip
Money.hpp
class Money {
protected:
float amount; //!< This variable holds the numerical value
public:
//! Constor
Money(const std::string&);
//!Copy constructor
Money( const Money& );
//!Destructor
~Money() { std::cout << amount << std::endl;} //<<=3D=3D=3D 12.21
// Setters
...
// Getters
const float getAmount() const;
// Overloaded operators
.....
friend std::ostream& operator<<( std::ostream&, const jme::Money& );
friend std::istream& operator>>( std::istream&, jme::Money& );
....
} ; //Money
and the code looks like this
--- snip
jme::Money::Money( const std::string& x){
this->setAmount(x); // this metho converts the std::string to a float
}
const float jme::Money::getAmount() const {
return this->amount;
}
std::ostream&
jme::operator<<( std::ostream& os, const jme::Money& obj ) {
os << obj.getAmount(); //<<=3D=3D=3D=3D 0x4b1120
return os;
}
----- end of snip
As you can see when using the member method getAmount() the value
displayed is in the right format, however the extractor operator is not
doing the job I thought it would.
Can anybody tell me what I am doing wrong?
TIA
|
|
From: <jal...@go...> - 2005-06-30 12:30:28
|
In my class, when I use the "getter" to display the value I get the right
output, but when I try using the overloaded extractor operator (<<) I get
some hex value displayed. Here is some of the code:
--- snip
Main.cpp
int main() {
Money money("12.21");
std::cout << "Value is: " << money.getAmount() << std::endl; // 12.21
std::cout << "Value is: " << money << std::endl; // hex value????
return 0;
}
The class goes like this:
---snip
Money.hpp
class Money {
protected:
float amount; //!< This variable holds the numerical value
public:
//! Constor
Money(const std::string&);
//!Copy constructor
Money( const Money& );
//!Destructor
~Money() { std::cout << amount << std::endl;} //<<=3D=3D=3D 12.21
// Setters
...
// Getters
const float getAmount() const;
// Overloaded operators
.....
friend std::ostream& operator<<( std::ostream&, const jme::Money& );
friend std::istream& operator>>( std::istream&, jme::Money& );
....
} ; //Money
and the code looks like this
--- snip
jme::Money::Money( const std::string& x){
this->setAmount(x); // this metho converts the std::string to a float
}
const float jme::Money::getAmount() const {
return this->amount;
}
std::ostream&
jme::operator<<( std::ostream& os, const jme::Money& obj ) {
os << obj.getAmount(); //<<=3D=3D=3D=3D 0x4b1120
return os;
}
----- end of snip
As you can see when using the member method getAmount() the value
displayed is in the right format, however the extractor operator is not
doing the job I thought it would.
Can anybody tell me what I am doing wrong?
TIA
|
|
From: Scott S. <ssi...@sp...> - 2005-06-30 00:44:01
|
Jarren Long wrote: >Ok, I checked out nehe.gamedev.net and downloaded a buncha examples, >but I can't get any of them to compile. I seem to be missing glaux.h. >After scouring opengl.org for a download link, I gave up the search. >Can anyone give me a direct link to wherever I can get glaux.h? I > > >would be very appreciative! > There is a GLAux replacement you can download on his site from the front page. You can also get the original file from devpaks.org I believe. GLAux is used in the examples to load the image. However, you can also write your own code to do that, and I intend to do that. I believe it is covered in one of his later lessons. I have been trying to get back into OpenGL, so I will post any more info I can give you. -- ~~Scott Simontis~~ ssi...@sp... |
|
From: Jarren L. <vb...@gm...> - 2005-06-30 00:26:42
|
Ok, I checked out nehe.gamedev.net and downloaded a buncha examples, but I can't get any of them to compile. I seem to be missing glaux.h. After scouring opengl.org for a download link, I gave up the search. Can anyone give me a direct link to wherever I can get glaux.h? I would be very appreciative! --=20 Jarren L. |
|
From: Scott S. <ssi...@sp...> - 2005-06-29 23:44:28
|
Jarren Long wrote: >Hi all: > >I want to know if there is any way to rotate a bitmap using the win32 >api. I'm going to google it now, but I really don't think I'll get any >good results. > >Cheers! > > >------------------------------------------------------- >SF.Net email is sponsored by: Discover Easy Linux Migration Strategies >from IBM. Find simple to follow Roadmaps, straightforward articles, >informative Webcasts and more! Get everything you need to get up to >speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click >_______________________________________________ >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 > > > I don't know how to do it with win32, but I know how to do it with OpenGL... It would probably be a lot easier to use a graphics API. You then just need to draw a quad, use the image as a texture, and rotate the quad. Check out nehe.gamedev.net if you want some more info, or I can post an example program. -- ~~Scott Simontis~~ ssi...@sp... |
|
From: Jarren L. <vb...@gm...> - 2005-06-29 23:39:21
|
Hi all: I want to know if there is any way to rotate a bitmap using the win32 api. I'm going to google it now, but I really don't think I'll get any good results. Cheers! |
|
From: Per W. <pw...@ia...> - 2005-06-29 21:55:11
|
Just add the line: #include <shellapi.h> at the top of your source file. /Per W On Wed, 29 Jun 2005, Zac North wrote: > Oh, sorry, the other mailing lists I'm on have that set up automatically. > > I'm sorry, but I don't know what grep-recursive-ShellExecute-whatever is. > Could you please explain simply? > > -Zac > > On 6/29/05, Per Westermark <pw...@ia...> wrote: > > > > When responding to the list - remember to respond to all, or your posts > > won't reach the list... > > > > Anyway, while you seem to have a build error, your post only shows a > > warning about missing declaration of ShellExecute. > > > > If you do: > > grep --recursive ShellExecute > > in your include directories, you will notice the file shellapi.h. > > > > It might be an idea to make sure that you have a line: > > #include <shellapi.h> > > somewhere at the start of your source file. > > > > /Per W > > > > On Wed, 29 Jun 2005, Zac North wrote: > > > > > " C:\Dev-C++\ZMOffice\main.cpp > > > [Warning] In function `class string > > > > > ExecMainCommand(basic_string<char,string_char_traits<char>,__default_alloc_template<false,0> > > > >)': > > > 73 - C:\Dev-C++\ZMOffice\main.cpp > > > implicit declaration of function `int ShellExecute(...)' > > > C:\Dev-C++\ZMOffice\Makefile.win > > > [Build Error] [main.o] Error 1" > > > > > > Those are my errors, though I get different ones for no reason. > > > > > > -Zac > > > > > > On 6/29/05, Per Westermark <pw...@ia...> wrote: > > > > > > > > Recommendation: > > > > > > > > If your code doesn't compile, the compiler emits error messages. Cut > > these > > > > out and post to this list. > > > > > > > > If your code doesn't link, the linker will emit error messages. Cut > > these > > > > out and post to this list. > > > > > > > > Just about always when someone have done everything correct, there is > > > > still something done wrong. The MinGW compiler (DevC++ is just > > graphical > > > > environment - MinGW is the compiler) is not know to regularly fail to > > > > compile valid code. > > > > > > > > /Per W > > > > > > > > On Wed, 29 Jun 2005, Zac North wrote: > > > > > > > > > Hi, > > > > > > > > > > I am new to C++, and am using a "For Dummies," large book to learn > > it. > > > > So > > > > > far, I think Dev C++ is a great, free compiler and am enjoying using > > it, > > > > > but, for whatever reason, the command "ShellExecute()" is not > > working. > > > > > > > > > > I have all the parameters set correctly (I got mine from several > > > > different > > > > > online examples), but the script simply will not compile. It must be > > a > > > > > compile error with the ShellExecute or something, because it > > compiled > > > > fine > > > > > before that. I don't know why it's like this, because I did > > everything > > > > > correctly, there is no possible reason. > > > > > > > > > > Could someone tell me what could be wrong? > > > > > > > > > > Thanks, > > > > > > > > > > -Zac > > > > > > > > > > > > > > > > > > > > > |
|
From: Zac N. <zn...@gm...> - 2005-06-29 21:31:03
|
Oh, sorry, the other mailing lists I'm on have that set up automatically. I'm sorry, but I don't know what grep-recursive-ShellExecute-whatever is.= =20 Could you please explain simply? -Zac On 6/29/05, Per Westermark <pw...@ia...> wrote: >=20 > When responding to the list - remember to respond to all, or your posts > won't reach the list... >=20 > Anyway, while you seem to have a build error, your post only shows a > warning about missing declaration of ShellExecute. >=20 > If you do: > grep --recursive ShellExecute > in your include directories, you will notice the file shellapi.h. >=20 > It might be an idea to make sure that you have a line: > #include <shellapi.h> > somewhere at the start of your source file. >=20 > /Per W >=20 > On Wed, 29 Jun 2005, Zac North wrote: >=20 > > " C:\Dev-C++\ZMOffice\main.cpp > > [Warning] In function `class string > >=20 > ExecMainCommand(basic_string<char,string_char_traits<char>,__default_allo= c_template<false,0> > > >)': > > 73 - C:\Dev-C++\ZMOffice\main.cpp > > implicit declaration of function `int ShellExecute(...)' > > C:\Dev-C++\ZMOffice\Makefile.win > > [Build Error] [main.o] Error 1" > > > > Those are my errors, though I get different ones for no reason. > > > > -Zac > > > > On 6/29/05, Per Westermark <pw...@ia...> wrote: > > > > > > Recommendation: > > > > > > If your code doesn't compile, the compiler emits error messages. Cut= =20 > these > > > out and post to this list. > > > > > > If your code doesn't link, the linker will emit error messages. Cut= =20 > these > > > out and post to this list. > > > > > > Just about always when someone have done everything correct, there is > > > still something done wrong. The MinGW compiler (DevC++ is just=20 > graphical > > > environment - MinGW is the compiler) is not know to regularly fail to > > > compile valid code. > > > > > > /Per W > > > > > > On Wed, 29 Jun 2005, Zac North wrote: > > > > > > > Hi, > > > > > > > > I am new to C++, and am using a "For Dummies," large book to learn= =20 > it. > > > So > > > > far, I think Dev C++ is a great, free compiler and am enjoying usin= g=20 > it, > > > > but, for whatever reason, the command "ShellExecute()" is not=20 > working. > > > > > > > > I have all the parameters set correctly (I got mine from several > > > different > > > > online examples), but the script simply will not compile. It must b= e=20 > a > > > > compile error with the ShellExecute or something, because it=20 > compiled > > > fine > > > > before that. I don't know why it's like this, because I did=20 > everything > > > > correctly, there is no possible reason. > > > > > > > > Could someone tell me what could be wrong? > > > > > > > > Thanks, > > > > > > > > -Zac > > > > > > > > > > > > >=20 > |
|
From: Per W. <pw...@ia...> - 2005-06-29 20:09:20
|
When responding to the list - remember to respond to all, or your posts won't reach the list... Anyway, while you seem to have a build error, your post only shows a warning about missing declaration of ShellExecute. If you do: grep --recursive ShellExecute in your include directories, you will notice the file shellapi.h. It might be an idea to make sure that you have a line: #include <shellapi.h> somewhere at the start of your source file. /Per W On Wed, 29 Jun 2005, Zac North wrote: > " C:\Dev-C++\ZMOffice\main.cpp > [Warning] In function `class string > ExecMainCommand(basic_string<char,string_char_traits<char>,__default_alloc_template<false,0> > >)': > 73 - C:\Dev-C++\ZMOffice\main.cpp > implicit declaration of function `int ShellExecute(...)' > C:\Dev-C++\ZMOffice\Makefile.win > [Build Error] [main.o] Error 1" > > Those are my errors, though I get different ones for no reason. > > -Zac > > On 6/29/05, Per Westermark <pw...@ia...> wrote: > > > > Recommendation: > > > > If your code doesn't compile, the compiler emits error messages. Cut these > > out and post to this list. > > > > If your code doesn't link, the linker will emit error messages. Cut these > > out and post to this list. > > > > Just about always when someone have done everything correct, there is > > still something done wrong. The MinGW compiler (DevC++ is just graphical > > environment - MinGW is the compiler) is not know to regularly fail to > > compile valid code. > > > > /Per W > > > > On Wed, 29 Jun 2005, Zac North wrote: > > > > > Hi, > > > > > > I am new to C++, and am using a "For Dummies," large book to learn it. > > So > > > far, I think Dev C++ is a great, free compiler and am enjoying using it, > > > but, for whatever reason, the command "ShellExecute()" is not working. > > > > > > I have all the parameters set correctly (I got mine from several > > different > > > online examples), but the script simply will not compile. It must be a > > > compile error with the ShellExecute or something, because it compiled > > fine > > > before that. I don't know why it's like this, because I did everything > > > correctly, there is no possible reason. > > > > > > Could someone tell me what could be wrong? > > > > > > Thanks, > > > > > > -Zac > > > > > > > > |
|
From: Per W. <pw...@ia...> - 2005-06-29 18:57:09
|
Recommendation: If your code doesn't compile, the compiler emits error messages. Cut these out and post to this list. If your code doesn't link, the linker will emit error messages. Cut these out and post to this list. Just about always when someone have done everything correct, there is still something done wrong. The MinGW compiler (DevC++ is just graphical environment - MinGW is the compiler) is not know to regularly fail to compile valid code. /Per W On Wed, 29 Jun 2005, Zac North wrote: > Hi, > > I am new to C++, and am using a "For Dummies," large book to learn it. So > far, I think Dev C++ is a great, free compiler and am enjoying using it, > but, for whatever reason, the command "ShellExecute()" is not working. > > I have all the parameters set correctly (I got mine from several different > online examples), but the script simply will not compile. It must be a > compile error with the ShellExecute or something, because it compiled fine > before that. I don't know why it's like this, because I did everything > correctly, there is no possible reason. > > Could someone tell me what could be wrong? > > Thanks, > > -Zac > |
|
From: Zac N. <zn...@gm...> - 2005-06-29 18:51:27
|
Hi, I am new to C++, and am using a "For Dummies," large book to learn it. So= =20 far, I think Dev C++ is a great, free compiler and am enjoying using it,=20 but, for whatever reason, the command "ShellExecute()" is not working. I have all the parameters set correctly (I got mine from several different= =20 online examples), but the script simply will not compile. It must be a=20 compile error with the ShellExecute or something, because it compiled fine= =20 before that. I don't know why it's like this, because I did everything=20 correctly, there is no possible reason. Could someone tell me what could be wrong? Thanks, -Zac |
|
From: Spam A. <sp...@he...> - 2005-06-29 15:53:00
|
Fernando Lichtschein wrote: >(...) > >The only problem is the lack of online help, or good documentation. >Turbo C has an online help. The glibc documentation is too much for a >student (and translating and condensing it is too much for a teacher). > >I followed some links in this list but one was C++ (www.cplusplus.com) >which is not too bad since there is a good reference to the Standard >Library, and the Borland link is broken. > I learned C++ myself by lectures of F.B. Brokken, using his pretty complete reference on C++: http://www.icce.rug.nl/documents/ Regards, Hielke |
|
From: Scott S. <ssi...@sp...> - 2005-06-29 15:05:57
|
Fernando Lichtschein wrote: >Hello, > >I am teaching an introductory course on C (not C++) programming and I >have started using Dev-C++ two semesters ago. > >We have been previously using Turbo C++ which is an excellent >compiler but the user interface is outdated, and it is a licensed product, >so the students can not take it home like Dev-C++. The same thing >happens with VisualC++. > >The only problem is the lack of online help, or good documentation. >Turbo C has an online help. The glibc documentation is too much for a >student (and translating and condensing it is too much for a teacher). > >I followed some links in this list but one was C++ (www.cplusplus.com) >which is not too bad since there is a good reference to the Standard >Library, and the Borland link is broken. > >¿Is anybody using Dev-C++ for teaching? ¿Anyone in Spanish? We >could join forces. > >Best regards, > > > >------------------------------------------------------- >SF.Net email is sponsored by: Discover Easy Linux Migration Strategies >from IBM. Find simple to follow Roadmaps, straightforward articles, >informative Webcasts and more! Get everything you need to get up to >speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click >_______________________________________________ >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 > > > Looking around with google, I found this: The C Library Reference http://www.acm.uiuc.edu/webmonkeys/book/c_guide/ That might be what you are looking for, you will still have to translate it, though. -- ~~Scott~~ ssi...@sp... |
|
From: Fernando L. <li...@fi...> - 2005-06-29 13:47:23
|
Hello, I am teaching an introductory course on C (not C++) programming and I have started using Dev-C++ two semesters ago. We have been previously using Turbo C++ which is an excellent compiler but the user interface is outdated, and it is a licensed product,= so the students can not take it home like Dev-C++. The same thing happens with VisualC++. The only problem is the lack of online help, or good documentation. Turbo C has an online help. The glibc documentation is too much for a student (and translating and condensing it is too much for a teacher). I followed some links in this list but one was C++ (www.cplusplus.com) which is not too bad since there is a good reference to the Standard Library, and the Borland link is broken. =BFIs anybody using Dev-C++ for teaching? =BFAnyone in Spanish? We could join forces. Best regards, |
|
From: Euthymius S. <Eut...@fu...> - 2005-06-28 18:07:06
|
Hello, wide. And when the smoke of that discharge had lifted, the Englishwould be = for M. de Rivarol to garrison the fort, whilst Captaininsistent.men, and = the particular case against Peter Blood, whose indictmenteffort he made = to steady his voice it sounded harsh and unduly loud.captain had swept = from the Bahamas to the Windward Isles, from Newand crack of musketry = penetrating ever deeper into the town to showhim at the head of the = ladder.their starboard beam they saw the spray flung up by the shot, = whichprovide for a certain distribution of the spoil. My men demand = it.result of the dehumanizing life he lived. Then he noddedAwhile Peter = Blood remained standing there, where she left him,officer made a gesture = of helplessness, and, surrendering to hisBefore the men of the Royal = Mary had recovered from theirof a countenance that had been so = devil-may-care but a few momentsLevasseur stared at him foolishly agape. = Behind him pressed his |
|
From: Scott S. <ssi...@sp...> - 2005-06-28 15:58:02
|
mei_hua chen wrote: >Hi: > Could you tell me detaily . How to " pass the -O2 flag to the compiler " . >Thank you very much . > >-----Original Message----- >From: Scott Simontis [mailto:ssi...@sp...] >Sent: Tuesday, June 28, 2005 1:30 PM >To: mei_hua chen >Subject: Re: [Dev-C++] how to optimize my project > >mei_hua chen wrote: > > > >>hi all : >> >> Can you help me to give me a way to optimize my project . My >>project have many *.cpp files. How to optimize then to make my .exe >>file to to fast. Thank you !! >> >> > >Tools->Compiler Options, then go to the settings tab. You can find >optimization settings there, or you can just pass the -O2 flag to the >compiler. > >-- >~~Scott~~ >ssi...@sp... > > > > Go to Tools->Compiler Options again. This time, select the compiler tab. Check the box "add the following commands when calling the compiler", and add -O2 to the text box below. Or, if you want to optimize only your current project, go to Projet->Project Options, and select the parameters tab. Under compiler, add -O2. I am not sure about this, but I don't think it really makes a difference if you put the -O2 under Compiler or C++ Compiler in project options. -- ~~Scott~~ ssi...@sp... |
|
From: Per W. <pw...@ia...> - 2005-06-28 15:35:53
|
Easy come, easy goes. No, you can\t normally retrieve anything from the object file. Yes, there are disassemberls available but they are non-trivial to use and does not restore the source code. All they do is list the assembler instructions emited by the compiler. If you are good enough to read the assembler and understand the original source code then you are good enough to write the code once again... /Per W On Tue, 28 Jun 2005, Tim Whitehouse wrote: > I was "experimenting" with options with my g++ compiler when I > accidentally have lost my .cc file. I have the .o file. Is there any > way to turn the object code back into the source code? > |