![]() |
|
#1
|
|||
|
|||
i/o: set value x (long) before it is used by a functionhopefully this will be an easy one for somebody.......
i can get this working using c++ but not with c (which i never learnt) and i need this as part of an assignment. my problem is that i cant seem to make scanf behave line cin, all i want is for the user to set value x (long) before it is used by a function. function works fine if the value is entered directly into the code. heres the bit i mean, CPP / C++ / C Code:
what am i missing? i tried getchar() but i'm not sure that likes long numbers. |
|
#2
|
|||
|
|||
|
got it now - its scanf("%lf" isnt it............took suprisingly long to find that using google.
|
Recent GIDBlog
Meeting the local Iraqis by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PHP MSN Scripty Thing | Andrew | MySQL / PHP Forum | 19 | 08-May-2007 11:52 |
| Need C++ help with functions | EvilIce | C++ Forum | 2 | 01-Dec-2003 16:04 |
| convert long to pointer to char | realpopeye | C++ Forum | 2 | 26-Sep-2003 10:22 |
| [class] 404 search function code | jrobbio | MySQL / PHP Forum | 6 | 22-Apr-2003 09:32 |
| [class] Generate Forms Without Using HTML! | Elmseeker | PHP Code Library | 6 | 11-Mar-2003 12:05 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The