![]() |
|
#1
|
|||
|
|||
Converting Strings To Integer In Linked ListDoes anybody know how I could get a string value from a file convert it to integer so I can do calculations and stuff, any help will be greatly appreicated
This is the code I got so far CPP / C++ / C Code:
On the above code it doesn't assign the value of (Stock.RetailPrice) to temp_totalprice Last edited by LuciWiz : 05-Jun-2005 at 06:37.
Reason: Pleae insert your C++ code between [c++] & [/c++]
|
|||
|
#2
|
||||
|
||||
|
Quote:
Hi Vishy80 and welcome to GIDForums™. How do you know that the value is not assigned? Are you using some quick printfs to see what the output is? Also, it appears to me that Stock.RetailPrice may want to be represented as a float and not an int, in which case the use of atof is needed. Anyway, if you can give us a bit more info on this, we may be of more help. Cheers, d __________________
The best damn Sports Blog period. |
|
#3
|
|||
|
|||
|
Hi There
I actually did try the printf statement and it didn't return any value, anyways this is the rest of the code for that function CPP / C++ / C Code:
When I initally save the stock file filed I do save it as a integer file rather than float Cheers Vish Last edited by LuciWiz : 06-Jun-2005 at 00:25.
Reason: Please insert your C++ code between [c++] & [/c++] tags
|
|
#4
|
||||
|
||||
|
hi,
maybe this code help you: CPP / C++ / C Code:
I'm sorry if my information is incorrect/useless, I'm just trying to help :-) . Good Luck - aLeppos |
Recent GIDBlog
Install Adobe Flash - Without Administrator Rights by LocalTech
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Airport Log program using 3D linked List : problem reading from file | batrsau | C Programming Language | 11 | 29-Feb-2008 07:44 |
| [Include] Doubly-linked List | dsmith | C Programming Language | 6 | 14-Apr-2006 13:12 |
| search linked list | itsmecathys | C++ Forum | 20 | 18-Apr-2005 01:34 |
| adding to linked list from external file | cghv | C Programming Language | 3 | 09-Mar-2005 13:36 |
| help on linked lists any1????? | nick4 | C Programming Language | 1 | 17-May-2004 09:32 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The