Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 20th, 2006, 9:04 AM   #11
thondal
Programmer
 
thondal's Avatar
 
Join Date: Jan 2006
Location: Norway
Posts: 82
Rep Power: 3 thondal is on a distinguished road
Send a message via MSN to thondal
so what you are saying is that i have to stick with the getchar(); if i want to see my program? or start it trough the cmd command? Or wait until later for more complex ways to make the program wait?

-thondal-
__________________
"die" he screamed at the polygon man. When he was done with him, only four points remained, a quad of what he once was.
thondal is offline   Reply With Quote
Old May 20th, 2006, 9:28 AM   #12
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Either 1 or 2. I don't know what you mean by 3. It isn't a terribly serious issue. It's just the result of the way the world works, so to speak. I don't know why anyone would want to complicate it. I mean, you could put an endless loop there and hope your system offered up ways to terminate that other than pulling the plug from the wall. Personally, I wouldn't bother, I'd move on to productive stuff.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old May 20th, 2006, 11:03 AM   #13
thondal
Programmer
 
thondal's Avatar
 
Join Date: Jan 2006
Location: Norway
Posts: 82
Rep Power: 3 thondal is on a distinguished road
Send a message via MSN to thondal
when i said more complex ways of making the program wait i meant like you said for example an endless loop but anyhow i'm just learning c right now, so i'll guess i'll stick with printf and scanf for now....

-thondal-
__________________
"die" he screamed at the polygon man. When he was done with him, only four points remained, a quad of what he once was.
thondal is offline   Reply With Quote
Old May 20th, 2006, 2:08 PM   #14
lectricpharaoh
SEXY SHOELESS GOD OF WAR!
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 1,194
Rep Power: 5 lectricpharaoh will become famous soon enough
Quote:
Originally Posted by thondal
i'll stick with printf and scanf for now....
Ugh, scanf() is overrated. Stick to using gets() to fill an alloca() buffer.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
lectricpharaoh is online now   Reply With Quote
Old May 20th, 2006, 2:56 PM   #15
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Quote:
Originally Posted by lectricpharaoh
Ugh, scanf() is overrated. Stick to using gets() to fill an alloca() buffer.
gets is evil. Didn't your C book teach you that?
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old May 21st, 2006, 8:34 AM   #16
lectricpharaoh
SEXY SHOELESS GOD OF WAR!
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 1,194
Rep Power: 5 lectricpharaoh will become famous soon enough
Quote:
Originally Posted by Ooble
gets is evil. Didn't your C book teach you that?
Actually, it was the C programming Fidonet group, but yeah. So is alloca() in most cases. I guess my facetious comments don't travel well over this medium, though I thought people would recognize my recipe for 'stack overflow'.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
lectricpharaoh is online now   Reply With Quote
Old May 21st, 2006, 8:49 AM   #17
thondal
Programmer
 
thondal's Avatar
 
Join Date: Jan 2006
Location: Norway
Posts: 82
Rep Power: 3 thondal is on a distinguished road
Send a message via MSN to thondal
sure sure... but mabye it would have been an idea to let me get to that i'm still at the beginning so for now scanf and printf.... :o
__________________
"die" he screamed at the polygon man. When he was done with him, only four points remained, a quad of what he once was.
thondal is offline   Reply With Quote
Old May 21st, 2006, 9:40 AM   #18
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Scanf and family are loaded with pitfalls for the novice. If you use it, understand it and use it correctly. You might want to read here.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old May 22nd, 2006, 7:48 AM   #19
lectricpharaoh
SEXY SHOELESS GOD OF WAR!
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 1,194
Rep Power: 5 lectricpharaoh will become famous soon enough
Since you said you're using DevC++, why not just use C++ stream I/O? It has its own idiosyncrasies, but on the whole, it's much easier to use in most cases, from the programmer's point of view.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
lectricpharaoh is online now   Reply With Quote
Old May 22nd, 2006, 7:53 AM   #20
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
It's the C forum. No fair cheating with the compiler if you're studying C .
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:30 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC