Search Results

Showing results 1 to 7 of 7
Search took 0.01 seconds.
Search: Posts Made By: GDICommander ; Forum: C and child forums
Forum: C Jul 9th, 2009
Replies: 11
Views: 507
Posted By GDICommander
Hello everyone! It's me again.

I replaced malloc calls with calloc and I put sizeof(char*) for the memory allocation call for the rows of the 2D array. There are no runtime errors.

Thank you...
Forum: C Jul 9th, 2009
Replies: 11
Views: 507
Posted By GDICommander
Unfortunately, no. Now I have a runtime error on the free() call at the last line of fillArray(). The change of char* to char for referenceArray has introducted a new problem in the fillArray()...
Forum: C Jul 8th, 2009
Replies: 11
Views: 507
Posted By GDICommander
Ok, here is the complete code.


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

//Variables globales.
int width;
int height;
Forum: C Jul 8th, 2009
Replies: 11
Views: 507
Posted By GDICommander
I don't think that I'm freeing the 2D array twice, because it is filled first in the fillArray() function. The referenceArray pointer is cleaned first and points to the newReferenceArray pointer....
Forum: C Jul 8th, 2009
Replies: 11
Views: 507
Posted By GDICommander
Hello, everyone!

I have a problem with memory free. Here is the necessary code to understand the problem:


void fillArray(char** referenceArray, FILE* grid)
{
//ChaƮne qui va contenir une...
Forum: C Mar 25th, 2009
Replies: 4
Views: 480
Posted By GDICommander
See this page: http://www.cppreference.com/wiki/keywords/switch.

Google showed me this Web site in less than 1 second and it took that amount of time to see the content.
Forum: C Feb 23rd, 2009
Replies: 2
Views: 295
Posted By GDICommander
Use &type_of_gas instead of type_of_gas.

Without more code, I cannot help much further.
Showing results 1 to 7 of 7

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC