Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Stroustrup section 5.5 "vector of struct"

Reply
Thread Tools

Stroustrup section 5.5 "vector of struct"

 
 
Alf P. Steinbach
Guest
Posts: n/a
 
      11-08-2006
* arnuld:
>> BobR wrote:

>
>> What evidence do you have that it is an 'int'?

>
> becuase i get plain 2 ( not 2.0 )


The presentation does not tell you anything about the type.

Also, in the case of floating point it only tells you the value
/approximately/, because the internal representation of a floating point
number is finite, and thus cannot represent all numbers exactly.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
 
Reply With Quote
 
 
 
 
arnuld
Guest
Posts: n/a
 
      11-08-2006
> Alf P. Steinbach wrote:
> The presentation does not tell you anything about the type.




> Also, in the case of floating point it only tells you the value
> /approximately/, because the internal representation of a floating point
> number is finite, and thus cannot represent all numbers exactly.


OK, now i got it

thanks Alf

> A: Because it messes up the order in which people normally read text.
> Q: Why is it such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing on usenet and in e-mail?


these signatures taught me how irritating a top-post is. i never did
that since i read your signatures some months ago. thanks for putting
them.

[OT]
BTW, how can i put my signatures in my post so that they appear
everytime automatically. i googled for it, i have signatures in my
gmail but i am not able to know how to do the same at newsgroups.
[/OT]

 
Reply With Quote
 
 
 
 
BobR
Guest
Posts: n/a
 
      11-08-2006

arnuld wrote in message ...
>> BobR wrote:

>
>BTW, what is the "type" of "2" (the output i got)?


char.

>
>this is the output from "g++ 4.1.1 on BLAG Linux":
>-------------------------------------------------------------------
>[arnuld@localhost ~]$ ./a.out
>d1 = 8126000000.00000000000000000000
>d1 = 8.1e+09
>d1 = 8.126e+09
>[arnuld@localhost ~]$
>---------------------------------------------------------------------
>
>you have used what "Amit" told to me: / cout.precision(n) / with your
>mysterious / cout.setf( std::ios_base::fixed ); /
>


Doc: "The GNU C++ Iostream Library"
"Choices in formatting"
"Changing stream properties using manipulators"

'setf()' is Set Flags.

--
Bob R
POVrookie


 
Reply With Quote
 
Default User
Guest
Posts: n/a
 
      11-08-2006
arnuld wrote:


> [OT]
> BTW, how can i put my signatures in my post so that they appear
> everytime automatically. i googled for it, i have signatures in my
> gmail but i am not able to know how to do the same at newsgroups.
> [/OT]



Google Groups does not have that capability, along with many other
features of a real newsreading system. A possible remedy is to get
access to a genuine newsfeed, and then use the newsreader (there are
many available) that has the features you desire.

Your ISP may provide access to a news server. If not, an inexpensive
alternative is http://news.individual.net (the German server), which
costs 10 euro per year (about $13 US currently) for access to text
newsgroups.

There are some free ones. Generally their reliability and retention
aren't as good as NIN, but they are worth looking into if you don't
want to pay.




Brian
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stroustrup section 1.5.4, word counting arnuld C Programming 3 03-10-2007 01:55 AM
Stroustrup exercise 7 section 5.9 (using struct) arnuld C++ 6 11-08-2006 04:40 PM
Stroustrup exercise 7 section 5.9 (using arrays) arnuld C++ 2 11-08-2006 03:18 PM
Stroustrup section 2.5.1 arnuld C++ 3 10-31-2006 06:26 PM
Stroustrup ch2 section 2.3.2 example arnuld C++ 7 10-30-2006 06:51 PM



Advertisments