Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

c++

Name: Anonymous 2009-09-23 18:37

im new to c++ and have a little problem with a project. I need to read the input from the user that follows the following format.. LETTER SPACE NUMBERS .. The only method we've learned so far is cin for reading user inputs, and cin will only read the letter since there is a space in the user input. I've googled a bit and found the function getline, but now I don't know how to read what letter they entered and the number separately... help.

Name: Anonymous 2009-09-24 9:59

>>24
I'm not talking about pure functional programming. Haskell is fine, but I don't consider it the most pragmatic programming language. What I had in mind was Common Lisp. It's not really about babying here, it's about engineering solid software. If you write a macro which allocates and deallocates a resource for you, as well as adding all the needed error handling code, you can be sure that as long as you write the macro correctly, all your code using it will not have errors of that kind. In C, you have to malloc and free carefully, check return types, and so on. You waste your time writing a lot of boilerplate code when you could teach your language to write for you, once and for all, it's just not good use of your time to do that. You're doing the job of the machine by yourself, and this can lead to errors as we're humans after all.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List