Sieve of Eratosthenes using vectors in C++

  • (2 Pages)
  • +
  • 1
  • 2

17 Replies - 4714 Views - Last Post: 12 September 2014 - 10:17 AM Rate Topic: -----

#16 jimblumberg   User is online

  • member icon

Reputation: 5916
  • View blog
  • Posts: 17,932
  • Joined: 25-December 09

Re: Sieve of Eratosthenes using vectors in C++

Posted 11 September 2014 - 08:37 PM

View PostBHXSpecter, on 11 September 2014 - 05:33 PM, said:

Bone-headed idea? There is no need to start throwing names around. Simply stating erase() is a bad idea for this project and linking to the wikipedia and pointing out that they aren't being erased would have been enough. You don't want to run the risk of making them self conscious about their code or themselves.

Actually it is a "Bone-headed idea" but it isn't theirs. It is a requirement of the assignment, so it has nothing to do with the OP, but rather the instructor. There have been several topics about this same assignment in the last several days.

Jim
Was This Post Helpful? 0
  • +
  • -

#17 BHXSpecter   User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 46
  • Joined: 22-November 08

Re: Sieve of Eratosthenes using vectors in C++

Posted 12 September 2014 - 09:21 AM

View Postjimblumberg, on 11 September 2014 - 09:37 PM, said:

View PostBHXSpecter, on 11 September 2014 - 05:33 PM, said:

Bone-headed idea? There is no need to start throwing names around. Simply stating erase() is a bad idea for this project and linking to the wikipedia and pointing out that they aren't being erased would have been enough. You don't want to run the risk of making them self conscious about their code or themselves.

Actually it is a "Bone-headed idea" but it isn't theirs. It is a requirement of the assignment, so it has nothing to do with the OP, but rather the instructor. There have been several topics about this same assignment in the last several days.

Jim

This is true, but you have to remember that it is rather easy to misread or misinterpret it and the OP taking it as an insult is a very real possibility. I always run on the policy that no matter how frustrated I get with another programmer, that I never insult anything so I don't run the risk of making them feel dumb or lose confidence in what they are doing. That is why I said he could have addressed the point of not using erase and showing the wiki without insulting anything (even the idea of using erase() which was part of the assignment, which again may or may not have anything to do with the instructor). I had an instructor that apologized for some code stating the department head required he give it to us and that he felt it was poorly done in him opinion.

This post has been edited by BHXSpecter: 12 September 2014 - 09:24 AM

Was This Post Helpful? 0
  • +
  • -

#18 CTphpnwb   User is offline

  • D.I.C Lover
  • member icon

Reputation: 3872
  • View blog
  • Posts: 14,211
  • Joined: 08-August 08

Re: Sieve of Eratosthenes using vectors in C++

Posted 12 September 2014 - 10:17 AM

I'd be interested in seeing a solution that uses vector.erase() because I wrote a version that emulates Wikipedia's definition and I don't see how to do it using erase(). Maybe that's because my version uses a vector of booleans.

(I can see a way, but I don't think it would be efficient.)
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2