Click here to Skip to main content
15,918,976 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CDatabase and DSNs :-( Pin
Pavel Klocek12-Sep-02 22:06
Pavel Klocek12-Sep-02 22:06 
GeneralADO records count Pin
Anonymous12-Sep-02 19:45
Anonymous12-Sep-02 19:45 
GeneralRe: ADO records count Pin
anju12-Sep-02 22:31
anju12-Sep-02 22:31 
GeneralRe: ADO records count Pin
Anonymous12-Sep-02 22:34
Anonymous12-Sep-02 22:34 
GeneralRe: ADO records count Pin
anju12-Sep-02 23:58
anju12-Sep-02 23:58 
GeneralSet the time object (eg using COleDateTime) 5 minutes ahead of the currect time Pin
SPGV12-Sep-02 19:27
SPGV12-Sep-02 19:27 
GeneralRe: Set the time object (eg using COleDateTime) 5 minutes ahead of the currect time Pin
Pavel Klocek12-Sep-02 19:58
Pavel Klocek12-Sep-02 19:58 
Generalfree() problem Pin
Anonymous12-Sep-02 19:13
Anonymous12-Sep-02 19:13 


#include <stdio.h>
#include <stdlib.h>

int main()
{
int nFibo = 0;
int *FiboArray;
int loop = 0;

printf("How many Fibonacci numbers do you want to see?\n");
scanf("%d", &nFibo);
if (nFibo == 0)
exit(0);

else
{
FiboArray =(int *)malloc(nFibo);
if( FiboArray == NULL )
printf( "Insufficient memory available\n" );
else
{
printf("0 1 ");
FiboArray[0] = 0;
FiboArray[1] = 1;
for (loop = 2; loop < nFibo ;loop ++)
{
FiboArray[loop] = FiboArray[loop-1] + FiboArray[loop-2];
printf("%d ", FiboArray[loop]);
}
printf(" \n");

}
free(FiboArray);
return (0);

}

}

<\p>

//Hi all, This little program gives me a run time error at the line that has free(FiboArray)
Does anyone know what the problem is?
thanks


GeneralRe: free() problem Pin
Chris Losinger12-Sep-02 19:42
professionalChris Losinger12-Sep-02 19:42 
GeneralRe: free() problem Pin
Bill Wilson13-Sep-02 10:45
Bill Wilson13-Sep-02 10:45 
QuestionHow to prohibit users from changing the system time? Pin
neumedical12-Sep-02 15:02
neumedical12-Sep-02 15:02 
AnswerRe: How to prohibit users from changing the system time? Pin
Bill Wilson13-Sep-02 10:36
Bill Wilson13-Sep-02 10:36 
GeneralRe: How to prohibit users from changing the system time? Pin
neumedical15-Sep-02 18:01
neumedical15-Sep-02 18:01 
GeneralRe: How to prohibit users from changing the system time? Pin
Bill Wilson16-Sep-02 5:34
Bill Wilson16-Sep-02 5:34 
GeneralRe: How to prohibit users from changing the system time? Pin
neumedical16-Sep-02 20:50
neumedical16-Sep-02 20:50 
Generalsocket giving aborted error Pin
Robert Boll12-Sep-02 15:01
Robert Boll12-Sep-02 15:01 
GeneralRe: socket giving aborted error Pin
valikac12-Sep-02 16:58
valikac12-Sep-02 16:58 
GeneralRe: socket giving aborted error Pin
Robert Boll12-Sep-02 21:14
Robert Boll12-Sep-02 21:14 
GeneralRe: socket giving aborted error Pin
Martin Marvinski12-Sep-02 19:58
Martin Marvinski12-Sep-02 19:58 
GeneralMy Bitmap is covering my Buttons Pin
Stumped on a Bitmap problem12-Sep-02 14:22
sussStumped on a Bitmap problem12-Sep-02 14:22 
GeneralRe: My Bitmap is covering my Buttons Pin
Christian Graus12-Sep-02 15:12
protectorChristian Graus12-Sep-02 15:12 
GeneralRe: My Bitmap is covering my Buttons Pin
Nish Nishant12-Sep-02 15:53
sitebuilderNish Nishant12-Sep-02 15:53 
GeneralRe: My Bitmap is covering my Buttons Pin
ColinDavies12-Sep-02 16:00
ColinDavies12-Sep-02 16:00 
GeneralRe: My Bitmap is covering my Buttons Pin
Christian Graus12-Sep-02 16:02
protectorChristian Graus12-Sep-02 16:02 
GeneralRe: My Bitmap is covering my Buttons Pin
ColinDavies12-Sep-02 16:17
ColinDavies12-Sep-02 16:17 

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.