Author |
Message |
BDwinsAlt Agurus's Posse
Age:33 Gender: Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
|
|
Back to top |
|
|
Mr Ekted Movie Geek
Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Mon Mar 20, 2006 10:33 pm Post subject: |
|
|
|
|
Don't call main() from inside main(). Either use some kind of looping construct (eg while) of use goto (which is fine IMO in this situation). _________________ 4,691 irradiated haggis!
|
|
Back to top |
|
|
BDwinsAlt Agurus's Posse
Age:33 Gender: Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
|
|
Back to top |
|
|
Mr Ekted Movie Geek
Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Tue Mar 21, 2006 2:05 am Post subject: |
|
|
|
|
No.
|
|
Back to top |
|
|
Mr Ekted Movie Geek
Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
|
Back to top |
|
|
BDwinsAlt Agurus's Posse
Age:33 Gender: Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
|
Posted: Tue Mar 21, 2006 11:40 am Post subject: |
|
|
|
|
Oh i see what you're saying now. Thanks man. Any ideas on when the new continuum will be out? :-P
angrydog.jpg - 2.13 KB
File downloaded or viewed 32 time(s)
|
|
Back to top |
|
|
Cyan~Fire I'll count you!
Age:36 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Tue Mar 21, 2006 2:46 pm Post subject: |
|
|
|
|
You are proof that "Aside from biller devolpment (well anyone can do that)" is not true.
Do you have any concept of how computer programming works? You seem to have no idea how procedural programming works, and that's the basis of everything. (Yes, you even need to know procedural to do Java.) _________________ This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
|
|
Back to top |
|
|
BDwinsAlt Agurus's Posse
Age:33 Gender: Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
|
Posted: Tue Mar 21, 2006 3:46 pm Post subject: |
|
|
|
|
That's why it is my first c++ project.
Trial and Error...
|
|
Back to top |
|
|
Cyan~Fire I'll count you!
Age:36 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Tue Mar 21, 2006 4:00 pm Post subject: |
|
|
|
|
Some of programming is trial and error, but not to the extent you're doing. I don't even know how you pieced that together without reading some sort of tutorial, which you obviously didn't. Have you tried cplusplus.com?
|
|
Back to top |
|
|
BDwinsAlt Agurus's Posse
Age:33 Gender: Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
|
Posted: Tue Mar 21, 2006 4:03 pm Post subject: |
|
|
|
|
I haven't yet. I basically just went into Visual C++ and starting typing stuff :?
|
|
Back to top |
|
|
Cyan~Fire I'll count you!
Age:36 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Tue Mar 21, 2006 5:49 pm Post subject: |
|
|
|
|
Right. Not a good idea. If you want to be a good programmer, learn by the book first.
Also, use stdio.h, not iostreams.
|
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Tue Mar 21, 2006 7:00 pm Post subject: |
|
|
|
|
Cyan~Fire wrote: | Also, use stdio.h, not iostreams. |
stdio.h isn't even a valid C++ system header name. Oh wait, you mean C...
iostream has its place. There's a reason every C++ book uses it. _________________ Hyperspace Owner
Smong> so long as 99% deaths feel lame it will always be hyperspace to me
|
|
Back to top |
|
|
Mr Ekted Movie Geek
Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Tue Mar 21, 2006 7:46 pm Post subject: |
|
|
|
|
Dr Brain wrote: | stdio.h isn't even a valid C++ system header name. Oh wait, you mean C...
iostream has its place. There's a reason every C++ book uses it. |
Ya so newbs who are learning don't have to learn everything at once. Once you get beyond the "I'm a stupid newb" stage, if you still think iostream is a good thing, then you will always be a newb.
|
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
|
Back to top |
|
|
Cyan~Fire I'll count you!
Age:36 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Tue Mar 21, 2006 10:22 pm Post subject: |
|
|
|
|
The iostream code was inside the executable (template class).
|
|
Back to top |
|
|
Mr Ekted Movie Geek
Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Wed Mar 22, 2006 7:02 am Post subject: |
|
|
|
|
Dr Brain wrote: | I decided to check out your printf zealotry. Your previous statements about cout calling printf are total bull. In fact, because cout knows exaclty what the type is, in general, it preforms faster than printf. |
Trace though the source code for a simple "cout << "hello";" call sometime. It's a freaking nightmare. But you are off the mark.
One, it's not that iostreams directly calls printf, it's that iostreams is about 4 levels of indirection avove the OS, while the printf stuff is 1. I hate wrappers. Part of coding is 1) understanding how things work, etc. take a look at the nightmare code in iostreams. And 2) being able to debug when something is broken. You may have a bug which overwrites something that causes a crash in the middle of the iostreams processing. Good luck with that.
Two, real apps (the kind which we usually talk about here, map editors, etc) don't use console input/output. It's reserved for silly test utilities while you are learning to code. The real issue is formatting buffers.
Three, where user interaction is concerned, a few milliseconds is nothing. Write an test app that uses heavy string processing over millions of records. Working in a buffer will kick any wrapper's butt.
|
|
Back to top |
|
|
Dr Brain Flip-flopping like a wind surfer
Age:38 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Wed Mar 22, 2006 8:37 am Post subject: |
|
|
|
|
Those "wrappers" are all inline, and once you compile it in some kind of release mode, they perform just fine.
Of course console I/O isn't used for real apps, but file streams and buffer streams work just fine and have the same advantage over fprintf and sprintf.
|
|
Back to top |
|
|
|