943,733 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 12527
  • C++ RSS
You are currently viewing page 6 of this multi-page discussion thread; Jump to the first page
Jul 15th, 2007
0

Re: Interview Challenge (Word Reversal)

>I decided to approach it, assuming that I knew absolutely nothing about the type of Token ...
Nice. In fact, I'll accept that as a viable solution. I also would have accepted a recursive solution:
C++ Syntax (Toggle Plain Text)
  1. #include <iostream>
  2. #include <sstream>
  3. #include <string>
  4.  
  5. using namespace std;
  6.  
  7. typedef string Token;
  8.  
  9. void push_frame_arg ( Token tok )
  10. {
  11. cout<< tok <<'\n';
  12. }
  13.  
  14. bool add_arguments ( istream& tokenizer )
  15. {
  16. Token tok;
  17.  
  18. if ( tokenizer>> tok ) {
  19. add_arguments ( tokenizer );
  20. push_frame_arg ( tok );
  21. }
  22. }
  23.  
  24. int main()
  25. {
  26. istringstream tokenizer ( "arg1 arg2 arg3" );
  27. Token tok;
  28.  
  29. add_arguments ( tokenizer );
  30. }
>Which would lead to the question "if not the standard library, what
>library are we to use and where can we find the documentation for it?".
Which would be a good question.

>But you would have to accept a solution using the standard library
>given your stated requirements since they lack mention of
Nope. The point of many of these questions is to figure out exactly what the requirements are before trying to come up with a solution. Vague requirements are very common with clients, and you're basically saying that I (as the client) have to accept your solution as final even if it's your fault that the solution is worthless. How many clients do you think would pay if you tried to pull that?
Administrator
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Narue is offline Offline
11,807 posts
since Sep 2004
Jul 15th, 2007
0

Re: Interview Challenge (Word Reversal)

Click to Expand / Collapse  Quote originally posted by Narue ...
>But you would have to accept a solution using the standard library
>given your stated requirements since they lack mention of
Nope. The point of many of these questions is to figure out exactly what the requirements are before trying to come up with a solution. Vague requirements are very common with clients, and you're basically saying that I (as the client) have to accept your solution as final even if it's your fault that the solution is worthless. How many clients do you think would pay if you tried to pull that?
Indeed - if this thread has taught me one thing, its to question every word of every sentence, and to question every assumption that results .. I guess the old adage reigns true - You only truly understand the problem around the time you've finished creating the solution
Reputation Points: 307
Solved Threads: 62
Posting Pro
Bench is offline Offline
565 posts
since Feb 2006
Jul 16th, 2007
0

Re: Interview Challenge (Word Reversal)

Quote ...
Visual Basic is considered the most concise and well implemented computer language currently in existence
By whom? Not by anyone with a grain of intellect...
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Jul 16th, 2007
0

Re: Interview Challenge (Word Reversal)

Says the net and just like father Christmas and Bill Clinton, the net never lies.
Featured Poster
Reputation Points: 1536
Solved Threads: 431
Posting Expert
iamthwee is offline Offline
5,865 posts
since Aug 2005
Jul 16th, 2007
0

Re: Interview Challenge (Word Reversal)

ah, so another fictional delusion?
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Jul 16th, 2007
0

Re: Interview Challenge (Word Reversal)

Click to Expand / Collapse  Quote originally posted by jwenting ...
ah, so another fictional delusion?
basically.

hahah would not be supprised if billy gates himself wrote that.

i'm not a windows basher but billy gates sure does love his visual basic even though it works better for scripting.
Reputation Points: 152
Solved Threads: 39
Master Poster
Killer_Typo is offline Offline
778 posts
since Apr 2004
Jul 16th, 2007
0

Re: Interview Challenge (Word Reversal)

i'm not a windows basher but billy gates sure does love his visual basic even though it works better for scripting.
Are you trying to make an ass out of yourself?
Reputation Points: 683
Solved Threads: 53
Posting Virtuoso
Infarction is offline Offline
1,580 posts
since May 2006
Jul 16th, 2007
0

Re: Interview Challenge (Word Reversal)

VB isnt a scripting language you fool.

VBScript is a scripting language (a pretty crappy one). Its not very much like VB.

Regular VB can be used for Server Side Web Page Scripting though (ASP.NET)
Moderator
Featured Poster
Reputation Points: 1764
Solved Threads: 574
Moderator
jbennet is offline Offline
16,505 posts
since Apr 2005
Jul 16th, 2007
3

Re: Interview Challenge (Word Reversal)

People who even think there's a clear line between 'scripting languages' and other languages are the true fools.

Are we allowed to call people fools on this forum?
Team Colleague
Reputation Points: 1135
Solved Threads: 171
Super Senior Demiposter
Rashakil Fol is offline Offline
2,478 posts
since Jun 2005
Jul 16th, 2007
0

Re: Interview Challenge (Word Reversal)

Click to Expand / Collapse  Quote originally posted by Infarction ...
Are you trying to make an ass out of yourself?
here try this one then. VB sucks, the language is weak and there is no supprise that VB works better as a scripting language (dur VBScript) than VB works as a software language. hope that clears things up for you
Reputation Points: 152
Solved Threads: 39
Master Poster
Killer_Typo is offline Offline
778 posts
since Apr 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: ordered Linked List Copy function
Next Thread in C++ Forum Timeline: the middle character of a string





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC