| |
| |
| |
|
Page: 1 2 3 4 5 6 7
Comments:
<0> then it is stdin, and you'll need some system call to either change stdin or get user input <1> He just wants us to create an app that can work automatically and manually <0> get direct* user input <0> int main( int argc, char* argv[] ) { std::ifstream in_file ( ( argc > 1 ? argv[1] : "" ) ); std::istream in ( in_file.rdbuf() ); /* normal code, using in as input, except the first time in reaches eof, replace its buffer with std::cin.rdbuf(), clear in, and use in again */ } <1> Ok ... can I just go throw up now? lol <2> PM2: You're not just interpreting the requirements wrong? <0> if you want it to run without user intervention when a file is redirected to stdin, then you *can't* get interactive input and still maintain no user intervention <1> yy2bggggs : It's probably more like the prof didn't write it so clearly ... <2> I put forth the suggestion that perhaps what he wanted was for it to be able to work using indirection, and for it to also be able to work manually; specifically, that he does not want it to do both at the same time <1> yy2bggggs : That's what I'm thinking now ... :) <0> you are likely only required to handle both console input on stdin or a file on stdin, but not both in the same invocation <1> Yes! :) <1> The way I coded option 4 ****s, but it's the only choice I had! lol <0> no, it's not <1> Is there one way of clearing the console, a way that would work on both Unix and Windows? <1> Someone said no here yesterday
<0> void clear_screen() { #ifdef UNIX std::system( "clear" ); #else std::system( "cls" ) #endif } <0> maybe the macro isn't UNIX, can't remember and cba to check <0> your input there is wrong too <0> char which; if ( cin >> which ) { /* use which */ } else { /* error */ } <0> or at the very least, char tempo[2]; cin.width(2); cin >> tempo; <0> what happens if someone types "abdafdasfdsafdsfsdfdsfdsafsdafsdafsfdsfsdafsdafdsa" at that prompt? :P <3> I got to pet a seal today. <3> a cute harbor seal <3> crawled up on a beach I was at <1> Noidea128 : Cool! <3> so I snuck up behind him, and tried to pet him. <3> he tried to bite me, so I had to back up. <0> Noidea: you should change the noidea128.org paste pages so the <topic> is different for each <0> err, too much irc <0> <title> <3> yeah, I guess I could do that <3> but not right now. <0> yeah, seals :P <3> now I'm tired and want to watch pointless television. <1> Kniht : If you were a girl, a nice looking girl, I'd kiss you buddy! It works! ;) <3> Kniht is a nice looking girl <3> she's actually paying her way through school as a model <3> not like a super model <1> I want proof! <1> lol <1> :P <3> but, like a macys type model. <0> being a nice looking girl might be interesting for a few hours <0> but sitting to pee ****s <0> monetary donations to the_poor_and_homeless@qxxy.com always accepted though <1> Kniht : lol I totally agree! <1> What the heck is wrong with detour? <1> Must not be a normal guy <1> Kniht : 'bout peeing while standing : http://pages.videotron.com/pmrioux/TellYourFriend.wmv <0> nty <4> 2 laptops for sale must go today price 500. message me if interested <0> itsmeeh: shut up <1> :) <1> Does anybody need a laptop here? <1> I guess not ... <1> itsmeeh : Stop asking! ;) <1> We did see it the first time <1> Kniht : There is another problem ... if the user enters anything else but a digit, it loops ... <0> I already told you how to fix that <1> Ahh ... I see ... <4> 2 laptops for sale must go today price 500. message me if interested <1> Kniht : How can I manage inputting fjdsk;lfjkasd;lfa with a switch() ? default doesn't work <1> Hmm... hold on ... let me try something! <4> 2 laptops for sale must go today price 500. message me if interested <5> hmm, $75 to spend at barnes and noble, what to buy <0> hah, quits as soon as an op speaks <5> oh sure, quit before i can kb you <6> Buy a gift certificate at Amazon so you can get everything cheaper. <6> Except they don't sell those at B&N. <6> :-( <5> well, i have $75 in gift certs <7> can I have them <5> so the cheapness isn't really a concern <5> no, as you would only purchase gay fantasy novels <6> The sad thing is that these days I end up calling the local bookstores and seeing if they have the book, reading it, then (optionally) buying it at amazon. <6> I wish I could support my local businesses, but hey, my own bottom line is important.
<7> sigh <0> frob: the difference is greater than shipping costs? <6> free shipping at amazon, if you don't care about waiting a week. <0> I bet you could show the amazon price + shipping to the manager and he'd discount it for you, then you don't have to wait <6> Probably. <6> Try it with your gift certificates. :-) <0> many places specifically exclude online retailers from price matching guarantees, but the manager cares more about the sale <6> Unless they're losing money on it. <0> true <6> I see your point, though, it doesn't hurt to ask. <0> it's hard to lose money on retail though <6> Anyway, I've been reading "How to cheat at IT project management." It's pretty good, but it might not be at all what you're looking. <6> It isn't a cheap gay fantasy novel, though, if that's what you want. <0> of course, that isn't counting labor costs, etc., but he's paying those regardless if you make this specific purchase or not, and -- if he's smart -- he'll know you'll come back <5> time to shut this laptop down, for the first time in weeks <5> well, almost 2 months actually <5> need to take it into the office tomorrow for the new job w00t <5> peace out <8> peace out yo <9> ah sweet... finally got plane tickets for Redmond - heading there this Tuesday <10> it looks like it cost them a whopping $1600 for the tickets... geez <1> rdragon : Where are you from?!?! 1600$ ... USD? <10> its a roundtrip flight from NY <--> Seattle <10> not NYC, a small airport upstate - i connect through philly <10> i think the price is just because it was booked so late (today) <1> Yeah I guess so <10> *shrug* I don't pay for it ;) <1> But who cares, ain't your money! lol <10> heh <7> are you paying for hotel, then going to be compensated? <7> or have they paid for that too <10> no, they have it all covered <10> plane, transportation, and hotel <7> ah sweet <10> they said if I wanted a rental car they would reimburse me but *shrug* I won't really have time to drive around or anything <7> yep <7> rdragon: this for an SDE position? <10> SDE? <10> it's a game programmer position <7> ohoh <7> nm <11> folks, is it possible to overload operator() that takes no arguments? <11> hmm...i think not <1> mozai : Operators NEED arguments ... <11> ok <1> Actually, it's called overloading when you write exactly the same header as the original ... <1> Otherwise it's not overloading <3> Jar head is a pretty good movie. <12> Hiya ni <7> is it? <7> looked pretty dumb from the trailer.."oooh look, we're american tough boys" <13> it did :P <13> I don't even want to see it <7> nor I, judging by the trailer <13> btw, how would i get the current active ip of a network device (linux).. i could cut up ifconfig output but thats icky <14> can i put a function inside a function? <14> i want to put a predicate inside a function <13> you cant <0> predicates are better as functor types <0> but you can do typedef void (*F)(); F f() { struct S { static void g(); }; return &S::g; } <0> using that is almost always indicates a design error though <14> Kniht: i have no idea what you talking. but thank you <14> do c++ automatically initialize a variable? <14> bool isLess; // init value is FALSE? <0> no <0> bool isLess (false); <14> thanks again <15> how do I call a farproc with arguments? <16> can anibody help me? <16> How can I read a function key in c++? <17> read a function? what do you mean? <16> The function keys ar 2 codes <16> Like the F1 have the code 0 and the code 59 <16> So I have to read a function key and have to frite his code
Return to
#c++ or Go to some related
logs:
#linux #chatzone #java relation view in phpmyadmin #linux #chatzone #linux vurnabilities linux tune2fs no Journal backup #linuxhelp
|
|