Click here to Skip to main content
15,903,201 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCListCtrl Pin
Neelesh K J Jain12-Sep-04 18:44
Neelesh K J Jain12-Sep-04 18:44 
GeneralEncrypt/Decrypt Pin
Timothy Grabrian12-Sep-04 17:13
professionalTimothy Grabrian12-Sep-04 17:13 
GeneralRe: Encrypt/Decrypt Pin
Michael Dunn12-Sep-04 19:23
sitebuilderMichael Dunn12-Sep-04 19:23 
GeneralRe: Encrypt/Decrypt Pin
Alexander M.,13-Sep-04 5:12
Alexander M.,13-Sep-04 5:12 
QuestionHow to use combobox with UNICODE? Pin
Member 135496212-Sep-04 11:17
Member 135496212-Sep-04 11:17 
GeneralPolyline Editor in Open Gl Pin
csp200512-Sep-04 10:24
csp200512-Sep-04 10:24 
GeneralSegmentation fault?! Pin
Whiphub12-Sep-04 9:39
Whiphub12-Sep-04 9:39 
GeneralRe: Segmentation fault?! Pin
Antti Keskinen12-Sep-04 10:44
Antti Keskinen12-Sep-04 10:44 
In the bigFish function, instead of passing the entire arrays as parameters, pass the address of the first cell (&name[0], for example, and function parameter is string*). All other code in this function can remain unchanged.

As the 'name' parameter is of type 'string', have you made sure that the 'string' class supports the << operator ? If it doesn't, the std::cout will cause serious problems.

Also, the program wastes huge amounts of stack memory with those 99999 slot arrays. Most obviously the process runs out of memory, thus causing a segmentation fault. This is because you have large arrays of integers that are static. They consume the stack memory of the process, which is limited, and will quickly run out.

If you do not know what dynamic memory allocation is about, you should go grab a good C++ book from the local library and read it through with thought. Dynamic memory allocation is one of the key concepts of efficient programming.

-Antti Keskinen

----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
GeneralSwitching mainframe menu (solution) Pin
Ravi Bhavnani12-Sep-04 8:23
professionalRavi Bhavnani12-Sep-04 8:23 
GeneralRe: Switching mainframe menu (solution) Pin
KaЯl13-Sep-04 3:55
KaЯl13-Sep-04 3:55 
QuestionHOw to convert from EMF to SWF. Pin
Azghar Hussain12-Sep-04 7:49
professionalAzghar Hussain12-Sep-04 7:49 
AnswerRe: HOw to convert from EMF to SWF. Pin
Christian Graus12-Sep-04 11:52
protectorChristian Graus12-Sep-04 11:52 
QuestionLink/C-calling convention ? Pin
0v3rloader12-Sep-04 6:46
0v3rloader12-Sep-04 6:46 
AnswerRe: Link/C-calling convention ? Pin
Antti Keskinen12-Sep-04 9:38
Antti Keskinen12-Sep-04 9:38 
GeneralRe: Link/C-calling convention ? Pin
0v3rloader12-Sep-04 22:59
0v3rloader12-Sep-04 22:59 
GeneralRe: Link/C-calling convention ? Pin
Antti Keskinen13-Sep-04 4:15
Antti Keskinen13-Sep-04 4:15 
GeneralRe: Link/C-calling convention ? Pin
0v3rloader14-Sep-04 1:47
0v3rloader14-Sep-04 1:47 
GeneralEnvironment macro Pin
Rome Singh12-Sep-04 6:31
Rome Singh12-Sep-04 6:31 
GeneralRe: Environment macro Pin
Andrew Walker12-Sep-04 14:46
Andrew Walker12-Sep-04 14:46 
GeneralRe: Environment macro Pin
Rome Singh13-Sep-04 5:12
Rome Singh13-Sep-04 5:12 
GeneralRe: Environment macro Pin
Andrew Walker13-Sep-04 12:52
Andrew Walker13-Sep-04 12:52 
QuestionWarning: no message line prompt for ID *???? Pin
jettocrack12-Sep-04 6:13
jettocrack12-Sep-04 6:13 
AnswerRe: Warning: no message line prompt for ID *???? Pin
Ravi Bhavnani12-Sep-04 7:13
professionalRavi Bhavnani12-Sep-04 7:13 
GeneralProblem Regarding Tree in DOTNET Pin
eshban28412-Sep-04 6:08
eshban28412-Sep-04 6:08 
GeneralRe: Problem Regarding Tree in DOTNET Pin
Antti Keskinen12-Sep-04 10:12
Antti Keskinen12-Sep-04 10:12 

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.