Click here to Skip to main content
15,846,727 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CProgressCtrl cannot be passed as a parameter Pin
PJ Arends14-Jul-06 11:26
professionalPJ Arends14-Jul-06 11:26 
GeneralRe: CProgressCtrl cannot be passed as a parameter Pin
eusto14-Jul-06 11:33
eusto14-Jul-06 11:33 
AnswerRe: CProgressCtrl cannot be passed as a parameter Pin
Hamid_RT14-Jul-06 20:07
Hamid_RT14-Jul-06 20:07 
QuestionGet button color from theme Pin
cje14-Jul-06 9:28
cje14-Jul-06 9:28 
AnswerRe: Get button color from theme Pin
Joe Woodbury14-Jul-06 10:26
professionalJoe Woodbury14-Jul-06 10:26 
Questiondynamic arrays in classes - are they correct? Pin
jon-8014-Jul-06 9:13
professionaljon-8014-Jul-06 9:13 
AnswerRe: dynamic arrays in classes - are they correct? Pin
cje14-Jul-06 10:05
cje14-Jul-06 10:05 
AnswerRe: dynamic arrays in classes - are they correct? Pin
Zac Howland14-Jul-06 10:29
Zac Howland14-Jul-06 10:29 
To address your problem, check to make sure your header file doesn't have it declared as:

bool CPrimeGen::isPrime(int* iNumber).

Everything else looks okay from a warning/error point of view.


Some things you might want to consider:
Instead of storying true/false for each integer index, you might want to use a vector<long> or a CDWordArray to just story values that are prime numbers. Allowing a class that already handles memory allocation to store your array is less likely to introduce memory leaks and logic errors in your code (and makes it far less lines of code). Storing just the prime integers allows you to decrease your memory footprint when searching for prime numbers in a large range.

If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week

Zac
AnswerRe: dynamic arrays in classes - are they correct? Pin
Hamid_RT15-Jul-06 6:03
Hamid_RT15-Jul-06 6:03 
QuestionVS2005 Team Pin
Alex_Y14-Jul-06 9:12
Alex_Y14-Jul-06 9:12 
AnswerRe: VS2005 Team Pin
Jun Du14-Jul-06 9:22
Jun Du14-Jul-06 9:22 
GeneralRe: VS2005 Team Pin
Alex_Y14-Jul-06 9:43
Alex_Y14-Jul-06 9:43 
GeneralRe: VS2005 Team Pin
Jun Du14-Jul-06 10:23
Jun Du14-Jul-06 10:23 
GeneralRe: VS2005 Team Pin
Alex_Y14-Jul-06 10:36
Alex_Y14-Jul-06 10:36 
GeneralRe: VS2005 Team Pin
Jun Du14-Jul-06 10:49
Jun Du14-Jul-06 10:49 
GeneralRe: VS2005 Team Pin
Alex_Y14-Jul-06 12:25
Alex_Y14-Jul-06 12:25 
QuestionWhat's the best way to do this? Pin
Alex Cutovoi14-Jul-06 9:07
Alex Cutovoi14-Jul-06 9:07 
QuestionRe: What's the best way to do this? Pin
Jun Du14-Jul-06 9:27
Jun Du14-Jul-06 9:27 
AnswerRe: What's the best way to do this? Pin
Alex Cutovoi14-Jul-06 9:55
Alex Cutovoi14-Jul-06 9:55 
GeneralRe: What's the best way to do this? Pin
Jun Du14-Jul-06 10:47
Jun Du14-Jul-06 10:47 
QuestionDifference between debug and execution on open file Pin
hli114-Jul-06 8:52
hli114-Jul-06 8:52 
AnswerRe: Difference between debug and execution on open file Pin
eusto14-Jul-06 9:12
eusto14-Jul-06 9:12 
GeneralRe: Difference between debug and execution on open file Pin
hli114-Jul-06 9:35
hli114-Jul-06 9:35 
GeneralRe: Difference between debug and execution on open file Pin
PJ Arends14-Jul-06 9:42
professionalPJ Arends14-Jul-06 9:42 
GeneralRe: Difference between debug and execution on open file Pin
hli114-Jul-06 10:02
hli114-Jul-06 10:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.