GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 16-Mar-2010, 22:44
maz1986 maz1986 is offline
New Member
 
Join Date: Mar 2010
Posts: 1
maz1986 is on a distinguished road

Problems using the double datatype


Hi,

I'm having issues with some basic cpp. Basically when I try to use the double data type eg.

double d = 10;

then print the value of d to the screen it comes up as 0.

Any help would be greatly appreciated

Thanks,
  #2  
Old 17-Mar-2010, 01:24
Kimmo Kimmo is offline
Regular Member
 
Join Date: Mar 2007
Location: Finland
Posts: 388
Kimmo is a jewel in the roughKimmo is a jewel in the roughKimmo is a jewel in the rough

Re: Problems using the double datatype


There's no way to give any real help if you don't post your code. Try the following program. What is the output?

CPP / C++ / C Code:
#include <iostream>

int main()
{
    double d = 10;
    std::cout << d;
    return 0;
}
 
 

Recent GIDBlogProblems with the Navy (Enlisted) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Solve Linear equation using VB deedex Miscellaneous Programming Forum 1 30-Nov-2008 14:59
Need help on C++ problem b5100 C++ Forum 1 26-Apr-2007 20:02
Powell Method EngineerFORhire C Programming Language 5 01-Oct-2005 00:34
Double output leanieleanz C++ Forum 1 11-Mar-2005 20:19
Quick help - redefinition error leanieleanz C++ Forum 1 08-Mar-2005 00:32

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 19:03.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.