Count Logical Line Of Code
Hello,
I have program to count lines of code;
Code:
#include <stdio.h>
#include <stdlib.h>
#define MAX_FILE_NAME 100
int main()
{
FILE *fp;
int count = 1;
char filename[MAX_FILE_NAME];
char c;
printf("Dosya ismini girin: ");
scanf("%s", filename);
fp = fopen(filename, "r");
if (fp == NULL)
{
printf("Dosya acilamiyor %s", filename);
return 0;
}
for (c = getc(fp); c != EOF; c = getc(fp))
if (c == '\n')
count = count ++ 1;
fclose(fp);
printf("Dosya %s sahip %d satira\n ", filename, count);
return 0;
system("pause");
}
I need total logical line of code in each object or function and the number of methods in each object. Can anyone help me about this?
Thank you.