Click here to Skip to main content
15,887,346 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CProgressCtrl cannot be passed as a parameter Pin
PJ Arends14-Jul-06 10:26
professionalPJ Arends14-Jul-06 10:26 
GeneralRe: CProgressCtrl cannot be passed as a parameter Pin
eusto14-Jul-06 10:33
eusto14-Jul-06 10:33 
AnswerRe: CProgressCtrl cannot be passed as a parameter Pin
Hamid_RT14-Jul-06 19:07
Hamid_RT14-Jul-06 19:07 
QuestionGet button color from theme Pin
cje14-Jul-06 8:28
cje14-Jul-06 8:28 
AnswerRe: Get button color from theme Pin
Joe Woodbury14-Jul-06 9:26
professionalJoe Woodbury14-Jul-06 9:26 
Questiondynamic arrays in classes - are they correct? Pin
jon-8014-Jul-06 8:13
professionaljon-8014-Jul-06 8:13 
AnswerRe: dynamic arrays in classes - are they correct? Pin
cje14-Jul-06 9:05
cje14-Jul-06 9:05 
AnswerRe: dynamic arrays in classes - are they correct? Pin
Zac Howland14-Jul-06 9:29
Zac Howland14-Jul-06 9: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 5:03
Hamid_RT15-Jul-06 5:03 
QuestionVS2005 Team Pin
Alex_Y14-Jul-06 8:12
Alex_Y14-Jul-06 8:12 
AnswerRe: VS2005 Team Pin
Jun Du14-Jul-06 8:22
Jun Du14-Jul-06 8:22 
GeneralRe: VS2005 Team Pin
Alex_Y14-Jul-06 8:43
Alex_Y14-Jul-06 8:43 
GeneralRe: VS2005 Team Pin
Jun Du14-Jul-06 9:23
Jun Du14-Jul-06 9:23 
GeneralRe: VS2005 Team Pin
Alex_Y14-Jul-06 9:36
Alex_Y14-Jul-06 9:36 
GeneralRe: VS2005 Team Pin
Jun Du14-Jul-06 9:49
Jun Du14-Jul-06 9:49 
GeneralRe: VS2005 Team Pin
Alex_Y14-Jul-06 11:25
Alex_Y14-Jul-06 11:25 
QuestionWhat's the best way to do this? Pin
Alex Cutovoi14-Jul-06 8:07
Alex Cutovoi14-Jul-06 8:07 
QuestionRe: What's the best way to do this? Pin
Jun Du14-Jul-06 8:27
Jun Du14-Jul-06 8:27 
AnswerRe: What's the best way to do this? Pin
Alex Cutovoi14-Jul-06 8:55
Alex Cutovoi14-Jul-06 8:55 
GeneralRe: What's the best way to do this? Pin
Jun Du14-Jul-06 9:47
Jun Du14-Jul-06 9:47 
QuestionDifference between debug and execution on open file Pin
hli114-Jul-06 7:52
hli114-Jul-06 7:52 
AnswerRe: Difference between debug and execution on open file Pin
eusto14-Jul-06 8:12
eusto14-Jul-06 8:12 
GeneralRe: Difference between debug and execution on open file Pin
hli114-Jul-06 8:35
hli114-Jul-06 8:35 
GeneralRe: Difference between debug and execution on open file Pin
PJ Arends14-Jul-06 8:42
professionalPJ Arends14-Jul-06 8:42 
GeneralRe: Difference between debug and execution on open file Pin
hli114-Jul-06 9:02
hli114-Jul-06 9: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.