Click here to Skip to main content
11,409,516 members (61,630 online)

C / C++ / MFC

 
AnswerRe: Which among following statements c/c++ code is faster? PinprofessionalJochen Arndt25-Mar-14 1:20 
GeneralRe: Which among following statements c/c++ code is faster? PinmemberHeng Xiangzhong10-Apr-14 2:19 
AnswerRe: Which among following statements c/c++ code is faster? PinmemberMaximilien25-Mar-14 2:01 
GeneralRe: Which among following statements c/c++ code is faster? Pinmembershaktikanta25-Mar-14 4:18 
GeneralRe: Which among following statements c/c++ code is faster? PinmemberMaximilien25-Mar-14 4:32 
GeneralRe: Which among following statements c/c++ code is faster? Pinmemberjschell25-Mar-14 14:26 
JokeRe: Which among following statements c/c++ code is faster? PinprofessionalRage25-Mar-14 3:20 
AnswerRe: Which among following statements c/c++ code is faster? PinprofessionalAlbert Holguin25-Mar-14 5:42 
AnswerRe: Which among following statements c/c++ code is faster? Pinmemberptse26-Mar-14 4:34 
GeneralRe: Which among following statements c/c++ code is faster? PinprotectorRichard MacCutchan26-Mar-14 6:24 
QuestionFree fails with access violation Pinmembertejaswini_g24-Mar-14 17:14 
AnswerRe: Free fails with access violation PinprotectorRichard MacCutchan24-Mar-14 23:52 
AnswerRe: Free fails with access violation PinprofessionalRichard Andrew x6425-Mar-14 6:59 
AnswerRe: Free fails with access violation Pinmemberleon de boer25-Mar-14 18:36 
Okay that rubbish won't even compile

No compiler is going to let this line thru
for(i =0;i 0)|| ((*filesize) < _tcslen(ffd.cFileName)))
I am also suggesting that this line was also supposed to be that function defined but it has ";" rather than open brackets
FindFilesInDirectory(szDirpath, Filelist);
The other function is not provided anywhere
void FileCountInDir(const TCHAR* dirpath, int * filescount, int* filesize);

Can I suggest you give us some code that actually compiles if you want help

There is also some house cleaning you didn't release the pointer array in FreeMemory. To make you life easier can I suggest you make a CreateMemory function to add to your FreeMemory function here is what they look like
char** CreateMemory(int rows, int stringsize) {
    int i;
    char** p;
 
    p = (char**) malloc (rows * sizeof (char*));
    if(p != NULL){
        for (i = 0; i < rows; i++){
            p[i] = (char*) malloc(stringsize * sizeof(char));
        }
    };
    return (p);
};
 
void FreeMemory(char** myArray, int row) {
    int i;
    if(myArray != NULL){
        for (i = 0; i < row; i++){
            free (myArray[i]);
        }
    };
    free(myArray);   // you forgot this
};
This is how you use them
char** q;
 
q = CreateMemory(10, 256);  // create 10 rows each 256 chars
strcpy(q[0], "row 1\0");  // fill row 1
strcpy(q[9], "row 10\0");  // fill row 10
FreeMemory(q, 10); // release all the memory

AnswerRe: Free fails with access violation Pinmemberpwasser25-Mar-14 21:13 
GeneralDirectShow GraphEdit missing property page options tab. PARTIALLY SOLVED - CLOSED [modified] PinmemberVaclav_Sal24-Mar-14 16:42 
GeneralRe: DirectShow GraphEdit missing property page options tab. PinprofessionalRage25-Mar-14 3:19 
Generalx it.Re: DirectShow GraphEdit missing property page options tab.IN PROGRESS [modified] PinmemberVaclav_Sal25-Mar-14 8:29 
QuestionFree fails with Access violation reading location [modified] Pinmembertejaswini_g24-Mar-14 14:31 
AnswerRe: Free fails with Access violation reading location PinprofessionalRichard Andrew x6424-Mar-14 14:42 
GeneralRe: Free fails with Access violation reading location Pinmembertejaswini_g24-Mar-14 16:01 
AnswerRe: Free fails with Access violation reading location Pinmemberleon de boer24-Mar-14 16:06 
GeneralRe: Free fails with Access violation reading location Pinmemberpwasser24-Mar-14 16:25 
GeneralRe: Free fails with Access violation reading location Pinmemberpwasser24-Mar-14 16:59 
QuestionRe: Free fails with Access violation reading location [modified] Pinmemberpwasser24-Mar-14 16:17 
AnswerRe: Free fails with Access violation reading location Pinmembertejaswini_g24-Mar-14 16:39 
AnswerRe: Free fails with Access violation reading location Pinmemberpwasser24-Mar-14 17:01 
GeneralRe: Free fails with Access violation reading location Pinmembertejaswini_g24-Mar-14 17:11 
QuestionHow do you define flags? PinmemberDusan Paulovic24-Mar-14 10:48 
AnswerRe: How do you define flags? PinprotectorRichard MacCutchan24-Mar-14 12:11 
AnswerRe: How do you define flags? PinprofessionalAlbert Holguin25-Mar-14 5:48 
QuestionHow do I using WH_CALLWNDPROC and PT_TOUCH to get the global touch event Pinmembercedricvictor24-Mar-14 4:48 
Questionvisual studio 6.0 Enterprise edition License PinmemberKrishnaRayalu_Talisetti24-Mar-14 1:47 
AnswerRe: visual studio 6.0 Enterprise edition License PinprofessionalJochen Arndt24-Mar-14 2:02 
AnswerRe: visual studio 6.0 Enterprise edition License PinmemberDavidCrow24-Mar-14 5:51 
QuestionBuilding / compiling DirectShow "empty DLL". PinmemberVaclav_Sal23-Mar-14 6:51 
SuggestionRe: Building / compiling DirectShow "empty DLL". PinprotectorRichard MacCutchan23-Mar-14 23:59 
QuestionWin CE program, SetFong() not work Pinmemberecony21-Mar-14 8:21 
AnswerRe: Win CE program, SetFong() not work PinprofessionalRage25-Mar-14 3:15 
AnswerRe: Win CE program, SetFong() not work PinprofessionalRage25-Mar-14 3:17 
GeneralRe: Win CE program, SetFong() not work Pinmemberecony25-Mar-14 4:32 
QuestionWidth of dropdown list window Pinmemberbokideclan21-Mar-14 3:33 
QuestionVery weird change font problem Pinmemberecony20-Mar-14 9:18 
QuestionRe: Very weird change font problem Pinprofessional Randor 20-Mar-14 9:43 
AnswerRe: Very weird change font problem Pinmemberecony20-Mar-14 10:00 
AnswerRe: Very weird change font problem Pinprofessional Randor 20-Mar-14 11:22 
GeneralRe: Very weird change font problem Pinmemberecony20-Mar-14 11:33 
AnswerRe: Very weird change font problem Pinprofessional Randor 20-Mar-14 11:51 
GeneralRe: Very weird change font problem Pinmemberecony20-Mar-14 14:20 
QuestionSetfont() not work Pinmemberecony20-Mar-14 6:38 

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

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


Advertise | Privacy | Mobile
Web04 | 2.8.150414.5 | Last Updated 24 Apr 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid